Skip to content

Commit

Permalink
Run brakeman checks in local build
Browse files Browse the repository at this point in the history
This is already running as part of the CI build [1] and I've been caught
out before when the local build passed, but the CI build failed which is
sub-optimal. I copied the actual command from the one that runs in the
CI build [2].

Adding this to the `lint` rake task means that it will run when you run
the default rake task locally, but it won't run twice in CI, because the
latter doesn't run the default rake task.

[1]: https://github.com/alphagov/signon/blob/acae02f346e3880368f47622fcad2aa80558eb42/.github/workflows/ci.yml#L14-L16
[2]: https://github.com/alphagov/govuk-infrastructure/blob/6b6fe37cfd6af8ef57eff983e4356e96f7b3fd14/.github/workflows/brakeman.yml#L20C14-L20C71
  • Loading branch information
floehopper committed Nov 1, 2023
1 parent c059d41 commit 229dcc9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/tasks/lint.rake
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
desc "Run all linters"
task lint: :environment do
sh "yarn run lint"
sh "bundle exec brakeman . --except CheckRenderInline --quiet"
sh "bundle exec rubocop"
end

0 comments on commit 229dcc9

Please sign in to comment.