Skip to content

Commit

Permalink
chore: format using Make (#1022)
Browse files Browse the repository at this point in the history
Co-authored-by: ory-bot <60093411+ory-bot@users.noreply.github.com>
  • Loading branch information
kevgo and ory-bot authored Sep 22, 2022
1 parent 3fadc8f commit 8ad039f
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 27 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ jobs:
go-version: 1.19
- name: Lint buf
run: make buf-lint
- name: check prettier format
run: npm ci && npm run format:check
- run: go list -json > go.list
- name: Run nancy
uses: sonatype-nexus-community/nancy-github-action@v1.0.2
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Format

on:
pull_request:
push:

jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.19
- run: make format
- name: Indicate formatting issues
run: git diff HEAD --exit-code --color
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ $(foreach dep, $(BREW_DEPENDENCIES), $(eval $(call make-brew-dependency,$(dep)))
tools/protobuf: tools/brew Makefile
HOMEBREW_NO_AUTO_UPDATE=1 brew install protobuf@3.19

node_modules: package.json package-lock.json Makefile
node_modules: package-lock.json
npm ci
touch node_modules

.PHONY: tools/brew
tools/brew:
Expand All @@ -54,7 +55,7 @@ tools/brew:
.PHONY: format
format: tools/goimports node_modules
goimports -w -local github.com/ory/keto *.go internal cmd contrib ketoctx ketoapi embedx
npm run format
npm exec -- prettier --write .

.PHONY: install
install:
Expand Down
10 changes: 5 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
},
"scripts": {
"doctoc": "doctoc README.md",
"format": "prettier --write .",
"format:check": "prettier --check .",
"openapi-generator-cli": "openapi-generator-cli"
},
"prettier": "ory-prettier-styles",
Expand All @@ -22,7 +20,7 @@
"doctoc": "^2.0.1",
"opencollective": "^1.0.3",
"ory-prettier-styles": "^1.2.0",
"prettier": "^2.7.1",
"prettier": "2.7.1",
"prettier-plugin-packagejson": "^2.2.18"
},
"collective": {
Expand Down
9 changes: 5 additions & 4 deletions proto/ory/keto/relation_tuples/v1alpha2/check_service.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 5 additions & 6 deletions proto/ory/keto/relation_tuples/v1alpha2/read_service.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions proto/ory/keto/relation_tuples/v1alpha2/relation_tuples.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8ad039f

Please # to comment.