@@ -17,21 +17,21 @@ defmodule Credo.CLI.Output.Formatter.SARIF do
17
17
18
18
final_rules =
19
19
issues
20
- |> Enum . uniq_by ( & & 1 . check . id )
20
+ |> Enum . uniq_by ( & & 1 . check . id ( ) )
21
21
|> Enum . map ( fn issue ->
22
22
% {
23
- "id" => issue . check . id ,
23
+ "id" => issue . check . id ( ) ,
24
24
"name" => Credo.Code.Name . full ( issue . check ) ,
25
25
"fullDescription" => % {
26
- "text" => issue . check . explanation |> String . replace ( "`" , "'" ) ,
27
- "markdown" => issue . check . explanation
26
+ "text" => issue . check . explanation ( ) |> String . replace ( "`" , "'" ) ,
27
+ "markdown" => issue . check . explanation ( )
28
28
} ,
29
29
"properties" => % {
30
30
"tags" => [
31
31
issue . category
32
32
]
33
33
} ,
34
- "helpUri" => issue . check . docs_uri
34
+ "helpUri" => issue . check . docs_uri ( )
35
35
}
36
36
end )
37
37
@@ -158,21 +158,21 @@ defmodule Credo.CLI.Output.Formatter.SARIF do
158
158
159
159
rule_and_issue = {
160
160
% {
161
- "id" => issue . check . id ,
161
+ "id" => issue . check . id ( ) ,
162
162
"name" => Credo.Code.Name . full ( issue . check ) ,
163
163
"fullDescription" => % {
164
- "text" => issue . check . explanation |> String . replace ( "`" , "'" ) ,
165
- "markdown" => issue . check . explanation
164
+ "text" => issue . check . explanation ( ) |> String . replace ( "`" , "'" ) ,
165
+ "markdown" => issue . check . explanation ( )
166
166
} ,
167
167
"properties" => % {
168
168
"tags" => [
169
169
issue . category
170
170
]
171
171
} ,
172
- "helpUri" => issue . check . docs_uri
172
+ "helpUri" => issue . check . docs_uri ( )
173
173
} ,
174
174
% {
175
- "ruleId" => issue . check . id ,
175
+ "ruleId" => issue . check . id ( ) ,
176
176
"level" => sarif_level ,
177
177
"rank" => priority_to_sarif_rank ( issue . priority ) ,
178
178
"message" => % {
@@ -208,7 +208,7 @@ defmodule Credo.CLI.Output.Formatter.SARIF do
208
208
rule_and_issue
209
209
|> remove_nil_endcolumn ( ! column_end )
210
210
|> remove_warning_level ( sarif_level == :warning )
211
- |> remove_redundant_name ( issue . check . id == Credo.Code.Name . full ( issue . check ) )
211
+ |> remove_redundant_name ( issue . check . id ( ) == Credo.Code.Name . full ( issue . check ) )
212
212
end
213
213
214
214
defp remove_nil_endcolumn ( sarif , false ) , do: sarif
0 commit comments