Skip to content

Commit 2cb8fbf

Browse files
committed
Migrate Guava to sarif
1 parent c020c39 commit 2cb8fbf

443 files changed

Lines changed: 825253 additions & 39531 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎its/ruling/src/test/resources/expected/guava/java-S100.json‎

Lines changed: 0 additions & 8 deletions
This file was deleted.
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
{
2+
"$schema" : "https://json.schemastore.org/sarif-2.1.0.json",
3+
"version" : "2.1.0",
4+
"runs" : [ {
5+
"tool" : {
6+
"driver" : {
7+
"name" : "LITS",
8+
"language" : "en-US",
9+
"contents" : [ "localizedData", "nonLocalizedData" ],
10+
"isComprehensive" : false
11+
}
12+
},
13+
"language" : "en-US",
14+
"results" : [ {
15+
"ruleId" : "java:S100",
16+
"ruleIndex" : -1,
17+
"kind" : "fail",
18+
"level" : "warning",
19+
"message" : {
20+
"text" : "Rename this method name to match the regular expression '^[a-z][a-zA-Z0-9]*$'."
21+
},
22+
"locations" : [ {
23+
"id" : -1,
24+
"physicalLocation" : {
25+
"artifactLocation" : {
26+
"uri" : "guava:src/com/google/common/hash/Hashing.java",
27+
"index" : -1
28+
},
29+
"region" : {
30+
"startLine" : 101,
31+
"startColumn" : 30,
32+
"endLine" : 101,
33+
"endColumn" : 40,
34+
"charOffset" : 3815,
35+
"charLength" : 10,
36+
"byteOffset" : 3815,
37+
"byteLength" : 10
38+
}
39+
}
40+
} ],
41+
"rank" : -1.0
42+
}, {
43+
"ruleId" : "java:S100",
44+
"ruleIndex" : -1,
45+
"kind" : "fail",
46+
"level" : "warning",
47+
"message" : {
48+
"text" : "Rename this method name to match the regular expression '^[a-z][a-zA-Z0-9]*$'."
49+
},
50+
"locations" : [ {
51+
"id" : -1,
52+
"physicalLocation" : {
53+
"artifactLocation" : {
54+
"uri" : "guava:src/com/google/common/hash/Hashing.java",
55+
"index" : -1
56+
},
57+
"region" : {
58+
"startLine" : 113,
59+
"startColumn" : 30,
60+
"endLine" : 113,
61+
"endColumn" : 40,
62+
"charOffset" : 4238,
63+
"charLength" : 10,
64+
"byteOffset" : 4238,
65+
"byteLength" : 10
66+
}
67+
}
68+
} ],
69+
"rank" : -1.0
70+
}, {
71+
"ruleId" : "java:S100",
72+
"ruleIndex" : -1,
73+
"kind" : "fail",
74+
"level" : "warning",
75+
"message" : {
76+
"text" : "Rename this method name to match the regular expression '^[a-z][a-zA-Z0-9]*$'."
77+
},
78+
"locations" : [ {
79+
"id" : -1,
80+
"physicalLocation" : {
81+
"artifactLocation" : {
82+
"uri" : "guava:src/com/google/common/hash/Hashing.java",
83+
"index" : -1
84+
},
85+
"region" : {
86+
"startLine" : 132,
87+
"startColumn" : 30,
88+
"endLine" : 132,
89+
"endColumn" : 41,
90+
"charOffset" : 4941,
91+
"charLength" : 11,
92+
"byteOffset" : 4941,
93+
"byteLength" : 11
94+
}
95+
}
96+
} ],
97+
"rank" : -1.0
98+
}, {
99+
"ruleId" : "java:S100",
100+
"ruleIndex" : -1,
101+
"kind" : "fail",
102+
"level" : "warning",
103+
"message" : {
104+
"text" : "Rename this method name to match the regular expression '^[a-z][a-zA-Z0-9]*$'."
105+
},
106+
"locations" : [ {
107+
"id" : -1,
108+
"physicalLocation" : {
109+
"artifactLocation" : {
110+
"uri" : "guava:src/com/google/common/hash/Hashing.java",
111+
"index" : -1
112+
},
113+
"region" : {
114+
"startLine" : 144,
115+
"startColumn" : 30,
116+
"endLine" : 144,
117+
"endColumn" : 41,
118+
"charOffset" : 5368,
119+
"charLength" : 11,
120+
"byteOffset" : 5368,
121+
"byteLength" : 11
122+
}
123+
}
124+
} ],
125+
"rank" : -1.0
126+
} ],
127+
"newlineSequences" : [ "\r\n", "\n" ],
128+
"columnKind" : "utf16CodeUnits"
129+
} ]
130+
}

‎its/ruling/src/test/resources/expected/guava/java-S101.json‎

Lines changed: 0 additions & 14 deletions
This file was deleted.
Lines changed: 186 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,186 @@
1+
{
2+
"$schema" : "https://json.schemastore.org/sarif-2.1.0.json",
3+
"version" : "2.1.0",
4+
"runs" : [ {
5+
"tool" : {
6+
"driver" : {
7+
"name" : "LITS",
8+
"language" : "en-US",
9+
"contents" : [ "localizedData", "nonLocalizedData" ],
10+
"isComprehensive" : false
11+
}
12+
},
13+
"language" : "en-US",
14+
"results" : [ {
15+
"ruleId" : "java:S101",
16+
"ruleIndex" : -1,
17+
"kind" : "fail",
18+
"level" : "warning",
19+
"message" : {
20+
"text" : "Rename this class name to match the regular expression '^[A-Z][a-zA-Z0-9]*$'."
21+
},
22+
"locations" : [ {
23+
"id" : -1,
24+
"physicalLocation" : {
25+
"artifactLocation" : {
26+
"uri" : "guava:src/com/google/common/hash/Hashing.java",
27+
"index" : -1
28+
},
29+
"region" : {
30+
"startLine" : 117,
31+
"startColumn" : 24,
32+
"endLine" : 117,
33+
"endColumn" : 40,
34+
"charOffset" : 4321,
35+
"charLength" : 16,
36+
"byteOffset" : 4321,
37+
"byteLength" : 16
38+
}
39+
}
40+
} ],
41+
"rank" : -1.0
42+
}, {
43+
"ruleId" : "java:S101",
44+
"ruleIndex" : -1,
45+
"kind" : "fail",
46+
"level" : "warning",
47+
"message" : {
48+
"text" : "Rename this class name to match the regular expression '^[A-Z][a-zA-Z0-9]*$'."
49+
},
50+
"locations" : [ {
51+
"id" : -1,
52+
"physicalLocation" : {
53+
"artifactLocation" : {
54+
"uri" : "guava:src/com/google/common/hash/Hashing.java",
55+
"index" : -1
56+
},
57+
"region" : {
58+
"startLine" : 148,
59+
"startColumn" : 24,
60+
"endLine" : 148,
61+
"endColumn" : 41,
62+
"charOffset" : 5454,
63+
"charLength" : 17,
64+
"byteOffset" : 5454,
65+
"byteLength" : 17
66+
}
67+
}
68+
} ],
69+
"rank" : -1.0
70+
}, {
71+
"ruleId" : "java:S101",
72+
"ruleIndex" : -1,
73+
"kind" : "fail",
74+
"level" : "warning",
75+
"message" : {
76+
"text" : "Rename this class name to match the regular expression '^[A-Z][a-zA-Z0-9]*$'."
77+
},
78+
"locations" : [ {
79+
"id" : -1,
80+
"physicalLocation" : {
81+
"artifactLocation" : {
82+
"uri" : "guava:src/com/google/common/hash/Murmur3_128HashFunction.java",
83+
"index" : -1
84+
},
85+
"region" : {
86+
"startLine" : 43,
87+
"startColumn" : 13,
88+
"endLine" : 43,
89+
"endColumn" : 36,
90+
"charOffset" : 1311,
91+
"charLength" : 23,
92+
"byteOffset" : 1311,
93+
"byteLength" : 23
94+
}
95+
}
96+
} ],
97+
"rank" : -1.0
98+
}, {
99+
"ruleId" : "java:S101",
100+
"ruleIndex" : -1,
101+
"kind" : "fail",
102+
"level" : "warning",
103+
"message" : {
104+
"text" : "Rename this class name to match the regular expression '^[A-Z][a-zA-Z0-9]*$'."
105+
},
106+
"locations" : [ {
107+
"id" : -1,
108+
"physicalLocation" : {
109+
"artifactLocation" : {
110+
"uri" : "guava:src/com/google/common/hash/Murmur3_128HashFunction.java",
111+
"index" : -1
112+
},
113+
"region" : {
114+
"startLine" : 80,
115+
"startColumn" : 30,
116+
"endLine" : 80,
117+
"endColumn" : 47,
118+
"charOffset" : 2172,
119+
"charLength" : 17,
120+
"byteOffset" : 2172,
121+
"byteLength" : 17
122+
}
123+
}
124+
} ],
125+
"rank" : -1.0
126+
}, {
127+
"ruleId" : "java:S101",
128+
"ruleIndex" : -1,
129+
"kind" : "fail",
130+
"level" : "warning",
131+
"message" : {
132+
"text" : "Rename this class name to match the regular expression '^[A-Z][a-zA-Z0-9]*$'."
133+
},
134+
"locations" : [ {
135+
"id" : -1,
136+
"physicalLocation" : {
137+
"artifactLocation" : {
138+
"uri" : "guava:src/com/google/common/hash/Murmur3_32HashFunction.java",
139+
"index" : -1
140+
},
141+
"region" : {
142+
"startLine" : 47,
143+
"startColumn" : 13,
144+
"endLine" : 47,
145+
"endColumn" : 35,
146+
"charOffset" : 1443,
147+
"charLength" : 22,
148+
"byteOffset" : 1443,
149+
"byteLength" : 22
150+
}
151+
}
152+
} ],
153+
"rank" : -1.0
154+
}, {
155+
"ruleId" : "java:S101",
156+
"ruleIndex" : -1,
157+
"kind" : "fail",
158+
"level" : "warning",
159+
"message" : {
160+
"text" : "Rename this class name to match the regular expression '^[A-Z][a-zA-Z0-9]*$'."
161+
},
162+
"locations" : [ {
163+
"id" : -1,
164+
"physicalLocation" : {
165+
"artifactLocation" : {
166+
"uri" : "guava:src/com/google/common/hash/Murmur3_32HashFunction.java",
167+
"index" : -1
168+
},
169+
"region" : {
170+
"startLine" : 155,
171+
"startColumn" : 30,
172+
"endLine" : 155,
173+
"endColumn" : 46,
174+
"charOffset" : 3856,
175+
"charLength" : 16,
176+
"byteOffset" : 3856,
177+
"byteLength" : 16
178+
}
179+
}
180+
} ],
181+
"rank" : -1.0
182+
} ],
183+
"newlineSequences" : [ "\r\n", "\n" ],
184+
"columnKind" : "utf16CodeUnits"
185+
} ]
186+
}

‎its/ruling/src/test/resources/expected/guava/java-S103.sarif‎

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -11,35 +11,7 @@
1111
}
1212
},
1313
"language" : "en-US",
14-
"results" : [ {
15-
"ruleId" : "java:S103",
16-
"ruleIndex" : -1,
17-
"kind" : "fail",
18-
"level" : "warning",
19-
"message" : {
20-
"text" : "Split this 48,941 characters long line (which is greater than 120 authorized)."
21-
},
22-
"locations" : [ {
23-
"id" : -1,
24-
"physicalLocation" : {
25-
"artifactLocation" : {
26-
"uri" : "guava:src/com/google/thirdparty/publicsuffix/PublicSuffixPatterns.java",
27-
"index" : -1
28-
},
29-
"region" : {
30-
"startLine" : 45,
31-
"startColumn" : 1,
32-
"endLine" : 45,
33-
"endColumn" : 48942,
34-
"charOffset" : 1558,
35-
"charLength" : 48941,
36-
"byteOffset" : 1558,
37-
"byteLength" : 50040
38-
}
39-
}
40-
} ],
41-
"rank" : -1.0
42-
}, {
14+
"results" : [{
4315
"ruleId" : "java:S103",
4416
"ruleIndex" : -1,
4517
"kind" : "fail",

0 commit comments

Comments
 (0)