File tree Expand file tree Collapse file tree 2 files changed +32
-6
lines changed Expand file tree Collapse file tree 2 files changed +32
-6
lines changed Original file line number Diff line number Diff line change @@ -168,14 +168,9 @@ endif
168168verify-markdown-marker :
169169 PASSES=" markdown_marker" ./scripts/test.sh
170170
171- YAMLFMT_VERSION = $(shell cd tools/mod && go list -m -f '{{.Version}}' github.com/google/yamlfmt)
172-
173171.PHONY : fix-yamllint
174172fix-yamllint :
175- ifeq (, $(shell command -v yamlfmt) )
176- $(shell go install github.com/google/yamlfmt/cmd/yamlfmt@$(YAMLFMT_VERSION))
177- endif
178- yamlfmt -conf tools/.yamlfmt .
173+ ./scripts/fix/yamllint.sh
179174
180175.PHONY : run-govulncheck
181176run-govulncheck :
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ # Copyright 2025 The etcd Authors
3+ #
4+ # Licensed under the Apache License, Version 2.0 (the "License");
5+ # you may not use this file except in compliance with the License.
6+ # You may obtain a copy of the License at
7+ #
8+ # http://www.apache.org/licenses/LICENSE-2.0
9+ #
10+ # Unless required by applicable law or agreed to in writing, software
11+ # distributed under the License is distributed on an "AS IS" BASIS,
12+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ # See the License for the specific language governing permissions and
14+ # limitations under the License.
15+
16+ # Fixes linter issues in YAML files.
17+
18+ set -euo pipefail
19+
20+ ETCD_ROOT_DIR=${ETCD_ROOT_DIR:- $(git rev-parse --show-toplevel)}
21+ source " ${ETCD_ROOT_DIR} /scripts/test_lib.sh"
22+
23+ function main {
24+ run_go_tool github.com/google/yamlfmt/cmd/yamlfmt \
25+ -conf " ${ETCD_ROOT_DIR} /tools/.yamlfmt" .
26+ }
27+
28+ # only run when called directly, not sourced
29+ if [[ " ${BASH_SOURCE[0]} " == " ${0} " ]]; then
30+ main
31+ fi
You can’t perform that action at this time.
0 commit comments