-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Move Microsoft.CodeAnalysis.NetAnalyzers from roslyn-analyzers into sdk #50167
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
Merged
Merged
Changes from 250 commits
Commits
Show all changes
5597 commits
Select commit
Hold shift + click to select a range
6f26008
Merge pull request #6968 from mpidash/ca1846-fix-typo
mavasani 8f3b2fd
Merge pull request #6873 from Youssef1313/Ca1824-no-comp-end
mavasani d0d0658
Fix false-flag of CompareExchange and re-usage with loops (#6979)
jozkee 3622ffa
Merge branch 'master' into issue_6652
CollinAlpert 9c4bd8b
Apply PR comments
CollinAlpert 963fedd
Merge pull request #6683 from CollinAlpert/issue_6652
mavasani 303e57e
Merge branch 'master' into issue_336
CollinAlpert f440020
Apply PR comments.
CollinAlpert 1d63a03
Do not raise CA1065 when in delegate
CollinAlpert 86e2ee7
Only include equal or more accessible methods
david-acker c78cbce
Handle accessibility correctly in inheritance scenarios
david-acker 6f8a2e5
Remove unnecessary if
david-acker 6caa2f9
Merge branch 'master' into issue_336
CollinAlpert b15190e
Don't emit CA1849 for nameof expressions
CollinAlpert b3c8b29
Merge pull request #7010 from CollinAlpert/issue-6993
mavasani c93aec0
Merge pull request #6779 from CollinAlpert/issue_336
mavasani f6ee900
Apply PR comments
CollinAlpert ff5feda
Merge branch 'master' into issue_6963
CollinAlpert f7c0c8f
Merge pull request #6986 from CollinAlpert/issue_6963
mavasani 4f70156
Generate unique name for CA1861
CollinAlpert 5a68335
Don't emit CA1508 in Debug.Assert
CollinAlpert 515ba69
Remove unnecessary using
CollinAlpert 2b834f0
Merge pull request #7013 from CollinAlpert/issue-6981
mavasani 20b6b3d
docs(grammatical): correct typos
Abhineshhh f7b1036
Merge pull request #7016 from AbhineshJha/typo
mavasani 12eb45f
Merge branch 'main' into bug/CA1307-overload-accessibility
david-acker 35883e4
CA2241: Non supported heuristically found format methods should not b…
manfred-brands 7543dac
CA2213:Disposable fields should be disposed and support for `DisposeC…
MartyIX cb2c00a
Fix doc link
gewarren ffa4962
fix grammar in CA2261 message
gewarren 39b69be
Revert "fix grammar in CA2261 message"
gewarren e54fac3
fix grammar in CA2261 message
gewarren 141d73d
Merge pull request #7038 from gewarren/patch-1
mavasani fa35851
Don't report diagnostic when ISerializable is inherited (#6997)
david-acker b94c11c
Don't raise CA1861 in for attribute arguments
CollinAlpert 1caec67
Support banning base types
aelij 4202020
Remove flagging target (#7040)
carlossanlop 09d0523
Don't emit CA1849 for IDbContextFactory.CreateDbContext
CollinAlpert 0cac5a1
Pass method name to GetMembers
CollinAlpert 2c77c32
Merge pull request #7058 from CollinAlpert/issue-7036
mavasani 2c43d71
Merge pull request #7052 from aelij/feature/banned-base-types
mavasani 6df0075
Merge pull request #7024 from manfred-brands/Issue7023_CA2241_IFormat…
mavasani a954f29
Merge pull request #7014 from CollinAlpert/issue-6983
mavasani ea8e4f8
update rules missing docs
gewarren 073f4c8
Don't raise RS1039 when passing LocalFunctionStatementSyntax
CollinAlpert c9e4bb2
Merge pull request #7044 from CollinAlpert/issue-7033
mavasani 72c3f56
Merge pull request #7062 from CollinAlpert/issue-7061
mavasani 1659b8b
Remove call to LookupSymbols
david-acker 88f5c2d
Update src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Runtime/Spec…
david-acker e8b0092
Update src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Runtime/Spec…
david-acker f5064c8
Use SemanticModel on IInvocationOperation
david-acker 891fac6
Merge pull request #6998 from david-acker/bug/CA1307-overload-accessi…
mavasani 1836087
Edit from msbuild pack command
mavasani 5b91aaa
Merge pull request #7039 from gewarren/option
mavasani 2da72ad
Localized file check-in by OneLocBuild Task: Build definition ID 830:…
dotnet-bot 1f0098d
Merge pull request #7076 from dotnet/locfiles/e3610918-d3dc-45b8-81a0…
github-actions[bot] 633b859
Suppress CA1860 when in expression tree
CollinAlpert 8a396b5
Suppress CA1725 for generic parameters
CollinAlpert c3b811a
Localized file check-in by OneLocBuild Task: Build definition ID 830:…
dotnet-bot ea471bd
Merge pull request #7081 from dotnet/locfiles/ad2c9503-5f37-4ecc-9a26…
github-actions[bot] b88968e
Suppress CA1862 for string.Contains on netfx
CollinAlpert c4eccc4
Update RulesMissingDocumentation.md
CollinAlpert 365aacb
Remove extra space
joegoldman2 62f0130
Merge pull request #7084 from joegoldman2/extra-space
mavasani 546a35c
Localized file check-in by OneLocBuild Task: Build definition ID 830:…
dotnet-bot c02adcb
Merge pull request #7083 from CollinAlpert/issue-7053
mavasani 074c3b9
Merge pull request #7089 from dotnet/locfiles/23fea615-4b2c-4943-8c39…
github-actions[bot] 6aaf382
Merge pull request #7077 from CollinAlpert/suppress-ca1725-for-generics
mavasani 0c18bcb
fix(CA2208): false positive when message start with parameter name fo…
HenryZhang-ZHY 668b2bc
Localized file check-in by OneLocBuild Task: Build definition ID 830:…
dotnet-bot dcd274f
Localized file check-in by OneLocBuild Task: Build definition ID 830:…
dotnet-bot 4a2d455
Merge pull request #7094 from dotnet/locfiles/67630858-e20c-4cff-9877…
github-actions[bot] 2e36e15
Preserve code style during fix
sharwell 637e851
Merge pull request #7107 from sharwell/preserve-style
sharwell f0dafca
Localized file check-in by OneLocBuild Task: Build definition ID 830:…
dotnet-bot f652570
Merge pull request #7117 from dotnet/locfiles/c3437a29-9755-46ca-b7fa…
github-actions[bot] 32c55f8
Implement RS1041 (Compiler extensions should be implemented in assemb…
sharwell ade494b
Avoid using SyntaxReference.GetSyntaxAsync
sharwell be07c62
Provide WellKnownTypeProvider through CodeMetricsAnalysisContext
sharwell 2b8a627
Avoid captures in AddCoupledNamedTypesCore
sharwell 1e4dce2
Avoid string split allocations in GetLinesOfCode
sharwell 9af2b29
Avoid delegate allocations in GetSemanticModel
sharwell 36bf341
Avoid enumerator allocations calling AddCoupledNamedTypes
sharwell 94f58b4
Avoid parallel code metrics calculations within a single member
sharwell 7c67883
Avoid parallel code metrics calculations in the analyzer pipeline
sharwell e433e01
Cancel code metrics calculation when requested
sharwell daaaa85
Create fix for CA1861 in top level statements
CollinAlpert 1213d0c
Add code metrics tests for other line ending styles
sharwell f80d7fd
Remove non-standard helper NormalizeLineEndings
sharwell e3dc79f
Add tests covering properties and events
sharwell f0676cc
fix 6982
daveMueller f5883ef
Merge pull request #7119 from CollinAlpert/issue-7111
mavasani 58654f4
Merge pull request #7120 from daveMueller/issue-6982
mavasani 324b919
Merge pull request #6966 from reduckted/feature/5818
mavasani 9408484
Merge pull request #7118 from sharwell/metrics-perf
sharwell 5ad8e9a
Fix indentation
CollinAlpert acf8847
Merge pull request #7123 from CollinAlpert/issue-7063
mavasani 3d6c0bb
Merge pull request #7116 from sharwell/check-target-framework
sharwell 4a34b54
Fix a number of issues in CA1859.
9d51945
Update src/NetAnalyzers/Core/Microsoft.NetCore.Analyzers/Performance/…
geeknoid b46cb1e
Make AnalyzerOptionsExtensions to have public modifier instead of int…
eriawan 86d45fc
Set some classes modifiers to public
eriawan 3fbfc66
Suppress CA1034 on NameParts class
eriawan 3457089
Handle explicit interface implementations of Equals
david-acker 9e5ba65
Handle explicit interface implementations of GetHashCode
david-acker b421697
Allow static virtual members in CA1000
RenderMichael 279cd6c
Add MSBUILD compile constants (preprocess symbol) in Test.Uitilities.…
eriawan 0d5f5fc
Ad ifdef in test instead of expecting a failure
RenderMichael eb80f3b
remove unnecessary generic
RenderMichael 19d046d
Bring back generic
RenderMichael f0b247f
use generic type
RenderMichael a0a30bd
Merge pull request #7085 from eriawan/make-AnalyzerOptionsExtensions-…
mavasani 9ac7f01
Specify C# 11 and protect against .NET 7 warnings
RenderMichael cff6cb9
Specify .NET 6
RenderMichael 50014ec
Merge pull request #7140 from david-acker/bug-CA1065-explicit-interfa…
mavasani dcc3306
Merge pull request #7142 from RenderMichael/main
mavasani f39318d
Add another test case
3e1c32d
Merge branch 'main' of https://github.com/geeknoid/roslyn-analyzers
50ecf0f
Merge pull request #7133 from geeknoid/main
mavasani dbd3c42
[main] Update dependencies from dotnet/arcade (#7149)
dotnet-maestro[bot] 4aa823d
Fix grammar for CA2262's description (#7169)
gewarren 5fab7e0
Localized file check-in by OneLocBuild Task: Build definition ID 830:…
dotnet-bot e4c027d
Merge pull request #7172 from dotnet/locfiles/f41dd505-ecae-42e9-a571…
github-actions[bot] d70dc1e
In PlatformCompatiblityAnalyzer, set ObsoleteUrl based on child Obsol…
omajid b0ccb1b
Unified Build control update (#7184)
mmitche 65b9394
Add IsFileLocal lightup, use it in `CA1708`
RenderMichael 6c3ec58
Fix nullability
RenderMichael 7eb6d2d
Use the style of other lightup types
RenderMichael 8e5c805
Formatting
RenderMichael 0b9d9ba
PR feedback
RenderMichael 9963c17
PR feedback
RenderMichael d08f414
Cleanup
RenderMichael cd7b45a
Further PR feedback
RenderMichael ca52e98
Add [WorkItem] attribute
RenderMichael f2a1b5f
fix CA2021 false positives (#7183)
fowl2 6dbb147
CA2263: Prefer generic overload when type is known (#6857)
mpidash faaa6ae
Merge branch 'dotnet:main' into main
RenderMichael 51d9cac
Merge pull request #7190 from RenderMichael/main
sharwell a875804
Warn about ignored method result for IQueryable (#7182)
CollinAlpert b6a6166
Enhance: Inline variable in CA1854 (IDictionary.TryGetValue) (#7071)
Poker-sang 529df51
Add DoNotPassStructToArgumentNullExceptionThrowIfNullAnalyzer (#6815)
CollinAlpert 0e9bd93
Don't report CA2257 on nested types (#7157)
jkoritzinsky a4deba4
CA1065: Ignore System.Diagnostics.UnreachableException (#7200)
mpidash 2a545e9
Emit diagnostic for 'is' pattern
CollinAlpert 67be5e8
Support collection expressions for non-copyable analyzer (#7210)
333fred a82c0fa
Allow fixer to fix 'is' patterns.
CollinAlpert 4b0b436
Fix spacing.
CollinAlpert 7300269
Add WorkItem attribute
CollinAlpert 17f9e1c
Add explanatory comments
CollinAlpert 7b5539c
Merge pull request #7213 from CollinAlpert/issue-7207
mavasani 1a9d333
Remove temporary .NET 8 reference assemblies
mpidash 289071b
Create DoNotCompareSpanToNullAnalyzer (#6838)
CollinAlpert 5fd72ec
Merge pull request #7220 from mpidash/issue-6923
mavasani aed145b
Add ClassName property to ResxSourceGenerator
raulsntos c0a0d49
Add UseVolatileReadWriteAnalyzer (#7043)
CollinAlpert 3dd2e56
CA2263: Fix wrong fix for notnull constraints and fix crash on unboun…
mpidash 16976cf
Localized file check-in by OneLocBuild Task: Build definition ID 830:…
dotnet-bot 975171e
Merge pull request #7248 from dotnet/locfiles/406d3ea0-8e3b-4d48-8170…
github-actions[bot] 7af53fe
Add CA1872: Prefer 'Convert.ToHexString' over 'BitConverter.ToString'…
mpidash bbbd766
Localized file check-in by OneLocBuild Task: Build definition ID 830:…
dotnet-bot f0f598d
Merge pull request #7266 from dotnet/locfiles/296991ce-c7f1-4b02-84d7…
github-actions[bot] 06db8f5
Add CA2022: Avoid inexact read with 'Stream.Read' (#7208)
mpidash 2cb0578
CA2022: Do not flag well known reliable stream types (#7269)
mpidash 1390d23
Specify IEqualityComparer when creating well known type set (#7270)
mpidash cf75067
Localized file check-in by OneLocBuild Task: Build definition ID 830:…
dotnet-bot 32eef5b
Merge pull request #7273 from dotnet/locfiles/ab194c92-23d1-47fc-bdbf…
github-actions[bot] 9e27d4c
Localized file check-in by OneLocBuild Task: Build definition ID 830:…
dotnet-bot 4cacdd3
Merge pull request #7276 from dotnet/locfiles/2c8e5342-1a3f-4857-9b60…
github-actions[bot] 1dd79fa
Add CollectionExpression support to CA1870 (UseSearchValues) (#7252)
MihaZupan fda284d
Check for the CollectionExpression syntax kind early in UseSearchValu…
MihaZupan 9bde73f
Do not emit CA1854/CA1864 for nested conditionals (#7228)
CollinAlpert bad627a
Fix some typos
raulsntos de56158
Merge pull request #7298 from raulsntos/typos
Evangelink a7ab488
Prevent SemaphoreSlim.Wait(0) from triggering CA1849
CollinAlpert 2488542
Remove unnecessary using
CollinAlpert 3415e4b
Fix formatting
CollinAlpert 5f6ab30
Apply code review suggestions.
CollinAlpert d08b23b
Remove unnecessary using.
CollinAlpert 4230ef6
Add Debug.Assert
CollinAlpert b322e02
Merge pull request #7226 from raulsntos/resx-generator-class-name
sharwell 89ddfb4
Merge pull request #7310 from CollinAlpert/issue-7271
sharwell 8dd02c1
Mark type as instantiated when used with a collection expression init…
CollinAlpert b1708c3
Generate field for const arrays in constructor declarations (#7231)
CollinAlpert 49b195a
Do not warn when invoking APIs that has SupportedOSPlatformGuard attr…
buyaa-n 0f7475e
Update to Microsoft.CodeAnalysis.Testing 1.1.2-beta1.24314.1
sharwell cb2aaf2
Merge pull request #7333 from sharwell/update-testing
sharwell b020904
Don't emit CA1064 in executables (#7234)
CollinAlpert 6211e28
Highlight C# code in unit tests
JakeYallop 5c59767
Test
MartyIX 9a243a3
Fix
MartyIX d9a3d7b
Execute NameAndParametersValid only when needed. (#7353)
mandel-macaque 5c1dc52
Add additional StringSyntax attributes
JakeYallop ffb7081
Merge pull request #7335 from JakeYallop/add-string-syntax-attribute
Evangelink 66a7d4f
Merge pull request #7347 from MartyIX/feature/2024-07-07-CA2213-override
Evangelink d29f7f5
Bump main to 10.0 (#7379)
carlossanlop f058812
Temporarily disable pragma SYSLIB0014 from CSharp CodeFix Verifiers (…
carlossanlop 4784c04
fix(CA2023: Adds validation against invalid braces in logger message …
Kritner 10f410f
CA1854: Use unused variable name for out parameter (#7261)
mpidash d9baf6a
Update AnalyzerReleases file to reflect new analyzers for .NET9 relea…
buyaa-n 92d845e
Emit CA1305 for more nullable types. (#7306)
CollinAlpert 9179a33
Do not suggest passing IFormatProvider to certain Convert methods (#7…
CollinAlpert c499400
ExcludeFromSourceBuild->ExcludeFromSourceOnlyBuild (#7414)
mmitche 5e9c6e0
Add an analyzer for Debug.Assert (#7416)
333fred 125e2e8
Update field references (#7430)
cston b124297
Fix CA1850 Fixer not accounting for toplevel syntax nodes (#7400)
wzchua 061b0ee
Fix false positive for CA1854 across instances (#7309)
CollinAlpert d70813d
Add CA2024: Do not use 'StreamReader.EndOfStream' in async methods (#…
mpidash b534ec1
Add test case for #7357.
danpere bcdfbce
Avoid .OriginalDefinition for comparing class types.
danpere 26ca785
Add AdditionalFiles.NoWarn metadata
dvoituron a3fdb84
Fix CA2021 false positive for generic class types (7488)
JoeRobich 4d7ea5c
Merge pull request #7489 from dvoituron/users/dvoituron/resxsourcegen…
sharwell 0bb1b1e
Replace analyzerunner wiki with publicly accessible markdown
arunchndr c4d5bb1
Merge pull request #7498 from dotnet/arunchndr-patch-1
arunchndr b62443f
Error when users use a `file` type for things we need to load (#7501)
333fred 3e2e39e
Ensure that PlatformCompatibilityAnalyzer better handles various TFMs…
tannergooding 63e68aa
Trim leading v from TargetFrameworkVersion (#7544)
tannergooding f581b4c
Add CA1873: Avoid potentially expensive logging (#7290)
mpidash df7f2c7
Upgrade CodeAnalysisVersion consistently (#7560)
ViktorHofer 267d1af
Fix two more cases where the live CodeAnalysis version isn't used (#7…
ViktorHofer 03373ea
Add analyzers for Regex.Match(...).Success and Regex.Matches(...).Cou…
stephentoub 2d431c2
React to breaking api change
CyrusNajmabadi ad2b38f
Merge pull request #7589 from dotnet/compile
CyrusNajmabadi 66bb69f
Move roslyn owned analyzers to the Roslyn repo.
JoeRobich 15ce490
Move files to the projects that were linking them in.
JoeRobich 4927471
[main] Update dependencies from dotnet/arcade (#7602)
dotnet-maestro[bot] 0a6d3c1
Merge pull request #7603 from dotnet/dev/jorobich/remove-roslyn-packages
JoeRobich 2867225
Update CA2241 to support user-defined StringSyntaxAttribute
sharwell 3f97bd4
Add tests for multiple StringSyntaxAttribute definitions
sharwell 84fc08c
CA2025 Do not pass `IDisposable` instances into unawaited tasks (#7549)
steveberdy c65815d
fix CA2021 false positive casting from value type constraint to Enum …
fowl2 cabd14d
CA2251: support for string.CompareOrdinal (#7594)
allantargino 53d9599
Merge pull request #7632 from sharwell/api-by-name
sharwell bea7985
Fix missing quotes
trympet a99d420
escape period with backslash
trympet 483fca0
Make CA2025 DoNotPassDisposablesIntoUnawaitedTasks analyzer opt-in (#…
akoeplinger b88dcdb
Handle guarded maccatalyst attribute issue that suppressed by call si…
buyaa-n 1551bee
Don't report CA1861 if the highest initializer is a static member (#7…
steveberdy dfeef6d
Handle extension members by 'make member static' (#7739)
jjonescz 29bd87c
Add a basic fixer to suggest replacing intrinsics with their cross-pl…
tannergooding b50dffa
Merge branch 'main' of ../roslyn-analyzers into MoveRoslynAnalyzersToSdk
ViktorHofer a84c83f
Delete unused refactoring utilities sources
ViktorHofer 2f563c4
Merge remote-tracking branch 'origin/main' into MoveRoslynAnalyzersToSdk
ViktorHofer 89b70f0
Integration NetAnalyzers into sdk build and make everything build
ViktorHofer 387a073
Try other DefineConst delimiter
ViktorHofer 390fa4b
Add projects to solution files
ViktorHofer d2d43ce
Merge branch 'main' into MoveRoslynAnalyzersToSdk
ViktorHofer 8049330
Merge branch 'main' into MoveRoslynAnalyzersToSdk
ViktorHofer 49da7ff
Fix source-build
ViktorHofer 7aded0a
Validate NetAnalyzers offline only
ViktorHofer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
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.
Should these versions be hard-coded or should they flow from some repo?
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.
These should be hardcoded. We don't flow from roslyn-sdk.