-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Diagnostic rules #685
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
7a31b0b
update diagnostic messages
j0shuams ea2ac32
change wme to cswinrt
j0shuams ad03f4d
Merge branch 'master' into jlarkin/update-diagnostics
j0shuams fc2f2b6
feedback
j0shuams fd9d6ac
update gitignore, add analyzer release files, update unittests for ne…
j0shuams 0e9c04d
Add notes to rules in AnalyzerReleases
j0shuams f96ab51
update help link for rules
j0shuams 00da995
fix bug in unittests
j0shuams 31fe428
fix bug in ref diagnostic being thrown
j0shuams 244e24d
Merge branch 'master' into jlarkin/update-diagnostics
j0shuams 02894d7
pr feedback
j0shuams File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
src/Authoring/WinRT.SourceGenerator/AnalyzerReleases.Shipped.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
; Shipped analyzer releases | ||
; https://github.com/dotnet/roslyn-analyzers/blob/master/src/Microsoft.CodeAnalysis.Analyzers/ReleaseTrackingAnalyzers.Help.md | ||
|
33 changes: 33 additions & 0 deletions
33
src/Authoring/WinRT.SourceGenerator/AnalyzerReleases.Unshipped.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
; Unshipped analyzer release | ||
; https://github.com/dotnet/roslyn-analyzers/blob/master/src/Microsoft.CodeAnalysis.Analyzers/ReleaseTrackingAnalyzers.Help.md | ||
|
||
### New Rules | ||
Rule ID | Category | Severity | Notes | ||
--------|----------|----------|------- | ||
CsWinRT1000 | Usage | Error | Property should have public `get` method | ||
CsWinRT1001 | Usage | Error | Namespaces should match the assembly namespace or be child namespaces of the assembly namespace | ||
CsWinRT1002 | Usage | Error | Namespaces cannot differ only by case | ||
CsWinRT1003 | Usage | Error | Component must have at least on public type | ||
CsWinRT1004 | Usage | Error | Public types cannot be generic | ||
CsWinRT1005 | Usage | Error | Classes exposed to CsWinRT should be sealed | ||
CsWinRT1006 | Usage | Error | Do not expose unsupported type | ||
CsWinRT1007 | Usage | Error | Structs should contain at least one public field | ||
CsWinRT1008 | Usage | Error | Interfaces should not inherit interfaces that are not valid in Windows Runtime | ||
CsWinRT1009 | Usage | Error | Class should not have multiple constructors that take the same amount of parameters | ||
CsWinRT1010 | Usage | Error | Methods should not use parameter names that conflict with generated parameter names | ||
CsWinRT1011 | Usage | Error | Structs should not have private fields | ||
CsWinRT1012 | Usage | Error | Structs should not have a constant field | ||
CsWinRT1013 | Usage | Error | Structs should only contain basic types or other structs | ||
CsWinRT1014 | Usage | Error | Types should not overload an operator | ||
CsWinRT1015 | Usage | Error | Do not use `DefaultOverloadAttribute` more than once for a set of overloads | ||
CsWinRT1016 | Usage | Error | Exactly one overload should be marked as DefaultOverload | ||
CsWinRT1017 | Usage | Error | Array types should be one dimensional, not jagged | ||
CsWinRT1018 | Usage | Error | Array types should be one dimensional | ||
CsWinRT1019 | Usage | Error | Do not use the `System.Array` type for array parameters or array return values | ||
CsWinRT1020 | Usage | Error | Do not pass parameters by `ref` | ||
CsWinRT1021 | Usage | Error | Array parameters should not be marked `InAttribute` or `OutAttribute` | ||
CsWinRT1022 | Usage | Error | Parameters should not be marked `InAttribute` or `OutAttribute` | ||
CsWinRT1023 | Usage | Error | Array parameters should not be marked both `ReadOnlyArrayAttribute` and `WriteOnlyArrayAttribute` | ||
CsWinRT1024 | Usage | Error | Array parameter marked `out` should not be declared `ReadOnlyArrayAttribute` | ||
CsWinRT1025 | Usage | Error | Array parameter should be marked either `ReadOnlyArrayAttribute` or `WriteOnlyArrayAttribute` | ||
CsWinRT1026 | Usage | Error | Non-array parameter should not be marked `ReadOnlyArrayAttribute` or `WriteOnlyArrayAttribute` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may want this to be AnalyzerReleases.Shipped.md, but I am not sure when we consider a version of our SourceGenerator analyzer "released"