Skip to content

Commit

Permalink
Merge pull request #24 from ssciwr/actionlint
Browse files Browse the repository at this point in the history
Add pre-commit linter for GitHub Actions workflows
  • Loading branch information
dokempf authored Jun 23, 2023
2 parents cd2a7d6 + fd0b37e commit 7cb6576
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions {{cookiecutter.project_slug}}/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
repos:
# Run Black - the uncompromising Python code formatter
- repo: https://github.com/psf/black
rev: 22.12.0
rev: 23.3.0
hooks:
- id: black-jupyter

Expand All @@ -19,12 +19,21 @@ repos:
- id: check-toml
# Unify file endings
- id: end-of-file-fixer
{% if cookiecutter.notebooks == "Yes" %}
{%- if cookiecutter.notebooks == "Yes" %}

# Make sure that Jupyter notebooks under version control
# have their outputs stripped before committing
- repo: https://github.com/kynan/nbstripout
rev: 0.6.1
hooks:
- id: nbstripout
files: ".ipynb"
{% endif -%}
{%- endif %}
{%- if cookiecutter.github_actions_ci == "Yes" %}

# GitHub Actions Workflow linter
- repo: https://github.com/rhysd/actionlint
rev: v1.6.25
hooks:
- id: actionlint
{%- endif %}

0 comments on commit 7cb6576

Please sign in to comment.