Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for specifying ignore rules in .clang-format-ignore file using gitignore syntax #87

Merged
merged 12 commits into from
Dec 31, 2023
6 changes: 6 additions & 0 deletions .clang-format-ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.git
build
emsdk
node_modules
target
vendor
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:

- name: Run locally with npx and inferred target directory
if: runner.os != 'Windows'
run: npx -p .. clang-format --check
run: npx -p .. clang-format --check --ignore-path ../.clang-format-ignore
working-directory: "artichoke-integration-test"

js:
Expand Down
8 changes: 2 additions & 6 deletions bin/clang-format.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
#!/usr/bin/env node

"use strict";
import main from "../src/cli.js";

const main = require("../src/cli");

(async () => {
await main();
})();
await main();
Loading