Skip to content

Commit

Permalink
"Update yamllint target to handle missing dist/chart"
Browse files Browse the repository at this point in the history
  • Loading branch information
sarthaksarthak9 committed Jan 26, 2025
1 parent 1931248 commit dc77bae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
1 change: 1 addition & 0 deletions .github/workflows/lint-sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,4 @@ jobs:
- name: Run linter via makefile target
working-directory: ${{ matrix.folder }}
run: make lint

7 changes: 1 addition & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -113,19 +113,14 @@ lint-config: golangci-lint ## Verify golangci-lint linter configuration
yamllint:
@files=$$(find testdata -name '*.yaml' ! -path 'testdata/*/dist/*' -o -path 'testdata/*/dist/chart/*.yaml' ! -path 'testdata/*/dist/chart/install.yaml'); \
docker run --rm $$(tty -s && echo "-it" || echo) -v $(PWD):/data cytopia/yamllint:latest $$files -d "{extends: relaxed, rules: {line-length: {max: 120}}}" --no-warnings

GOLANGCI_LINT = $(shell pwd)/bin/golangci-lint
golangci-lint:
@[ -f $(GOLANGCI_LINT) ] || { \
set -e ;\
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell dirname $(GOLANGCI_LINT)) v1.63.4 ;\
}

.PHONY: yamllint-chart
yamllint-chart:
@files=$$(find testdata/project-v4-with-plugins/dist/chart -name '*.yaml'); \
docker run --rm $$(tty -s && echo "-it" || echo) -v $(PWD):/data cytopia/yamllint:latest $$files -d "{extends: relaxed, rules: {line-length: {max: 120}}}" --no-warnings

.PHONY: apidiff
apidiff: go-apidiff ## Run the go-apidiff to verify any API differences compared with origin/master
$(GOBIN)/go-apidiff master --compare-imports --print-compatible --repo-path=.
Expand Down

0 comments on commit dc77bae

Please sign in to comment.