Skip to content
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

Overcommit treating entire repository as modified #855

Open
mbajur opened this issue Sep 1, 2024 · 0 comments
Open

Overcommit treating entire repository as modified #855

mbajur opened this issue Sep 1, 2024 · 0 comments

Comments

@mbajur
Copy link

mbajur commented Sep 1, 2024

Hey! I'm trying to enable overcommit with rubocop for my repository and here is my config:

PreCommit:
 RuboCop:
   enabled: true
   command: ['bundle', 'exec', 'rubocop']
   problem_on_unmodified_line: warn

And the problem is, even though .overcommit.yml file is the only modified file in that branch, running overcommit --run is giving me rubocop errors (and makes overcommit rubocop step fail) for every single rubocop violation on my branch/repo. It's like problem_on_unmodified_line: warn line is being ignored and full rubocop check is being triggered for my repo. I would expect it to indeed list these violations but in an "unmodified lines" section of the output and not make entire step fail but maybe I misunderstand something?

image

I'm on overcommit 0.64.0 / rubocop 1.57.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant