OpenDreamProject / OpenDream

A project for running games made in the DM programming language
MIT License
186 stars 100 forks source link

lint using resharper #1797

Closed harryob closed 1 month ago

harryob commented 1 month ago

implements linting using rider's annotation tool, resharper. these lints aren't annotated using standard github pattern as there is a Ton of them, and resharper outputs them in SARIF. the best fitting tool for this seems to be the codeql security analysis tool, which is odd for a linter, but i think it still provides handy annotation

oh no! new bad code!! (only shows new inspections on the pr, not existing ones) CleanShot 2024-05-22 at 23 21 59@2x

new commit addresses the issue, the issue is flagged as fixed and minimised CleanShot 2024-05-22 at 23 27 08@2x

github-advanced-security[bot] commented 1 month ago

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

wixoaGit commented 1 month ago

This gives a ton of errors for our XAML UI (~6 pages). Is there something that can be done about that? image

harryob commented 1 month ago

This gives a ton of errors for our XAML UI (~6 pages). Is there something that can be done about that? image

that's odd, i never got anything reporting as an error on my fork. i'll add an exclusion for reporting anything on .xaml pages, given it seems to be misreporting for them anyway

wixoaGit commented 1 month ago

Turns out to also be giving lots of errors for things defined in RobustToolbox. This is probably due to the RT projects being excluded. image

harryob commented 1 month ago

Turns out to also be giving lots of errors for things defined in RobustToolbox. This is probably due to the RT projects being excluded. image

added a flag to skip the build to cut linting times, but this ended up also skipping the restore that happened - manually forcing it the restore performing the build seems to ensure the analysis works correctly

CleanShot 2024-05-23 at 00 04 56@2x