Releases: dotnet/roslyn-analyzers
9.0.0
Release build of Microsoft.CodeAnalysis.NetAnalyzers 9.0.0 containing first-party code quality analyzers ("CAxxxx rules").
Contains bug fixes on top of 8.0.0 release.
What's Changed
- Update AnalyzerBannedSymbols.txt by @jaredpar in #6882
- Brand main to 9.0 by @carlossanlop in #6883
- Change localization branch to release/8.0.1xx temporarily by @carlossanlop in #6890
- Runtime90357 6012 by @manfred-brands in #6885
- Add backporting yml job by @carlossanlop in #6892
- [main] Update dependencies from dotnet/arcade by @dotnet-maestro in #6887
- Refactor CA1826 to read option only when needed and use SpecialType checks by @Youssef1313 in #6872
- [Performance] Improve AvoidUninstantiatedInternalClasses performance by @Youssef1313 in #6864
- Refactor PropertiesShouldNotBeWriteOnlyAnalyzer (CA1044) by @Youssef1313 in #6871
- Use direct cast instead of type checking when type is known by @Youssef1313 in #6874
- [Performance] Use Length property instead of Count() by @Youssef1313 in #6869
- Add minimal binary pattern support for null checks in DFA by @Youssef1313 in #6877
- [main] Update dependencies from dotnet/arcade by @dotnet-maestro in #6895
- [main] Update dependencies from dotnet/arcade by @dotnet-maestro in #6902
- Remove CA2229 Implement serialization constructors by @buyaa-n in #6911
- Update AnalyzerBannedSymbols.txt by @jaredpar in #6917
- Add analyzer/fixer to suggest using cached SearchValues instances by @MihaZupan in #6898
- [Performance] Simplify UseSpanBasedStringConcat for better performance by @Youssef1313 in #6870
- [Performance] Improve SpecifyIFormatProvider (CA1305) performance by @Youssef1313 in #6865
- [Performance] Improve UseValidPlatformString (CA1418) performance by @Youssef1313 in #6867
- [main] Update dependencies from dotnet/arcade by @dotnet-maestro in #6927
- Correct URL in AnalyzerReleases.Unshipped.md by @JustArchi in #6933
- Avoid 'Collection was modified' InvalidOperationException by @mavasani in #6935
- Update AnalyzerReleases file to reflect new analyzers for .NET8 release by @mavasani in #6940
- [main] Update dependencies from dotnet/arcade by @dotnet-maestro in #6941
- Address CA1862 cases to diagnose and to fix and improve messages by @carlossanlop in #6928
- Add dotnet9 and dotnet9-transport feeds by @carlossanlop in #6939
- Fix SearchValues fixer introducing slight changes for edge case inputs by @MihaZupan in #6926
- CA1853: Address issues found in PR review #6767 by @mpidash in #6791
- Handle reference to non-source symbols in UseConcreteTypeAnalyzer by @mavasani in #6959
- Add CA1514: Remove redundant length argument by @mpidash in #6814
- Add MakeTypesInternalAnalyzer by @CollinAlpert in #6820
- Update AnalyzerBannedSymbols.txt by @jaredpar in #6920
- Preserve trivia when fixing CA1865 by @mpidash in #6932
- Analyzer for misusage of MaxResponseHeadersLength by @amiru3f in #6796
- AddAllResxFilesAsAdditionalFiles depends on PrepareResourceNames by @sharwell in #6970
- Fix typo in CA1846 description by @mpidash in #6968
- Add support for ExperimentalAttribute by @sharwell in #6971
- Write CA1824 as non-compilation-end by @Youssef1313 in #6873
- Fix false-flag of CompareExchange and re-usage with loops by @jozkee in #6979
- Suggest CA2007 for await foreach without specified cancellation by @CollinAlpert in #6683
- Adjust source generator verifier for broader usability by @Youssef1313 in #6995
- Update version used in tests by @sharwell in #6996
- Don't emit CA1849 for nameof expressions by @CollinAlpert in #7010
- Update to Microsoft.CodeAnalysis.Testing 1.1.2-beta1.23509.1 by @mpidash in #6980
- Replace explicit richCodeNavigationEnvironment in azure-pipelines-richnav.yml by @akoeplinger in #6989
- Add analyzer for SemanticModel.GetDeclaredSymbol by @CollinAlpert in #6779
- Do not raise CA1065 when in delegate by @CollinAlpert in #6986
- Generate unique name for CA1861 by @CollinAlpert in #7013
- [main] Update dependencies from dotnet/arcade by @dotnet-maestro in #6972
- docs(grammatical): correct typos by @AbhineshJha in #7016
- CA2213:Disposable fields should be disposed and support for
DisposeCoreAsync
by @MartyIX in #6976 - Fix doc link by @gewarren in #7038
- CA2237: Don't report diagnostic when ISerializable is inherited by @david-acker in #6997
- Remove target that warns that user needs to upgrade to a newer SDK NetAnalyzers version by @carlossanlop in #7040
- Don't emit CA1849 for IDbContextFactory.CreateDbContext by @CollinAlpert in #7058
- BannedApiAnalyzers: Support banning base types by @aelij in #7052
- CA2241: Non supported heuristically found format methods should not be checked. by @manfred-brands in #7024
- [main] Update dependencies from dotnet/arcade by @dotnet-maestro in #7017
- Don't emit CA1508 in Debug.Assert by @CollinAlpert in #7014
- Don't raise CA1861 in for attribute arguments by @CollinAlpert in #7044
- Don't raise RS1039 when passing LocalFunctionStatementSyntax by @CollinAlpert in #7062
- CA1307: Only consider equal or more accessible overloads by @david-acker in #6998
- [main] Update dependencies from dotnet/arcade by @dotnet-maestro in #7059
- [main] Update dependencies from dotnet/arcade by @dotnet-maestro in #7064
- Fix grammar in CA2261 message by @gewarren in #7039
- [main] Update dependencies from dotnet/arcade by @dotnet-maestro in #7067
- [main] Update dependencies from dotnet/arcade by @dotnet-maestro in #7070
- Change localization back to main by @carlossanlop in #7072
- Localized file check-in by OneLocBuild Task: Build definition ID 830: Build ID 2331554 by @dotnet-bot in #7076
- [main] Update dependencies from dotnet/arcade by @dotnet-maestro in #7079
- Localized file check-in by OneLocBuild Task: Build definition ID 830: Build ID 2332469 by @dotnet-bot in #7081
- Remove extra space by @joegoldman2 in #7084
- Suppress CA1862 for string.Contains on netfx by @CollinAlpert in #7083
- Localized file check-in by OneLocBuild Task: Build definition ID 830: Build ID 2332945 by @dotnet-bot in #7089
- Suppress CA1725 for generic parameters by @CollinAlpert in #7077
- fix(CA2208): false positive when message start...
8.0.0
Release build of Microsoft.CodeAnalysis.NetAnalyzers 8.0.0 containing first-party code quality analyzers ("CAxxxx rules").
Contains bug fixes on top of 7.0.4 release.
What's Changed
- New constant expected analyzer by @wzchua in #5766
- Enhance GenerateDocumentationAndConfigFiles tool to generate vNext globalconfig files by @mavasani in #6258
- Support ForEachVariableStatement in stackalloc analyzer by @Youssef1313 in #6286
- SealInternalTypes (CA1852): Don't warn for top-level type by @Youssef1313 in #6278
- Localized file check-in by OneLocBuild Task: Build definition ID 830: Build ID 2051809 by @dotnet-bot in #6276
- Localized file check-in by OneLocBuild Task: Build definition ID 830: Build ID 2051897 by @dotnet-bot in #6275
- Fix PublicAPI enablement checks by @333fred in #6291
- Localized file check-in by OneLocBuild Task: Build definition ID 830: Build ID 2055871 by @dotnet-bot in #6292
- Add UseExceptionThrowHelpers analyzer/fixer by @stephentoub in #6293
- Update messaging fo the after merge comments by @buyaa-n in #6178
- Add readme for Microsoft.CodeAnalysis.NetAnalyzers package by @jmarolf in #6303
- Fix typo in RS0030 message: "Do not used banned APIs" -> "Do not use banned APIs" by @sorensenmatias in #6213
- Handle conversion operation as operands of IThrowOperation by @mavasani in #6304
- Use ReferenceAssemblies.Net.Net70 by @Youssef1313 in #6311
- Localized file check-in by OneLocBuild Task: Build definition ID 830: Build ID 2064130 by @dotnet-bot in #6318
- Don't run CI for doc changes by @Youssef1313 in #6320
- use newer vm images by @jmarolf in #6317
- Update UseExceptionThrowHelpers to only recommend ANE for classes by @stephentoub in #6314
- Move perf tests to new pool by @jmarolf in #6315
- Update CA1062 message and description to not suggest code contracts by @Youssef1313 in #6327
- Remove comment about param-null checking feature that was dropped by @Youssef1313 in #6326
- Localized file check-in by OneLocBuild Task: Build definition ID 830: Build ID 2064627 by @dotnet-bot in #6330
- Combine fixer & analyzer tests and delete duplicate tests by @Youssef1313 in #6329
- Replace docs.microsoft.com with learn.microsoft.com by @Youssef1313 in #6335
- Cleanup
Microsoft.CodeAnalysis.NetAnalyzers.csproj
by @Youssef1313 in #6344 - Fix analyzer description by @Youssef1313 in #6345
- Delete WinForms-specific unimplemented analyzers by @Youssef1313 in #6350
- Simplify multiple enumeration analyzer by @Youssef1313 in #6343
- Enable IDE2xxx experimental rules by @Youssef1313 in #6353
- Remove rule CA2109 by @x789 in #6198
- Add file-local class test for CA1812 by @ahmedabdelkabier in #6360
- Move from .NET 7 RC1 to .NET 7.0.101 by @Youssef1313 in #6363
- Implement Use 'StartsWith' instead of 'IndexOf' analyzer by @Youssef1313 in #6295
- Localized file check-in by OneLocBuild Task: Build definition ID 830: Build ID 2070548 by @dotnet-bot in #6351
- Dogfood latest 7.0.0 analyzers by @Youssef1313 in #6339
- Delete BasicStaticHolderTypes.Fixer.vb by @Youssef1313 in #6340
- Move
GetOrCreateTypeByMetadataName
to compilation start by @Youssef1313 in #6332 - Update "Getting Started" section with VS 2022 requirement by @Youssef1313 in #6319
- Update "Branch Definitions" documentation by @Youssef1313 in #6347
- Fix bugs found in MAUI repo by @buyaa-n in #6361
- Don't import System when it's already imported by global using by @Youssef1313 in #6358
- Remove some of the unused resources by @Youssef1313 in #6341
- Refactor CA1305 to compare symbols by @Youssef1313 in #6356
- Update README.md by @mavasani in #6374
- Merge release/7.0.1xx to main by @dotnet-bot in #6355
- Localized file check-in by OneLocBuild Task: Build definition ID 830: Build ID 2071507 by @dotnet-bot in #6373
- [main] Update dependencies from dotnet/arcade by @dotnet-maestro in #6251
- Use
WalkDownParentheses
to simplify code by @Youssef1313 in #6378 - Move to latest .NET8 pre-release version of NetAnalyzers package for dogfooding by @mavasani in #6380
- [main] Update dependencies from dotnet/arcade by @dotnet-maestro in #6376
- Remove rulesets by @Youssef1313 in #6367
- Compare symbols instead of method names by @Youssef1313 in #6382
- Localized file check-in by OneLocBuild Task: Build definition ID 830: Build ID 2074162 by @dotnet-bot in #6389
- [main] Update dependencies from dotnet/arcade by @dotnet-maestro in #6385
- [main] Update dependencies from dotnet/arcade by @dotnet-maestro in #6392
- Simplify AvoidUninstantiatedInternalClasses by @Youssef1313 in #6309
- Fix a couple of issues in UseExceptionThrowHelpers by @stephentoub in #6396
- Cleanup UpgradeMSBuildWorkspaceAnalyzer by @Youssef1313 in #6324
- Support VB for ImmutableObjectMethodAnalyzer by @Youssef1313 in #6321
- Localized file check-in by OneLocBuild Task: Build definition ID 830: Build ID 2078512 by @dotnet-bot in #6400
- Add RSxxxx diagnostic for compilation end diagnostic descriptors without CompilationEnd custom tag by @mavasani in #6397
- Add the UseConreteType analyzer by @geeknoid in #6370
- Get void type only once at compilation start by @Youssef1313 in #6404
- [main] Update dependencies from dotnet/arcade by @dotnet-maestro in #6398
- Report blocking
Thread.Sleep
calls in async methods by @Youssef1313 in #6359 - Fix false positive in the UseConcreteType analyzer. by @geeknoid in #6407
- [main] Update dependencies from dotnet/arcade by @dotnet-maestro in #6409
- Bunch of fixes for CA1859 by @geeknoid in #6418
- Localized file check-in by OneLocBuild Task: Build definition ID 830: Build ID 2082902 by @dotnet-bot in #6420
- [main] Update dependencies from dotnet/arcade by @dotnet-maestro in #6419
- Generate packages props and targets in
buildTransitive
directory by @Youssef1313 in #6325 - Move tests to target .NET 7 by @Youssef1313 in #6364
- Revert "Move tests to target .NET 7" by @mavasani in #6429
- Localized file check-in by OneLocBuild Task: Build definition ID 830: Build ID 2086644 by @dotnet-bot in #6430
- Re-implement CodeAnalysisTreatWarningsAsErrors with globalconfig files by @mavasani in #6427
- [main] Update dependencies from dotnet/arcade by @dotnet-maestro in https://github...
7.0.4
Release build of Microsoft.CodeAnalysis.NetAnalyzers 7.0.4 containing first-party code quality analyzers ("CAxxxx rules").
Contains bug fixes on top of 7.0.3 release.
What's Changed
- Update the version of new release/7.0.4xx branch by @buyaa-n in #6649
- Merge release/7.0.3xx to release/7.0.4xx by @dotnet-bot in #6660
Full Changelog: 7.0.3...7.0.4
7.0.3
Release build of Microsoft.CodeAnalysis.NetAnalyzers 7.0.3 containing first-party code quality analyzers ("CAxxxx rules").
Contains bug fixes on top of 7.0.1 release.
What's Changed
- [release/7.0.1xx] SealInternalTypes (CA1852): Don't warn for top-level type (#6278) by @jhartmann123 in #6504
- Update Versions.props by @mavasani in #6547
- Update version for release/7.0.3xx branch by @buyaa-n in #6634
New Contributors
- @jhartmann123 made their first contribution in #6504
Full Changelog: 7.0.1...7.0.3
v3.3.4
7.0.1
Release build of Microsoft.CodeAnalysis.NetAnalyzers containing first-party code quality analyzers ("CAxxxx rules").
Contains bug fixes on top of 7.0.0 release.
What's Changed
Full Changelog: 7.0.0...7.0.1
7.0.0
Release build of Microsoft.CodeAnalysis.NetAnalyzers containing first-party code quality analyzers ("CAxxxx rules").
Added
- Globalization
- CA1311: Specify a culture or use an invariant version -- Enabled by default
- Interoperability
- Performance
- CA1850: Prefer static 'HashData' method over 'ComputeHash' -- Enabled by default
- CA1851: Possible multiple enumerations of 'IEnumerable' collection
- CA1852: Seal internal types -- Enabled by default
- CA1853: Unnecessary call to 'Dictionary.ContainsKey(key)' -- Enabled by default
- CA1854: Prefer the 'IDictionary.TryGetValue(TKey, out TValue)' method -- Enabled by default
- CA1855: Prefer 'Clear' over 'Fill' -- Enabled by default
- Reliability
- Usage
v3.3.3
NetAnalyzers 6.0.0
Release build of Microsoft.CodeAnalysis.NetAnalyzers containing first-party code quality analyzers ("CAxxxx rules").
Added
- Interoperability
- Naming
- CA1727: Use PascalCase for named placeholders -- Enabled by default
- Performance
- CA1839: Use 'Environment.ProcessPath' -- Enabled by default
- CA1840: Use 'Environment.CurrentManagedThreadId' -- Enabled by default
- CA1841: Prefer Dictionary.Contains methods -- Enabled by default
- CA1842: Do not use 'WhenAll' with a single task -- Enabled by default
- CA1843: Do not use 'WaitAll' with a single task -- Enabled by default
- CA1844: Provide memory-based overrides of async methods when subclassing 'Stream' -- Enabled by default
- CA1845: Use span-based 'string.Concat' -- Enabled by default
- CA1846: Prefer 'AsSpan' over 'Substring' -- Enabled by default
- CA1847: Use char literal for a single character lookup -- Enabled by default
- CA1848: Use the LoggerMessage delegates -- Enabled by default
- CA1849: Call async methods when in an async method
- Reliability
- Security
- Usage
- CA2250: Use 'ThrowIfCancellationRequested' -- Enabled by default
- CA2251: Use 'string.Equals' -- Enabled by default
- CA2252: This API requires opting into preview features -- Enabled by default
- CA2253: Named placeholders should not be numeric values -- Enabled by default
- CA2254: Template should be a static expression -- Enabled by default
- CA2255: The 'ModuleInitializer' attribute should not be used in libraries -- Enabled by default
- CA2256: All members declared in parent interfaces must have an implementation in a DynamicInterfaceCastableImplementation-attributed interface -- Enabled by default
- CA2257: Members defined on an interface with the 'DynamicInterfaceCastableImplementationAttribute' should be 'static' -- Enabled by default
- CA2258: Providing a 'DynamicInterfaceCastableImplementation' interface in Visual Basic is unsupported -- Enabled by default
Removed
NetAnalyzers 5.0.3
Release build of Microsoft.CodeAnalysis.NetAnalyzers containing first-party code quality analyzers ("CAxxxx rules").
- Version
5.0.3
of this package contains additional bug fixes on top of version5.0.0
that ships with the .NET 5 SDK. - Works with VS 2019 16.8 or later.
- All the shipped CA rules with the default severity and enabled state can be found here