Commit 17cdb90f authored by Romain's avatar Romain

Changes following review

- Remove inconsistency of callink make lint-all from the pre-commit hookj
- Remove comment in pre-commit conf
- Add specific targets in makefile to install and run pre-commit
- Change yamlint default conf to avoid line too long (for example on travis file)
parent e2e1399c
......@@ -3,15 +3,14 @@ repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.1.0
hooks:
#- id: flake8
- id: check-yaml
files: .*\.(yaml|yml)$
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.23.0
hooks:
- id: yamllint
args: ['-d {extends: relaxed, rules: {line-length: disable}}', '-s']
files: \.(yaml|yml)$
exclude: ^.travis
- repo: https://github.com/openstack-dev/bashate.git
rev: 2.0.0
hooks:
......@@ -24,4 +23,4 @@ repos:
language: system
types:
- dockerfile
entry: make lint-all
entry: hadolint
......@@ -75,7 +75,7 @@ dev/%: ## run a foreground container for a stack
docker run -it --rm -p $(PORT):8888 $(DARGS) $(OWNER)/$(notdir $@) $(ARGS)
dev-env: ## install libraries required to build docs and run tests
pip install -r requirements-dev.txt
@pip install -r requirements-dev.txt
lint/%: ARGS?=
lint/%: ## lint the dockerfile(s) for a stack
......@@ -118,6 +118,13 @@ n-docs-diff: ## number of docs/ files changed since branch from master
n-other-diff: ## number of files outside docs/ changed since branch from master
@git diff --name-only $(DIFF_RANGE) -- ':!docs/' | wc -l | awk '{print $$1}'
pre-commit-all: ## run pre-commit hook on all files
@pre-commit run --all
pre-commit-install: ## set up the git hook scripts
@pre-commit --version
@pre-commit install
pull/%: DARGS?=
pull/%: ## pull a jupyter image
docker pull $(DARGS) $(OWNER)/$(notdir $@)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment