-
-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add pre-commit for liniting docs (#321)
- Loading branch information
Showing
4 changed files
with
50 additions
and
15 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Check code style | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- develop | ||
pull_request: | ||
branches: | ||
- "*" | ||
|
||
jobs: | ||
formatting: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout preCICE | ||
uses: actions/checkout@v4 | ||
- name: Setup python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10' | ||
check-latest: true | ||
- name: Install pre-commit | ||
run: pip install pre-commit | ||
- name: Run checks | ||
run: pre-commit run -a -v | ||
- name: Git status | ||
if: always() | ||
run: git status | ||
- name: Full diff | ||
if: always() | ||
run: git diff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
repos: | ||
# Official repo for default hooks | ||
- repo: https://github.com/precice/precice-pre-commit-hooks | ||
rev: 'v3.3' | ||
hooks: | ||
- id: format-precice-config | ||
- id: check-image-prefix | ||
args: [ --prefix=docs-adapter-openfoam- ] | ||
- repo: https://github.com/igorshubovych/markdownlint-cli | ||
rev: v0.30.0 | ||
hooks: | ||
- id: markdownlint | ||
files: "^docs/.*.md" | ||
- id: markdownlint-fix | ||
files: "^docs/.*.md" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters