Skip to content

Commit

Permalink
makefile: add yamllint target
Browse files Browse the repository at this point in the history
  • Loading branch information
cbang-akamai committed May 23, 2024
1 parent 3f2f5f5 commit 2832283
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/build_test_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ jobs:
if: ${{ needs.changes.outputs.src == 'true' }}
steps:
- uses: actions/checkout@v4
- name: Validate YAML file
run: yamllint templates

- name: Lint YAML
run: make yamllint

go-build-test:
runs-on: ubuntu-latest
Expand Down
11 changes: 9 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ vet: ## Run go vet against code.
gosec: ## Run gosec against code.
docker run --rm -w /workdir -v $(PWD):/workdir securego/gosec:2.19.0 -exclude-dir=bin -exclude-generated ./...

.PHONY: lint
lint: ## Run lint against code.
.PHONY: golint
golint: ## Run lint against code.
docker run --rm -w /workdir -v $(PWD):/workdir golangci/golangci-lint:v1.57.2 golangci-lint run -c .golangci.yml --fix

.PHONY: nilcheck
Expand All @@ -130,6 +130,13 @@ nilcheck: nilaway ## Run nil check against code.
vulncheck: govulncheck ## Run vulnerability check against code.
govulncheck ./...

.PHONY: lint
lint: yamllint golint

.PHONY: yamllint
yamllint: ## Run lint against manifests.
docker run --rm -w /data -v $(PWD):/data cytopia/yamllint:alpine-1 templates

.PHONY: docs
docs:
@cd docs && mdbook serve -n $(MDBOOK_DEV_HOST) -p $(MDBOOK_DEV_PORT)
Expand Down

0 comments on commit 2832283

Please sign in to comment.