Skip to content

Commit 346896e

Browse files
committed
update yamllint to now be run via Makefile
Signed-off-by: Bryce Palmer <[email protected]>
1 parent 787b588 commit 346896e

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

.github/workflows/lint.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,5 @@ jobs:
5555
runs-on: ubuntu-latest
5656
steps:
5757
- uses: actions/checkout@v3
58-
- name: yaml-lint
59-
uses: ibiqlik/action-yamllint@v3
60-
with:
61-
file_or_dir: testdata
62-
config_data: "{extends: relaxed, rules: {line-length: {max: 120}}}"
58+
- name: Run yamllint make target
59+
run: make yamllint

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ lint: golangci-lint ## Run golangci-lint linter
7979
lint-fix: golangci-lint ## Run golangci-lint linter and perform fixes
8080
$(GOLANGCI_LINT) run --fix
8181

82+
.PHONY: yamllint
83+
yamllint:
84+
@docker run --rm $$(tty -s && echo "-it" || echo) -v $(PWD):/data cytopia/yamllint:latest testdata -d "{extends: relaxed, rules: {line-length: {max: 120}}}" --no-warnings
85+
8286
GOLANGCI_LINT = $(shell pwd)/bin/golangci-lint
8387
golangci-lint:
8488
@[ -f $(GOLANGCI_LINT) ] || { \

testdata/project-v3-declarative-v1/config/manager/manager.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ spec:
3737
control-plane: controller-manager
3838
spec:
3939
# TODO(user): Uncomment the following code to configure the nodeAffinity expression
40-
# according to the platforms which are supported by your solution.
40+
# according to the platforms which are supported by your solution.
4141
# It is considered best practice to support multiple architectures. You can
4242
# build your manager image using the makefile target docker-buildx.
4343
# affinity:

testdata/project-v3-with-metrics/config/manager/manager.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ spec:
3737
control-plane: controller-manager
3838
spec:
3939
# TODO(user): Uncomment the following code to configure the nodeAffinity expression
40-
# according to the platforms which are supported by your solution.
40+
# according to the platforms which are supported by your solution.
4141
# It is considered best practice to support multiple architectures. You can
4242
# build your manager image using the makefile target docker-buildx.
4343
# affinity:

0 commit comments

Comments
 (0)