Skip to content

Commit

Permalink
Add .clang-format config and makefile targets
Browse files Browse the repository at this point in the history
  • Loading branch information
IrneRacoonovich committed Aug 26, 2024
1 parent 95ddb83 commit 8f7e740
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
BasedOnStyle: Webkit

Language: Cpp
AlignAfterOpenBracket: Align
AllowShortEnumsOnASingleLine: true

IncludeBlocks: Regroup
IncludeCategories:
- Regex: '^".+\.(h|hh|hpp|hxx)"$'
Priority: 1
- Regex: '^<.+\.(h|hh|hpp|hxx)>$'
Priority: 2
- Regex: '^<[^.]+>$'
Priority: 3
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,11 @@ $(BUILD):
clean:
@rm -fr $(BUILD) $(TARGET).ovl $(TARGET).nro $(TARGET).nacp $(TARGET).elf

formatcheck:
clang-format --Werror --dry-run source/*

codeformat:
clang-format -i source/*
#---------------------------------------------------------------------------------
else
.PHONY: all
Expand Down

0 comments on commit 8f7e740

Please sign in to comment.