Skip to content

Overcommit swallows non-error output from pronto #754

@Drowze

Description

@Drowze

Hello guys! 👋

First of all, thanks for the amazing project! It has helped me a lot through the last few years 😄

I am now trying to use Overcommit along with PrePush Pronto checks - which is working great for when there's actual errors flagged by pronto. However when there's no error and only info messages, Overcommit does not display them. This is less than ideal as I would love to be able to display some suggestions (which don't fail the action) when the git-hooks are triggered.

I expected that the "quiet" option would be responsible for it, but I couldn't get it to work as desired.

⋊> ~/w/o/sts on test-branch ⨯ tail -n15 .overcommit.yml
PrePush:
  Pronto:
    enabled: true
    quiet: false
    description: Analyzing with Pronto (brakeman, fasterer, flay, reek and rubocop)
    flags:
      - run
      - --exit-code
      - --commit=qa
      - --runner
      - brakeman
      - fasterer
      - flay
      - reek
      - rubocop

⋊> ~/w/o/sts on test-branch ⨯ overcommit --install
Installing hooks into /Users/OH-RGIBIN/workspace/org/sts
Successfully installed hooks into /Users/OH-RGIBIN/workspace/org/sts

⋊> ~/w/o/sts on test-branch ⨯ be pronto run --exit-code --commit=qa --runner brakeman rubocop reek flay fasterer
Running Pronto::Brakeman
Running Pronto::Rubocop
Running Pronto::Reek
Running Pronto::Flay
Running Pronto::Fasterer
app/models/shipment.rb:163 I: Calls 'loc.type' 3 times - [DuplicateMethodCall](https://github.com/troessner/reek/blob/v6.0.4/docs/Duplicate-Method-Call.md)
app/models/shipment.rb:163 I: Refers to 'loc' more than self (maybe move it to another class?) - [FeatureEnvy](https://github.com/troessner/reek/blob/v6.0.4/docs/Feature-Envy.md)

⋊> ~/w/o/sts on test-branch ⨯ git push --dry-run origin HEAD
Running pre-push hooks
Analyzing with Pronto (brakeman, fasterer, flay, reek and rubocop)[Pronto] OK

✓ All pre-push hooks passed

To github.com:Org/sts
 * [new branch]        HEAD -> test-branch

Is there any workaround for this?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions