A Roslyn analyzer to enforce some good practices in C# in terms of design, usage, security, performance, and style.
dotnet add package Atc.AnalyzerOnce installed, the analyzer will automatically run during compilation and highlight code issues in your IDE. Code fixes are available for many rules and can be applied directly from your IDE.
| Id | Category | Description | Severity | Is enabled | Code fix |
|---|---|---|---|---|---|
| ATC201 | Style | Single parameter should be kept inline when declaration is short | ✔️ Yes | ✅ Yes | |
| ATC202 | Style | Multi parameters should be separated on individual lines | ✔️ Yes | ✅ Yes | |
| ATC203 | Style | Method chains with 2 or more calls should be placed on separate lines | ✔️ Yes | ✅ Yes | |
| ATC210 | Style | Use expression body syntax when appropriate | ✔️ Yes | ✅ Yes | |
| ATC220 | Style | Use global usings for all namespaces (strict policy) | ✔️ Yes | ✅ Yes | |
| ATC221 | Style | Use global usings for common namespaces (lenient policy) | ✔️ Yes | ✅ Yes |
- ❌ Error - Blocks compilation
⚠️ Warning - Produces a warning during compilation- ℹ️ Info - Informational message
- 👻 Hidden - Not shown in IDE by default
Rules that enforce consistent code formatting and style conventions.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License.