Skip to content

Commit 4b85cc7

Browse files
authored
[xa-fx-cop] Properly ignore Java.Interop assembly errors (#50)
Gendarme invocation ignores the `Gendarme.Rules.Design.MarkAssemblyWithCLSCompliantRule` and `Gendarme.Rules.Design.MarkAssemblyWithComVisibleRule` rules because the PCL profile that `Java.Interop.dll` targets doesn't provide the `CLSComplientAttribute` and `ComVislbleAttribute` custom attributes, and so they can't be used. Commit 782f34a "broke" these ignores by signing `Java.Interop.dll`, causing the PublicKeyToken to change. This in turn caused the ignores to be ignored, which meant Gendarme now reported errors: > This assembly is not decorated with the [CLSCompliant] attribute > This assembly is not decorated with the [ComVisible] attribute. Fix the PublicKeyToken in the assembly name so that the rules are properly ignored.
1 parent 24f8084 commit 4b85cc7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

xa-gendarme-ignore.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,12 @@ T: Java.Interop.JniObjectReferenceOptions
120120

121121
R: Gendarme.Rules.Design.MarkAssemblyWithCLSCompliantRule
122122
# CLSCompliantAttribute isn't in the PCL profile we're targeting, so we can't apply it.
123-
A: Java.Interop, Version=0.1.0.0, Culture=neutral, PublicKeyToken=null
123+
A: Java.Interop, Version=0.1.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065
124124

125125

126126
R: Gendarme.Rules.Design.MarkAssemblyWithComVisibleRule
127127
# Ditto; ComVisibleAttribute isn't in our PCL profile.
128-
A: Java.Interop, Version=0.1.0.0, Culture=neutral, PublicKeyToken=null
128+
A: Java.Interop, Version=0.1.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065
129129

130130

131131
R: Gendarme.Rules.Design.PreferEventsOverMethodsRule

0 commit comments

Comments
 (0)