Skip to content

check-added-large-files does not check files when run in a CI loop #518

Closed
@mshawcroft

Description

@mshawcroft

check-added-large-files works as expected when executed as a pre-commit hook, but when executed in a CI loop via run --all-files it does not diagnose over size files. This appears to be because the list of files provided on the command line is filtered to remove files that are not reported as staged for addition by git diff. Hence if a developer chooses not to install pre-commit as a git hook and adds an over size file, this will not subsequently be picked up by pre-commit running in CI.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions