dbolin / Apex.Analyzers

Roslyn powered analyzers for C# to support convention defined architecture
MIT License
15 stars 2 forks source link

Whitelist is hard-coded #31

Closed mwelsh1118 closed 4 years ago

mwelsh1118 commented 4 years ago

Could the list of whitelisted types be configurable? Similar to Microsoft's BannedApiAnalyzer, there could be an additional file added to the analyzed project that could extend the list of white-listed types. Happy to implement this. Just don't want to go down this road unless it's likely to be accepted.

dbolin commented 4 years ago

Sure - I just haven't done anything with consumer configurable analyzers, so I don't know what the best practice is there. Is a text file like BannedSymbols.txt still considered a good way to do this? Are there alternatives?

If you want you can answer these or I'll do some research when I have the time.

mwelsh1118 commented 4 years ago

I can't say definitively what the best practice would be, but that is the approach taken by the dotnet team. The original link was to a precursor project that's been archived, but here's a link to the current project.

dbolin commented 4 years ago

Closed by #32