Aaronontheweb / EvilRoslynAnalyzers

Has your boss gone insane and banned LINQ at work? Why stop there - use this Roslyn Analyzer to ban extension methods altogether!
https://www.reddit.com/r/dotnet/comments/1c4hz1z/linq_forbidden/
Apache License 2.0
31 stars 2 forks source link

Feature Idea: Every Return Statement needs a comment #34

Open MrBliz opened 4 months ago

MrBliz commented 4 months ago

Sometimes i'm not sure what is being returned from a method, or even what a return statement is.

Comments can clear this up for us. I've seen this in the wild, and I think every codebase would benefit from enforcing describing how a method exits.

IMG_2813

I'll open up another feature idea enforcing every try should have an empty catch block.

Aaronontheweb commented 4 months ago

Comments can clear this up for us. I've seen this in the wild, and I think every codebase would benefit from enforcing describing how a method exits.

Understanding fundamental language syntax is an incredibly unfair expectation to have for professional enterprise software developers. Having comments each time we do something is a good idea.