Skip to content

Commit a510774

Browse files
committed
add pre-commit hooks
1 parent 5feea92 commit a510774

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
}
6868
}
6969
},
70+
"remoteEnv": { "LOCAL_WORKSPACE_FOLDER": "${localWorkspaceFolder}" },
7071
"postCreateCommand": "rm -f ~/.docker/config.json; git config --global --add safe.directory /workspaces/eps-vpc-resources; make install; direnv allow ."
7172
// "features": {},
7273
// Use 'forwardPorts' to make a list of ports inside the container available locally.

.pre-commit-config.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,15 @@ repos:
5959
types_or: [sh, shell]
6060
pass_filenames: false
6161

62+
- repo: local
63+
hooks:
64+
- id: git-secrets
65+
name: Git Secrets
66+
description: git-secrets scans commits, commit messages, and --no-ff merges to prevent adding secrets into your git repositories.
67+
entry: bash
68+
args:
69+
- -c
70+
- 'docker run -v "$LOCAL_WORKSPACE_FOLDER:/src" git-secrets --pre_commit_hook'
71+
language: system
6272
fail_fast: true
6373
default_stages: [pre-commit]

0 commit comments

Comments
 (0)