Commit Graph

20 Commits

Author SHA1 Message Date
Anthony Latsis
ada632c488 [docs] Diagnostics: Add quoting guidelines 2025-04-22 18:23:40 +01:00
Doug Gregor
721944a936 Merge pull request #80857 from daveyc123/doccForDiagnostics
Instructions for generating DocC for diagnostics
2025-04-17 18:08:22 -07:00
David Cummings
33fbceecc5 Instructions for generating DocC for diagnostics
Add instructions to the diagnostics documentation on how to generate
the DocC documentation locally.
2025-04-16 14:05:43 -04:00
Doug Gregor
ccce10d28b Drop the ".md" suffix from diagnostic group file names in GROUP
While here, document the GROUP macro appropriately.
2025-04-14 20:03:46 -07:00
Anthony Latsis
99f63ed933 DiagnosticEngine: Support TypeAttribute diagnostic arguments 2025-04-03 01:52:38 +01:00
Doug Gregor
e88f8995e1 [Diagnostics] Eliminate educational notes in favor of diagnostic groups
We've been converging the implementations of educational notes and
diagnostic groups, where both provide category information in
diagnostics (e.g., `[#StrictMemorySafety]`) and corresponding
short-form documentation files. The diagnostic group model is more
useful in a few ways:

* It provides warnings-as-errors control for warnings in the group
* It is easier to associate a diagnostic with a group with
GROUPED_ERROR/GROUPED_WARNING than it is to have a separate diagnostic
ID -> mapping.
* It is easier to see our progress on diagnostic-group coverage
* It provides an easy name to use for diagnostic purposes.

Collapse the educational-notes infrastructure into diagnostic groups,
migrating all of the existing educational notes into new groups.
Simplify the code paths that dealt with multiple educational notes to
have a single, possibly-missing "category documentation URL", which is
how we're treating this.
2025-03-29 15:40:35 -07:00
Becca Royal-Gordon
6aa5afe813 Cover -verify-additional-prefix in docs/Diagnostics.md
This handy feature was added in #68195.
2024-09-13 16:25:12 -07:00
Alex Hoppen
577727ad55 Remove DiagnosticsEditorMode
Migrate the last diagnostic to be independent of `DiagnosticEditorMode` and remove that option.

rdar://133111163
2024-08-14 11:24:31 -07:00
LamTrinh.Dev
b6239b8cee [docs] Update links to repositories moved to https://github.com/swiftlang/ 2024-07-22 12:22:43 -07:00
Becca Royal-Gordon
2ab1e05c68 [NFC] Add new DiagnosticEngine Decl features
Implements several enhancements to DiagnosticEngine’s handling of Decl arguments:

• All Decl classes, not just ValueDecls, are now valid to use as arguments.
• There is built-in logic to handle accessors by printing a phrase like `getter for 'foo'`, so this no longer has to be special-cased for each diagnostic.
• `%kind` can be used to insert the descriptive kind before a name; `%kindonly` inserts only the descriptive kind. This can eliminate kind/name argument pairs.
• `%base` can insert only the base name, leaving out any argument labels; `%kindbase` combines `%kind` and `%base`.

This PR is marked NFC because there are no intentional uses of these changes yet.
2023-07-19 13:06:51 -07:00
Becca Royal-Gordon
132620a595 Correct description of fix-it line numbers 2022-03-21 15:34:41 -07:00
Becca Royal-Gordon
1717935c7b Add diagnostic verifier features to Diagnostics.md
We've made changes to the diagnostic verifier over time that we failed to actually document. Update docs/Diagnostics.md to describe:

* Fix-it alternation (cdcd726f92)
* Fix-it line offsets (2128678d56)
* Additional files (5036a55550)
* Ignoring `<unknown>` diagnostics (384ab780e9)

I've also slightly fleshed out the description of fix-it expectations.
2022-03-21 15:13:29 -07:00
Konrad `ktoso` Malawski
eada7df0e4 Ban classes from extending Actor and DistributedActor protocol explicitly (#38050)
* [Concurrency,Distributed] ban inheriting Actor and DistActor explicitly by class

* [Distributed] AnyActor can be a marker protocol
2021-06-25 06:06:35 +09:00
Toan Nguyen
4b005c4a83 Fix typos in comments 2020-10-27 19:38:16 +07:00
Owen Voorhees
1ac3709dfa [Diagnostics] Document the verifier syntax for educational notes 2020-04-09 18:18:25 -07:00
Owen Voorhees
791312fb74 Turn Educational Notes On-By-Default (#30583)
* [Diagnostics] Turn educational notes on-by-default

* [Diagnostics] Only include educational notes in printed output if -print-educational-notes is passed

* Make -print-educational-notes a driver option

* [Diagnostics] Issue a printed remark if educational notes are available, but disabled

* [docs] Update educational notes documentation and add a contributing guide

* [Diagnostics] Cleanup PrintingDiagnosticConsumer handling of edu notes

* Revert "[Diagnostics] Issue a printed remark if educational notes are available, but disabled"
For now, don't notify users if edu notes are available but disabled. This decision can be reevaluated later.
2020-03-27 15:29:48 -07:00
Owen Voorhees
da7e1ca8ad [Diagnostics] Add a section to Diagnostics.md on educational notes 2019-11-07 21:19:48 -08:00
Owen Voorhees
f749e8551f [Docs] Add a section to Diagnostics.md on -verify mode 2019-09-30 17:14:32 -07:00
Owen Voorhees
486c7b883d [Diagnostics][NFC] Add support for using the %select format specifier with StringRef args
Get rid of some redundant availability diagnostics as a result.
2019-08-26 11:37:29 -07:00
Jordan Rose
813eacd026 [docs] Add a document concerning Swift diagnostics style. (#10138)
A handful of people have recently asked me if such a thing existed;
now it does. There's certainly more that can be added here, but I
wanted to dump a bunch of the information in my brain into doc form.
2017-06-08 07:40:36 -07:00