From 5667978e7bfc0e5d0e7f987ef14f99d75b967d14 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 15 Mar 2021 12:12:31 +0100 Subject: [PATCH] style: use astyle instead of indent --- .astylerc | 9 +++++++++ .github/workflows/lint.yml | 2 +- Makefile | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 .astylerc diff --git a/.astylerc b/.astylerc new file mode 100644 index 00000000..69115f0b --- /dev/null +++ b/.astylerc @@ -0,0 +1,9 @@ +lineend=linux +style=linux +indent=spaces=8 +convert-tabs +min-conditional-indent=0 +max-instatement-indent=120 +align-pointer=name +max-code-length=120 + diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 973fdcb8..135b7bdd 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -14,7 +14,7 @@ jobs: - uses: actions/checkout@v2 - name: install tools - run: sudo apt-get install indent + run: sudo apt-get install astyle - name: indent run: make indent-c diff --git a/Makefile b/Makefile index a04184a5..c3fbd95b 100644 --- a/Makefile +++ b/Makefile @@ -94,7 +94,7 @@ dracut-util: util/util .PHONY: indent-c indent-c: - indent -i8 -nut -br -linux -l120 $(wildcard *.[ch] */*.[ch]) + astyle -n --quiet --options=.astylerc $(wildcard *.[ch] */*.[ch]) .PHONY: indent indent: indent-c