-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace govuk-lint with rubocop-govuk #218
Merged
Merged
Conversation
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
7d9f9a2
to
c48c923
Compare
ollietreend
approved these changes
Feb 1, 2022
GOV.UK chanaged linting gem a few years ago. Changing the linting tool used here too, to ensure this gem remains consistent.
This is a default configuration for a gem used on GOV.UK.
This resolved the majority of the linting failures following the replacement of govuk-lint with rubocop-govuk.
d9919c8
to
1cf2b4f
Compare
This fixes Gemspec/RequiredRubyVersion linting failure.
This fixes the Rake/DuplicateTask linting failure.
This fixes the Style/ClassVars linting failure.
This resolves the Rake/Desc linting failure.
This will require the lint to run as part of the default build.
This keeps the rake tasks in a consistent location and allows us to use the `load_tasks` helper instead of finding every file.
1cf2b4f
to
ca1c77e
Compare
brucebolt
added a commit
that referenced
this pull request
Feb 2, 2022
This is specified in the developer documentation [1] but was missed in the previous PR [2]. 1: https://docs.publishing.service.gov.uk/manual/configure-linting.html#linting-ruby 2: #218
ollietreend
added a commit
that referenced
this pull request
Feb 2, 2022
A change made in in #218 to the Rakefile resulted in RSpec tests inadvertently being run twice with `bundle exec rake`. This commit changes the `:default` Rake task so that the RSpec test suite is only run once. It uses the same approach as that used in [contacts-admin](https://github.com/alphagov/contacts-admin/blob/3d190f9541e04a56d7c819da9334820237ea7ac9/Rakefile#L4-L7).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
govuk-lint
was deprecated in 2019. We should therefore switch this gem to use the current linter, which isrubocop-govuk
.This makes that switch and fixes the issues identified by rubocop.