Skip to content

Commit 3c34309

Browse files
author
Anis
authored
Merge pull request #10 from lumapps/chore/add_dev_requirements
chore(local): add quality controls
2 parents 54d2618 + 05e2b9f commit 3c34309

File tree

5 files changed

+61
-2
lines changed

5 files changed

+61
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
venv

.pre-commit-config.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
repos:
3+
- repo: https://github.com/adrienverge/yamllint.git
4+
rev: v1.24.2
5+
hooks:
6+
- id: yamllint
7+
args: [-c=./local/yamllint_config.yaml]
8+
9+
- repo: https://github.com/frnmst/md-toc
10+
rev: master # or a specific git tag from md-toc
11+
hooks:
12+
- id: md-toc
13+
- repo: https://github.com/pre-commit/pre-commit-hooks
14+
rev: v2.0.0
15+
hooks:
16+
- id: check-added-large-files
17+
- id: check-case-conflict
18+
- id: check-executables-have-shebangs
19+
- id: check-json
20+
- id: check-merge-conflict
21+
- id: check-yaml
22+
- id: debug-statements
23+
- id: check-symlinks
24+
- id: detect-private-key
25+
- id: end-of-file-fixer
26+
- id: trailing-whitespace
27+
exclude: (.github/CODEOWNERS|validator.bats)

Makefile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Use a standard bash shell, avoid zsh or fish
2+
SHELL:=/bin/bash
3+
4+
# Select the default target, when you are simply running "make"
5+
.DEFAULT_GOAL:=lint
6+
7+
# local executables
8+
pip:=./venv/bin/pip
9+
pre-commit=./venv/bin/pre-commit
10+
11+
.PHONY: lint venv
12+
13+
venv:
14+
python3.7 -m venv venv
15+
$(pip) install pre-commit
16+
17+
lint:
18+
$(pre-commit) run --all-files

action.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
---
12
name: 'Commit message validator'
2-
description: 'Enforce angular commit message convention with minimal dependancy only git and bash.'
3+
description: >
4+
Enforce angular commit message convention with minimal dependency only git and bash.
35
author: 'Sébastien Boulle'
46
branding:
57
icon: 'check-square'
@@ -23,7 +25,9 @@ runs:
2325
shell: bash
2426

2527
- name: Validation
26-
run: ${{ github.action_path }}/check.sh ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}
28+
run: |
29+
${{ github.action_path }}/check.sh \
30+
${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}
2731
env:
2832
COMMIT_VALIDATOR_NO_JIRA: ${{ inputs.no_jira }}
2933
COMMIT_VALIDATOR_ALLOW_TEMP: ${{ inputs.allow_temp }}

local/yamllint_config.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
extends: default
3+
ignore: |
4+
.github/workflows/
5+
venv/
6+
rules:
7+
line-length:
8+
max: 120
9+
comments-indentation: disable

0 commit comments

Comments
 (0)