Format.cmake icon indicating copy to clipboard operation
Format.cmake copied to clipboard

Exclude paths/files from being formatted

Open carun opened this issue 8 months ago • 5 comments
trafficstars

We use kind of mono repo and thus our repo consists of a mix of languages such as C++, Python, Go and Java. The tree is somewhat akin to this.

How do we exclude certain paths and files from being formatted? Alternatively, is there a way to include only certain paths?

$ tree -a
.
├── .clang-format
├── .cmake-format
├── CMakeLists.txt
├── cpp1
│   └── main.cpp
├── cpp2
│   └── main.cpp
├── go1
│   └── main.go
├── go2
│   └── main.go
├── java1
│   └── Main.java
├── java2
│   └── Main.java
├── proto
│   ├── Message.proto
│   └── Service.proto
├── python1
│   └── main.py
└── python2
    └── main.py

carun avatar Mar 12 '25 20:03 carun