Skip to content

Commit

Permalink
Merge pull request #17200 from iiamabby/yamllint-install
Browse files Browse the repository at this point in the history
Automate installation of yamllint
  • Loading branch information
ahrtr authored Jan 6, 2024
2 parents 1707d79 + dbfacb4 commit 3a8e90c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
12 changes: 9 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ fuzz:
# Static analysis

verify: verify-gofmt verify-bom verify-lint verify-dep verify-shellcheck verify-goword \
verify-govet verify-license-header verify-receiver-name verify-mod-tidy verify-shellcheck \
verify-govet verify-license-header verify-receiver-name verify-mod-tidy \
verify-shellws verify-proto-annotations verify-genproto verify-yamllint \
verify-govet-shadow verify-markdown-marker
fix: fix-bom fix-lint fix-yamllint
Expand Down Expand Up @@ -131,7 +131,15 @@ verify-genproto:

.PHONY: verify-yamllint
verify-yamllint:
ifeq (, $(shell which yamllint))
@echo "Installing yamllint..."
python3 -m venv bin/python
bin/python/bin/python3 -m pip install yamllint
./bin/python/bin/yamllint --config-file tools/.yamllint .
else
@echo "yamllint already installed..."
yamllint --config-file tools/.yamllint .
endif

.PHONY: verify-govet-shadow
verify-govet-shadow:
Expand All @@ -154,15 +162,13 @@ endif

GOLANGCI_LINT_VERSION = $(shell cd tools/mod && go list -m -f {{.Version}} github.com/golangci/golangci-lint)
.PHONY: install-golangci-lint

install-golangci-lint:
ifeq (, $(shell which golangci-lint))
$(shell curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOPATH)/bin $(GOLANGCI_LINT_VERSION))
endif

.PHONY: install-lazyfs
install-lazyfs: bin/lazyfs

bin/lazyfs:
rm /tmp/lazyfs -rf
git clone --depth 1 --branch 0.2.0 https://github.com/dsrhaslab/lazyfs /tmp/lazyfs
Expand Down
1 change: 1 addition & 0 deletions scripts/genproto.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ if [[ $(protoc --version | cut -f2 -d' ') != "3.20.3" ]]; then

download_url="https://github.com/protocolbuffers/protobuf/releases/download/v3.20.3/protoc-3.20.3-linux-${file}.zip"
echo "Running on ${arch}."
mkdir -p bin
wget ${download_url} && unzip -p protoc-3.20.3-linux-${file}.zip bin/protoc > tmpFile && mv tmpFile bin/protoc
rm protoc-3.20.3-linux-${file}.zip
chmod +x bin/protoc
Expand Down

0 comments on commit 3a8e90c

Please sign in to comment.