[Java.Interop] Replace Gendarme with Roslyn FxCop Analyzers. #523
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Today we use Gendarme for static code analysis on
Java.Interop.dll
. Unfortunately Gendarme is dated and additionally relies on.mdb
files for analysis. This requires compiling withmcs
which is deprecated and does not support modern C# features like NRT.This PR replaces Gendarme with Roslyn FxCop Analyzers, which get around the above issues, as well as provide a few additional benefits:
This PR aims for parity with Gendarme so it configures every analyzer equivalent to Gendarme as severity error (by default these only cause warnings).
If we want to change the severity of a rule, that should be changed in the .editorconfig file.
If we want to ignore an instance of a violation, that goes in the suppression file. VS has a tooltip of "Suppress this error in suppression file" to do it for you, other editors may need to do it by hand, but the syntax is pretty similar to the Gendarme syntax.