Skip to content

Commit

Permalink
initial commit of pre-commit configuration
Browse files Browse the repository at this point in the history
To use the pre-commit hooks install `pre-commit` with the following
instructions:

  https://pre-commit.com/#install

then run ONCE in your CP2K clone:

    pre-commit install

After that - before every commit - all the scripts configured in
`.pre-commit-config.yaml` will run on the files added in that
commit.

If any file changed (for example because they were modified by the
`prettify` script), the commit will be interrupted for you to
investigate and adding the prettyfied file to the commit if
necessary.
  • Loading branch information
dev-zero committed May 2, 2019
1 parent e2a1c08 commit 16c796c
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.0.0
hooks:
- id: check-yaml
- id: check-added-large-files
- repo: local
hooks:
- id: prettify
name: Run prettify
entry: ./tools/prettify/prettify.py
language: script
files: '.*\.(F|f90)$'
exclude: >-
(?x)^(
tools/.*|
src/base/base_uses.f90|
src/common/util.F|
)$

0 comments on commit 16c796c

Please sign in to comment.