Skip to content

Commit

Permalink
Specify a code style via clang-format --style=webkit
Browse files Browse the repository at this point in the history
clang-format --style=webkit is closest to the current style. Most
notably, `calling_a_function ( "has more spaces now" )` than
`calling_a_function("would have in this change")`

Let me know what you think. The files were changed with `make lint`.
  • Loading branch information
motiejus committed May 3, 2024
1 parent 5586625 commit d2ad09f
Show file tree
Hide file tree
Showing 4 changed files with 331 additions and 315 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ concurrency:
cancel-in-progress: true
jobs:

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: sudo apt-get install -y make clang-format
- run: make lint
- run: git diff --exit-code

build-with-gcc:
strategy:
matrix:
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ $(ODIR)/%.o: %.cpp Makefile
@$(MKDIR) $(dir $@)
$(VERBOSE_PREFIX)$(CXX) -MMD -MP -std=c++11 $(CFLAGS) $(CXXFLAGS) -o $@ -c $<

.PHONY: lint
lint:
clang-format -i --style=webkit **/*.h **/*.c

.PHONY: clean

clean:
Expand Down
Loading

0 comments on commit d2ad09f

Please sign in to comment.