Skip to content

Commit

Permalink
pre-commit - add shellcheck and shfmt hooks
Browse files Browse the repository at this point in the history
for bash scripts
  • Loading branch information
Allen Winter committed Sep 9, 2024
1 parent 1bfad57 commit 1c25193
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[*.sh]
indent_style = space
indent_size = 2
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,11 @@ repos:
rev: v4.0.3
hooks:
- id: reuse
- repo: https://github.com/scop/pre-commit-shfmt
rev: v3.8.0-1
hooks:
- id: shfmt
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.10.0.1
hooks:
- id: shellcheck
2 changes: 1 addition & 1 deletion .reuse/dep5
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Copyright: Klarälvdalens Datakonsult AB, a KDAB Group company <[email protected]>
License: MIT

#misc config files
Files: .pre-commit-config.yaml .codespellrc .krazy .cmake-format.py .clang-format .clang-tidy .clazy .gitignore .mdlrc .mdlrc.rb .pep8 .pylintrc docs/api/Doxyfile.cmake distro/*
Files: .pre-commit-config.yaml .codespellrc .krazy .cmake-format.py .clang-format .clang-tidy .clazy .gitignore .mdlrc .mdlrc.rb .pep8 .pylintrc .editorconfig .shellcheck docs/api/Doxyfile.cmake distro/*
Copyright: Klarälvdalens Datakonsult AB, a KDAB Group company <[email protected]>
License: BSD-3-Clause

Expand Down
2 changes: 2 additions & 0 deletions .shellcheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#disable=SC2006
disable=SC2233

0 comments on commit 1c25193

Please sign in to comment.