Skip to content

Commit

Permalink
Merge pull request #1 from temp20230620/patch-1
Browse files Browse the repository at this point in the history
Create .pre-commit-hooks.yaml
  • Loading branch information
mschuett authored Jun 29, 2023
2 parents 3a394fe + 2805202 commit 72ca7ca
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- id: yaml-shellcheck
name: yaml-shellcheck v1.1.0
description: Wrapper script to run shellcheck on YAML CI-config files
language: python
entry: yaml_shellcheck
types: [text]
18 changes: 18 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[tool.poetry]
name = "yaml-shellcheck"
version = "1.1.0"
description = "Wrapper script to run shellcheck on YAML CI-config files"
authors = ["Martin Schütte <[email protected]>"]
readme = "README.md"

[tool.poetry.dependencies]
python = ">=3.8,<4"
"ruamel.yaml" = "0.16.0"

[tool.poetry.scripts]
yaml_shellcheck = "yaml_shellcheck:main"


[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
6 changes: 5 additions & 1 deletion yaml_shellcheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ def cleanup_files(args):
logger.debug("removed working dir %s", args.outdir)


if __name__ == "__main__":
def main():
args = setup()

filenames = []
Expand All @@ -434,3 +434,7 @@ def cleanup_files(args):
cleanup_files(args)
# exit with shellcheck exit code
sys.exit(check_proc_result.returncode if check_proc_result else 0)


if __name__ == "__main__":
main()

0 comments on commit 72ca7ca

Please sign in to comment.