Commit Graph

19 Commits

Author SHA1 Message Date
Saleem Abdulrasool
36254dd53b test: mark IDE test as needing XML support
The `comment_extensions` tests use XML.  Mark the test accordingly.
2019-03-23 17:52:03 -07:00
Pavel Yaskevich
db03ab201d [IDE] Fix type reconstructor to support parameter label changes (+ tests) 2017-12-18 15:45:50 -08:00
Maxwell Swadling
569ef0302e Updated to tests to match commit 452e535ba4 2017-04-19 16:24:19 -07:00
Erik Eckstein
c4a11f4c92 tests: remove the now unused option -new-mangling-for-tests 2017-03-22 11:28:43 -07:00
Argyrios Kyrtzidis
fa4b6095e1 [IDE] Use proper slash for closing an <img> tag in documentation comment XML.
rdar://24314778
2017-03-15 16:27:05 -07:00
Erik Eckstein
1d3724666f tests: convert about 400 tests to the new mangling by using the -new-mangling-for-tests option
When the new mangling is enabled permanently, the option can be removed from the RUN command lines again.
2017-01-24 15:27:45 -08:00
Dmitri Gribenko
d175b3b66d Migrate FileCheck to %FileCheck in tests 2016-08-10 23:52:02 -07:00
David Farler
fbc220a036 Revert "Revert "Enable cmark smart punctuation in doc comments""
This reverts commit f723b86614 and
updates the IDE tests that incidentally included some punctuation.
No new tests are necessary - the character level tests are exercised
in cmark itself.
2016-04-10 13:32:43 -07:00
Manav Gabhawala
7928140f79 [SE-0046] Implements consistent function parameter labels by discarding extraneous parameter names and adding _ where necessary 2016-04-06 20:21:58 -04:00
Daniel Duan
780b58a9a5 [Parser] update tests for 'inout' syntax adjustment 2016-02-26 01:33:22 -08:00
David Farler
e87be804c9 [Markup] Slurp fenced code block info string
Add a language property for Markup code blocks - the default is
"swift" but will respect overrides such as the following:

```c++
Something::Somethign::create()
```

For code listings in doc comments written in other languages, such
as when you want to compare usage against another language.

rdar://problem/23948115
2015-12-17 17:51:27 -08:00
David Farler
7d26bac22c Linux build fix: libxml isn't used for XML validation on Linux bots
This was causing some noise on the Linux bots and the other check
lines don't look for XML validation, although we may want to turn
on this check in the future.

rdar://problem/23394719
2015-11-09 02:16:07 -08:00
David Farler
4704a5f2bc Escape <Link> tags in doc comment XML
URLs come through SourceKit as custom <Link> elements which weren't
getting escaped as raw HTML, which would cause URLs with query
strings to get cut off because of ampersands.

rdar://problem/23394719
2015-11-09 01:38:39 -08:00
David Farler
62d6c3a912 Add alt/title tags to rendered markup images
These elements were getting parsed but dropped on the floor.
Now, they'll be added to the Swift Markup AST if they are
present and emitted in the HTML.

rdar://problem/22369731

Swift SVN r31452
2015-08-25 21:16:13 +00:00
David Farler
a7dcff9e49 [DocComment] Add test for bogus image URLs and enable all tests
- Reenable doc comment extension tests by moving the inputs into the
  Inputs subdirectory. rdar://problem/21295424

- cmark could crash when getting an empty URL in an image element,
  because the URL was stored as a raw char * pointer. This was fixed in
  jgm/cmark pull request https://github.com/jgm/cmark/pull/38, so GitHub/master
  is pulled into our cmark clone.
  rdar://problem/21910368

Swift SVN r30475
2015-07-22 00:11:27 +00:00
David Farler
b29220a27e Add a Requires field to doc comments
rdar://problem/20902140

Swift SVN r28446
2015-05-11 22:52:34 +00:00
David Farler
7886175c79 Linux Test Fix: Don't include XML validation in check string
If libxml isn't available, it can cause noise in the test.

Swift SVN r27743
2015-04-26 02:38:08 +00:00
David Farler
0a1c330d0e Build fix: remove absolute path from my machine
Swift SVN r27739
2015-04-26 00:36:01 +00:00
David Farler
ca5876a866 swiftMarkup Library
Replace ReST-flavored documentation comments with Markdown.

rdar://problem/20180412

In addition to full Markdown support, the following extensions are
supported. These appear as lists at the top level of the comment's
"document". All of these extensions are matched without regard to
case.

Parameter Outlines
------------------

- Parameters:
  - x: ...
  - y: ...

Separate Parameters
-------------------

- parameter x: ...
- parameter y: ...

- Note:
Parameter documentation may be broken up across the entire comment,
with a mix of parameter documentation kinds - they'll be consolidated
in the end.

Returns
-------

- returns: ...

The following extensions are also list items at the top level, which
will also appear in Xcode QuickHelp as first-class citizens:

- Attention: ...
- Author: ...
- Authors: ...
- Bug: ...
- Complexity: ...
- Copyright: ...
- Date: ...
- Experiment: ...
- Important: ...
- Invariant: ...
- Note: ...
- Postcondition: ...
- Precondition: ...
- Remark: ...
- Remarks: ...
- See: ...
- Since: ...
- Todo: ...
- Version: ...
- Warning: ...

These match most of the extra fields in Doxygen, plus a few more per request.

Other changes
-------------
- Remove use of rawHTML for all markup AST nodes except for those
not representable by the Xcode QuickHelp XSLT - <h>, <hr/>, and of
course inline/block HTML itself.

- Update the doc comment RNG schema to more accurately reflect Xcode
QuickHelp.

- Clean up cmark CMake configuration.

- Rename "FullComment" to "DocComment"

- Update the Swift Standard Documentation (in a follow-up commit)

- Update SourceKit for minor changes and link against cmark
  (in a follow-up commit).

Swift SVN r27727
2015-04-26 00:07:15 +00:00