Page MenuHomeDevCentral

D2635.id6656.diff
No OneTemporary

D2635.id6656.diff

diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
new file mode 100644
--- /dev/null
+++ b/.pre-commit-config.yaml
@@ -0,0 +1,34 @@
+repos:
+ - repo: https://github.com/pre-commit/pre-commit-hooks
+ rev: v4.1.0
+ hooks:
+ - id: check-added-large-files
+ - id: check-executables-have-shebangs
+ - id: check-json
+ - id: check-merge-conflict
+ - id: check-xml
+ - id: check-yaml
+ - id: end-of-file-fixer
+ exclude: ^roles/core/motd/files/
+ - id: fix-byte-order-marker
+ - id: mixed-line-ending
+ args: ["--fix=lf"]
+ - id: trailing-whitespace
+ exclude: patch$
+
+ - repo: https://github.com/psf/black
+ rev: 22.1.0
+ hooks:
+ - id: black
+
+ - repo: https://github.com/warpnet/salt-lint
+ rev: v0.8.0
+ hooks:
+ - id: salt-lint
+ args: ["-x", "207,208"]
+ files: ^(roles|hotfixes).*\.(sls)$
+
+ - repo: https://devcentral.nasqueron.org/source/codestyle.git
+ rev: v0.1.0
+ hooks:
+ - id: shellcheck
diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -31,15 +31,18 @@
# Build targets - repository
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-repo: roles/webserver-content/init.sls
+repo: roles/webserver-content/init.sls .git/hooks/pre-commit
roles/webserver-content/init.sls:
tmpfile=`mktemp /tmp/make-rOPS-generate-webcontent-index.XXXXXX` ; \
utils/generate-webcontent-index.py > "$$tmpfile" ;\
${MV} "$$tmpfile" roles/webserver-content/init.sls
+.git/hooks/pre-commit:
+ pre-commit install
+
clean-repo:
- ${RM} roles/webserver-content/init.sls
+ ${RM} roles/webserver-content/init.sls .git/hooks/pre-commit
# -------------------------------------------------------------
# Build targets - API

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 16, 16:02 (21 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2247604
Default Alt Text
D2635.id6656.diff (1 KB)

Event Timeline