Skip to content

Commit

Permalink
Update custom linter demo, following Shopify#69
Browse files Browse the repository at this point in the history
  • Loading branch information
muan committed Jan 29, 2019
1 parent 04dad0e commit fbd658c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -395,16 +395,14 @@ module ERBLint
end
self.config_schema = ConfigSchema
def offenses(processed_source)
errors = []
def run(processed_source)
unless processed_source.file_content.include?('this file is fine')
errors << Offense.new(
add_offense(
self,
processed_source.to_source_range(0 ... processed_source.file_content.size),
"This file isn't fine. #{@config.custom_message}"
)
end
errors
end
end
end
Expand Down

0 comments on commit fbd658c

Please sign in to comment.