Skip to content

Commit

Permalink
Disable some Style cops inline
Browse files Browse the repository at this point in the history
  • Loading branch information
esoterik committed Mar 26, 2021
1 parent e245d5a commit 44366a8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
12 changes: 0 additions & 12 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,18 +155,6 @@ Style/ClassAndModuleChildren:
- 'app/models/ahoy/event.rb'
- 'lib/monkey_patches/octet_stream_override.rb'

# Offense count: 1
Style/DoubleNegation:
Exclude:
- 'app/models/source_file.rb'

# Offense count: 1
# Configuration parameters: EnforcedStyle.
# SupportedStyles: annotated, template, unannotated
Style/FormatStringToken:
Exclude:
- 'spec/requests/admin/events_spec.rb'

# Offense count: 17
# Configuration parameters: MinBodyLength.
Style/GuardClause:
Expand Down
2 changes: 2 additions & 0 deletions app/models/source_file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ def to_jq_upload
end

def is_image? # rubocop:todo Naming/PredicateName
# rubocop:todo Style/DoubleNegation
!!file_content_type.try(:match, /image/)
# rubocop:enable Style/DoubleNegation
end

#---- start S3 related methods -----
Expand Down
2 changes: 2 additions & 0 deletions spec/requests/admin/events_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@

# Default is to return data for the previous month.
expect(JSON.parse(response.body).keys)
# rubocop:todo Style/FormatStringToken
.to include(*(1..31).map { |i| format("Dec %d 2018", i) })
# rubocop:enable Style/FormatStringToken
end

it "filters by date" do
Expand Down

0 comments on commit 44366a8

Please sign in to comment.