-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(code-style): adds staged make code style targets
- Loading branch information
1 parent
03dcb65
commit cf8315a
Showing
6 changed files
with
25 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
MODULES ?= go \ | ||
ts | ||
|
||
.PHONY: code-style-staged | ||
code-style-staged: $(patsubst %, code-style-staged-%,$(MODULES)) | ||
|
||
.PHONY: code-style-staged-ts | ||
code-style-staged-ts: $(AKASH_TS_NODE_MODULES) | ||
ts/node_modules/.bin/lint-staged --cwd ts | ||
|
||
.PHONY: code-style-staged-go | ||
code-style-staged-go: | ||
script/gofmt-staged.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/usr/bin/env bash | ||
|
||
for file in $(git diff --cached --name-only --diff-filter=ACMRTUXB | grep "\.go$") | ||
do | ||
echo "(gofmt) $file" | ||
gofmt -w $file | ||
git add "$file" | ||
done |
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters