Issue 114969
Summary clang-format continues to recurse into directories listed in .clang-format-ignore
Labels clang-format
Assignees
Reporter synco
    Create a directory with a sub-directory. If we add the directory into the ignore list, clang-format will recurse into the sub-directory.

Version: Ubuntu clang-format version 18.1.8 (++20240731024944+3b5b5c1ec4a3-1-exp1-20240731145000.144)

Recreate the directory structure, files, and execute clang-format:
`
mkdir -p level1/level2 && touch foo.c level1/bar.c level1/level2/bang.c && tree && echo 'level1/*' > .clang-format-ignore && shopt -s globstar && clang-format --verbose **/*
`
Result, it correctly ignores the file in level1 (bar.c), however continues to recurse into level2 (bang.c) which is not expected.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to