Skip to content

Print details which file caused pre-commit run -a failed #77

Closed
@shenxianpeng

Description

@shenxianpeng

Right now, I encounter an issue when running pre-commit run -a with the following config

repos:
  - repo: https://github.com/cpp-linter/cpp-linter-hooks
    rev: v0.8.1  # Use the tag or commit you want
    hooks:
      - id: clang-format
        args: [--style=file, --version=18]   # Loads style from .clang-format file

And the error is

Failed
- hook id: clang-format
- exit code: 247
- files were modified by this hook

It looks like the exit code comes from clang-format executable.

no much details information, even I passed -v option to pre-commit. It increases pre-commit verbosity, not clang-format verbosity.

Check the clang-format --help, it supports --verbose - If set, shows the list of processed files

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