Skip to content

Commit c37dc10

Browse files
Latest
1 parent 300e569 commit c37dc10

File tree

131 files changed

+1023
-2512
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

131 files changed

+1023
-2512
lines changed

.config/codeclimate.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,12 @@ plugins:
88
enabled: true
99
jscpd:
1010
enabled: true
11+
proselint:
12+
enabled: true
1113
shellcheck:
1214
enabled: true
15+
semgrep:
16+
enabled: true
1317
yamllint:
1418
enabled: true
1519

.config/docs/variables.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,7 @@
270270
"dockerhub": "megabytelabs",
271271
"galaxy": "professormanhattan",
272272
"github": "ProfessorManhattan",
273+
"githubOrg": "megabyte-labs",
273274
"linkedin": "blzalewski",
274275
"npmjs": "thisismyfirstday",
275276
"npmjs_organization": "mblabs",

.config/flake8.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[flake8]
2+
exclude = .autodoc, .cache, .common, .config, .git, .modules, .npm, .pnpm-store, .shared, .task, .venv, .vscode, build, dist, node_modules, roles, venv
3+
ignore = E402
4+
max-line-length = 120

.config/hadolint.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
ignored:
3+
- DL3004 # Do not use sudo
4+
- DL3007 # Do not use `latest` images

.config/husky/commit-msg

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44
# @brief A git hook script for the `commit-msg` hook
55
# @arg $1 Path to a temporary file that contains the commit message written by the developer (e.g. .git/COMMIT_EDITMSG)
66

7+
[ -f .config/log ] && chmod +x .config/log
78
if [ -f "$(dirname "$0")/_/husky.sh" ]; then
89
. "$(dirname "$0")/_/husky.sh"
9-
task git:hook:commit-msg -- "$1"
10+
type task &> /dev/null && task git:hook:commit-msg -- "$1"
1011
else
1112
.config/log warn 'Husky pre-commit hooks are currently not properly setup.'
1213
fi

.config/husky/post-checkout

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@
66
# @arg $2 The ref of the new HEAD
77
# @arg $3 Equal to 1 if changing branches
88

9+
[ -f .config/log ] && chmod +x .config/log
910
if [ -f "$(dirname "$0")/_/husky.sh" ]; then
1011
. "$(dirname "$0")/_/husky.sh"
11-
task git:hook:post-checkout
12+
type task &> /dev/null && task git:hook:post-checkout
1213
else
1314
.config/log warn 'Husky pre-commit hooks are currently not properly setup.'
1415
fi

.config/husky/post-commit

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
# @brief A git hook script for the `post-commit` hook. There are no parameters but you can easily get the
44
# last commit by running `git log -1 HEAD`. Generally, this script is used for notifications or something similar.
55

6+
[ -f .config/log ] && chmod +x .config/log
67
if [ -f "$(dirname "$0")/_/husky.sh" ]; then
78
. "$(dirname "$0")/_/husky.sh"
8-
task git:hook:post-commit
9+
type task &> /dev/null && task git:hook:post-commit
910
else
1011
.config/log warn 'Husky pre-commit hooks are currently not properly setup.'
1112
fi

.config/husky/post-merge

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44
# @brief A git hook script for the `post-merge` hook
55
# @arg $1 A status flag specifying whether or not the merge being done was a squash merge
66

7+
[ -f .config/log ] && chmod +x .config/log
78
if [ -f "$(dirname "$0")/_/husky.sh" ]; then
89
. "$(dirname "$0")/_/husky.sh"
9-
task git:hook:post-merge
10+
type task &> /dev/null && task git:hook:post-merge
1011
else
1112
.config/log warn 'Husky pre-commit hooks are currently not properly setup.'
1213
fi

.config/husky/post-rewrite

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@
55
# that rewrite commits (e.g. git pull origin master --rebase)
66
# @arg $1 Denotes the command it was invoked by: currently one of amend or rebase
77

8+
[ -f .config/log ] && chmod +x .config/log
89
if [ -f "$(dirname "$0")/_/husky.sh" ]; then
910
. "$(dirname "$0")/_/husky.sh"
10-
task git:hook:post-rewrite
11+
type task &> /dev/null && task git:hook:post-rewrite
1112
else
1213
.config/log warn 'Husky pre-commit hooks are currently not properly setup.'
1314
fi

.config/husky/pre-commit

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,25 @@
33
# @file .config/husky/pre-commit
44
# @brief A git hook script for the `pre-commit` hook
55

6+
[ -f .config/log ] && chmod +x .config/log
67
if [ -f "$(dirname "$0")/_/husky.sh" ]; then
78
. "$(dirname "$0")/_/husky.sh"
8-
9-
chmod +x .config/log
10-
9+
1110
.config/log info "Performing various pre-commit tasks on staged files (like autofixing, detecting private keys, etc.)"
12-
11+
1312
STAGED_FILES=$(git diff --cached --name-only)
1413
for FILE in "$STAGED_FILES"; do
1514
if [ -f "$1" ]; then
16-
task git:hook:pre-commit -- "$FILE" &
15+
type task &> /dev/null && task git:hook:pre-commit -- "$FILE" &
1716
fi
1817
done
1918
wait
2019

2120
.config/log info 'Linting and fixing the staged files with `lint-staged`'
22-
task lint:lint-staged
21+
type task &> /dev/null && task lint:lint-staged
2322

2423
.config/log info 'Reporting possible spelling errors in the staged files with `cspell`'
25-
task lint:spelling
24+
type task &> /dev/null && task lint:spelling
2625

2726
.config/log success 'Pre-commit validation complete!'
2827
else

0 commit comments

Comments
 (0)