Skip to content

Commit

Permalink
change cop_name to linter
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelpuyol committed Jul 2, 2021
1 parent 13a255a commit cdb73dc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion lib/erb_lint/reporters/json_reporter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def formatted_offenses(offenses)

def format_offense(offense)
{
cop_name: offense.linter.class.simple_name,
linter: offense.linter.class.simple_name,
message: offense.message.to_s,
location: {
start_line: offense.line_number,
Expand Down
24 changes: 12 additions & 12 deletions spec/erb_lint/reporters/json_reporter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
files: [{
path: 'app/views/subscriptions/_loader.html.erb',
offenses: [{
cop_name: 'SpaceInHtmlTag',
linter: 'SpaceInHtmlTag',
message: 'Extra space detected where there should be no space.',
location: {
start_line: 1,
Expand All @@ -69,17 +69,17 @@
length: 2,
},
},
{
cop_name: 'ClosingErbTagIndent',
message: 'Remove newline before `%>` to match start of tag.',
location: {
start_line: 52,
start_column: 10,
last_line: 54,
last_column: 10,
length: 10,
},
}],
{
linter: 'ClosingErbTagIndent',
message: 'Remove newline before `%>` to match start of tag.',
location: {
start_line: 52,
start_column: 10,
last_line: 54,
last_column: 10,
length: 10,
},
}],
}],
summary: {
offenses: 2,
Expand Down

0 comments on commit cdb73dc

Please sign in to comment.