# Roslyn analyzers

6 Hacker News commenters recommended Roslyn analyzers and 0 criticized it, November 2025 to November 2026. It was recommended in 5 of 13 months.

**Verdict:** People recommend Roslyn analyzers for enforcing architecture and conventions at build time and catching invalid or inefficient code that tests can miss. No critics were recorded.

## Why people recommend it

- Enforces architecture and conventions at build (3 comments): "Getting it to write it's own guardrails by creating Roslyn Analyzers to make the build fail when it deviates from the project architecture and conventions has been another big win." ([source](https://news.ycombinator.com/item?id=46334107)) "we've added multiple Roslyn analysers to our build pipeline to check for invalid/inefficient code" ([source](https://news.ycombinator.com/item?id=46594913)) "you can also make compilation much stricter with Roslyn analyzers" ([source](https://news.ycombinator.com/item?id=50180521))
- Powerful for finding code issues (3 comments): "I think tools like Roslyn Analyzers might be more powerful than unit tests in this application." ([source](https://news.ycombinator.com/item?id=48106284)) "Roslyn analyzers are so incredibly powerful, and it's being ignored." ([source](https://news.ycombinator.com/item?id=46358358)) "are quite powerful and can identify complex patterns in code" ([source](https://news.ycombinator.com/item?id=49745564))
- Catches structural coding mistakes (2 comments): "They are quite capable of covering for many common types of structural coding mistakes" ([source](https://news.ycombinator.com/item?id=49775943)) "are quite powerful and can identify complex patterns in code" ([source](https://news.ycombinator.com/item?id=49745564))
- Guards AI-written code with LLMs (2 comments): "Getting it to write it's own guardrails by creating Roslyn Analyzers to make the build fail when it deviates from the project architecture and conventions has been another big win." ([source](https://news.ycombinator.com/item?id=46334107)) "combining Roslyn analyzers with an LLM and a human in the loop could be game changing" ([source](https://news.ycombinator.com/item?id=46296321))

## Alternatives hackers recommend

- [zizmor](https://hackerapproved.com/p/zizmor.md): 19 recommend
- [Semgrep](https://hackerapproved.com/p/semgrep.md): 14 recommend
- [clang-tidy](https://hackerapproved.com/p/clang-tidy.md): 14 recommend
- [PHPStan](https://hackerapproved.com/p/phpstan.md): 11 recommend
- [SonarQube](https://hackerapproved.com/p/sonarqube.md): 10 recommend

## Cite as

Hacker Approved, "Roslyn analyzers", https://hackerapproved.com/p/roslyn-analyzers/ (counts from 1,795,640 Hacker News comments, November 2025 to November 2026).
