dotnet / roslyn-analyzers

MIT License
1.58k stars 463 forks source link

New analyzer for Roslyn code: initialize guard variables where they are declared #1751

Open sharwell opened 6 years ago

sharwell commented 6 years ago

This dotnet/roslyn-specific analyzer would identify fields of the following form:

private static readonly object name;
private readonly object name;

And support two diagnostics:

Evangelink commented 4 years ago

@sharwell Is this analyzer supposed to handle ALL fields? Only readonly? readonly + static?