-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code Analyzer #12929
Comments
I think we add some in |
This is maybe a better candidate for https://github.com/OrchardCoreContrib/OrchardCoreContrib.PoExtractor but I can describe a few analyzers I made for my project.
|
Another one: Use IClock or ILocalClock instead of DateTime.Now, DateTime.UtcNow, etc. |
I think we have a stale PR with a Github code analyzer that never made it because it adds a lot of overhead of the time execution for the CI workflows. /cc @Jetski5822 |
See #7950 and Lombiq/.NET-Analyzers#15. |
BTW using capital letter for fields against the naming rule ;) |
We'd be happy to take this further by integrating https://github.com/Lombiq/.NET-Analyzers (see the list of packages used in the readme) - we use these in all our projects:
Step 3 (probably more than 95% of the work) can be a collaborative effort, although merge conflicts can happen. |
We can start with CodeQL integration first - it might be easier to set up and see how much it overlaps with .NET Analyzers.. |
Where was this done @agriffard? |
I guess it's closed as a duplicate of #7950? |
Would it be interesting to use a Code Analyzer package to enforce good practices?
Ex: https://github.com/meziantou/Meziantou.Analyzer
How can it be applied to all projects easily?
The text was updated successfully, but these errors were encountered: