generated from NHSDigital/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
54 lines (47 loc) · 1.42 KB
/
.pre-commit-config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-merge-conflict
name: Check for merge conflict strings
- id: end-of-file-fixer
name: Fix missing newline at the end of files
- id: check-shebang-scripts-are-executable
name: Check shell scripts are executable
files: \.(sh)$
- id: check-yaml
name: Check pipelines configuration
files: ^(.github)
- repo: https://github.com/koalaman/shellcheck-precommit
rev: v0.9.0
hooks:
- id: shellcheck
- repo: local
hooks:
- id: lint-nhs-eps-spine-client
name: Lint nhs-eps-spine-client
entry: make
args: ["lint-node"]
language: system
files: ^src
pass_filenames: false
- id: lint-githubactions
name: Lint github actions
entry: make
args: ["lint-githubactions"]
language: system
files: ^.github
types_or: [yaml]
pass_filenames: false
- repo: local
hooks:
- id: git-secrets
name: Git Secrets
description: git-secrets scans commits, commit messages, and --no-ff merges to prevent adding secrets into your git repositories.
entry: bash
args:
- -c
- 'docker run -v "$LOCAL_WORKSPACE_FOLDER:/src" git-secrets --pre_commit_hook'
language: system
fail_fast: true
default_stages: [commit]