| # SPDX-FileCopyrightText: © 2020 Open Networking Foundation <support@opennetworking.org> |
| # SPDX-License-Identifier: Apache-2.0 |
| SHELL = bash -eu -o pipefail |
| .PHONY: test lint yamllint ansiblelint license help |
| test: ## run tests on the playbook with molecule |
| lint: yamllint ansiblelint ## run all lint checks |
| YAML_FILES ?= $(shell find . -type f \( -name '*.yaml' -o -name '*.yml' \) -print ) |
| yamllint: ## lint check with yamllint |
| -d "{extends: default, rules: {line-length: {max: 99}}}" \ |
| ansiblelint: ## lint check with ansible-lint |
| ansible-lint -v molecule/*/* |
| license: ## Check license with the reuse tool |
| help: ## Print help for each target |
| @grep '^[[:alnum:]_-]*:.* ##' $(MAKEFILE_LIST) \ |
| | sort | awk 'BEGIN {FS=":.* ## "}; {printf "%-25s %s\n", $$1, $$2};' |