nccgroup / sobelow

Security-focused static analysis for the Phoenix Framework
Apache License 2.0
1.66k stars 92 forks source link

Update GitHub workflow #156

Closed iarekk closed 6 months ago

iarekk commented 6 months ago

Several changes:

  1. Add elixir 1.16.x / OTP 26.2 to the matrix.
  2. Upgrade credo to 1.7.4. Reason: Credo 1.7.0 issues a huge number of warnings about itself when compiled with Elixir 1.6.x, update to 1.7.4 fixes it. Some discussion in the Credo repo here: https://github.com/rrrene/credo/pull/1085
  3. Address the newly-appeared credo warnings, all of which had the following structure:
    ┃ [R] ↗ Predicate function names should not start with 'is', and should end in a question mark.
    ┃       lib/sobelow/utils.ex:10:7 #(Sobelow.Utils.is_router?)

    The change is to rename functions such as is_router? to router?

iarekk commented 6 months ago

Potentially this fixes #152. Happy to break down the PR into smaller chunks if needed!

iarekk commented 6 months ago

https://hexdocs.pm/credo/Credo.Check.Readability.PredicateFunctionNames.html and this is the new Credo check that was breaking the builds after upgrading to 1.7.4

houllette commented 6 months ago

Hey @iarekk - thank you so much for this QoL PR, really appreciate the assistance!

This is a pretty sizable update, so your dedication to fixing all the credo warnings is really awesome - normally I'd prefer to break this PR up a bit (one for the GitHub Action change, one for the credo bump), but I think it makes sense in this case plus the work is already done and all working together harmoniously / passing checks. So we're good to go here!

iarekk commented 6 months ago

Thank you @houllette! I'm very happy to help the project – and will definitely keep the PRs smaller nex time 😄