Skip to content

Commit

Permalink
Add linting
Browse files Browse the repository at this point in the history
  • Loading branch information
mackoj committed Dec 14, 2019
1 parent 9a689ac commit 6099706
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
5 changes: 4 additions & 1 deletion .githooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ elif ! [ -x "$(command -v swift-format)" ]; then
cp .build/release/generate-pipeline /Applications/Xcode.app/Contents/Developer/usr/bin
ln -s /Applications/Xcode.app/Contents/Developer/usr/bin/generate-pipeline /usr/local/bin/generate-pipeline
else
git diff --diff-filter=d --cached --name-only | grep -E '\.(swift)$' | xargs -I{} swift-format -m format -r --configuration .swift-format -i {}
echo "Linting..."
git diff --diff-filter=d --cached --name-only | grep -E '\.(swift)$' | xargs -I{} swift-format -m lint --configuration .swift-format -i {}
echo "Auto-Formatting..."
git diff --diff-filter=d --cached --name-only | grep -E '\.(swift)$' | xargs -I{} swift-format -m format -r --configuration .swift-format -i {}
fi

#
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ init:
build:
swift build

reformat:
format:
swift-format -m format --configuration .swift-format -r -i Sources

lint:
Expand Down
3 changes: 2 additions & 1 deletion TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## P0
- [ ] Add missing tests
- [ ] Remove all the warnings

## P1
- [ ] Code Documentation
Expand All @@ -11,5 +12,5 @@
## P2
- [ ] Code of conduct
- [ ] PR Boiler plate
- [ ] Auto review ?
- [ ] Auto review
- [ ] Dr String

0 comments on commit 6099706

Please sign in to comment.