https://github.com/youssef1313/yanalyzers
A set of analyzer rules implemented using .NET Compiler Platform (aka Roslyn) APIs
https://github.com/youssef1313/yanalyzers
analyzers coding-style cs csharp ide0007 ide0008 implicit-typing roslyn roslyn-analyzers var
Last synced: 4 months ago
JSON representation
A set of analyzer rules implemented using .NET Compiler Platform (aka Roslyn) APIs
- Host: GitHub
- URL: https://github.com/youssef1313/yanalyzers
- Owner: Youssef1313
- License: mit
- Created: 2021-01-31T20:00:15.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-10-28T04:39:08.000Z (over 2 years ago)
- Last Synced: 2024-12-17T21:38:19.432Z (4 months ago)
- Topics: analyzers, coding-style, cs, csharp, ide0007, ide0008, implicit-typing, roslyn, roslyn-analyzers, var
- Language: C#
- Homepage:
- Size: 73.2 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# YAnalyzers
An analyzers package implemented with the .NET Compiler platform (aka Roslyn), available via [NuGet](https://www.nuget.org/packages/YAnalyzers).
Currently contains 'Y0001' and 'Y0002', which are replacements to [IDE0007 and IDE0008](https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0007-ide0008).
For both rules, many developers (including me) don't like the heuristics they use for determining whether the type is apparent. The replacements try to provide a different implementation which adheres to [dotnet/runtime coding style](https://github.com/dotnet/runtime/blob/master/docs/coding-guidelines/coding-style.md).
Feel free to open issues suggesting other rules, or reporting bugs with existing rules.
## Rules
### Y0001: Use implicit type
This rule suggests using implicit type (`var`) when the type is apparent.
### Y0002: Use implicit type
This rule suggests using explicit type when the type is not apparent.