Skip to content

[git-clang-format] Unknown command line argument '-list-ignored' #108099

@edenreich

Description

@edenreich

Summary

I was thinking to use git-clang-format on a project and I encounter some issues. IDK, maybe I'm missing something silly.

The error

Executing git-clang-format on a git project gives the following error:

`clang-format -list-ignored` returned 1
clang-format: Unknown command line argument '-list-ignored'.  Try: 'clang-format --help'
clang-format: Did you mean '--lines'?

Steps to reproduce

Tested on Ubuntu 22.04:

  1. Run a container based on ubuntu 22.04: docker run --rm -it -v $(pwd):/code -w /code ubuntu:22.04 bash
  2. Install dependencies: apt-get update && apt-get install -y git curl clang-format python3
  3. Download the extension: curl -sSL https://raw.githubusercontent.com/llvm/llvm-project/main/clang/tools/clang-format/git-clang-format > /usr/local/bin/git-clang-format && chmod +x /usr/local/bin/git-clang-format
  4. Run it: git-clang-format or git clang-format

What am I missing ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang-formatquestionA question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions