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

Switch to using git-clang-format for make format #165

Merged
merged 2 commits into from
Oct 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@
#### If the related Github issues aren't referenced in your commits, please link to them here.

#### I have,
* [ ] updated CHANGELOG.md
* [ ] updated `CHANGELOG.md`
* [ ] updated the documentation
* [ ] run `make format` on each commit
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,7 @@ teletype.zip: clean-zip
docs/cheatsheet/cheatsheet.pdf

format:
git-clang-format -f --style=file

format-all:
find . -type f -name "*.c" -o -name "*.h" | xargs clang-format -style=file -i
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ There is a test that checks to see if the above have all been entered correctly.

## Code Formatting

To format the code using `clang-format`, run `make format` in the project's root directory. This *shouldn't* format any code in the `libavr32` submodule.
To format the code using `clang-format`, run `make format` in the project's root directory. This will _only_ format code that has not been commited, it will format _both_ staged and unstaged code.

To format all the code in this repo, run `make format-all`.

[libavr32]: https://github.com/monome/libavr32
[ragel]: http://www.colm.net/open-source/ragel/
Expand Down