Skip to content

Overcommit treating entire repository as modified #855

@mbajur

Description

@mbajur

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions