Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1628 from alphagov/sync-with-rubocop-govuk
Sync .rubocop.yml with RuboCop GOV.UK
- Loading branch information
Showing
27 changed files
with
325 additions
and
343 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,17 @@ | ||
AllCops: | ||
Exclude: | ||
- 'tmp/**/*' | ||
|
||
Lint/SuppressedException: | ||
Exclude: | ||
- 'spec/**/*' | ||
|
||
Naming/VariableNumber: | ||
Exclude: | ||
- 'spec/models/manual_spec.rb' | ||
|
||
Style/FormatStringToken: | ||
Exclude: | ||
- 'lib/tasks/rebuild_major_publication_logs_for_manuals.rake' | ||
|
||
Style/RedundantReturn: | ||
Exclude: | ||
- 'app/models/manual.rb' | ||
|
||
inherit_gem: | ||
rubocop-govuk: | ||
- config/default.yml | ||
- config/rails.yml | ||
|
||
inherit_mode: | ||
merge: | ||
- Exclude | ||
|
||
# This is not supported for Mongoid | ||
Rails/DynamicFindBy: | ||
Whitelist: | ||
- find_by_slug! | ||
|
||
# This is not supported for Mongoid | ||
Rails/FindBy: | ||
Enabled: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,10 @@ | ||
if User.where(name: "Test user").present? | ||
puts "Skipping because user already exists" | ||
exit | ||
end | ||
|
||
gds_organisation_id = "af07d5a5-df63-4ddc-9383-6a666845ebe9" | ||
if User.where(name: "Test user").blank? | ||
gds_organisation_id = "af07d5a5-df63-4ddc-9383-6a666845ebe9" | ||
|
||
User.create!( | ||
name: "Test user", | ||
permissions: %w[signin gds_editor], | ||
organisation_content_id: gds_organisation_id, | ||
organisation_slug: "test-organisation", | ||
) | ||
User.create!( | ||
name: "Test user", | ||
permissions: %w[signin gds_editor], | ||
organisation_content_id: gds_organisation_id, | ||
organisation_slug: "test-organisation", | ||
) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
desc "Run rubocop-govuk with similar params to CI" | ||
task "lint" do | ||
task lint: :environment do | ||
sh "bundle exec rubocop" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.