Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bd74403

Browse files
committed
add pre-commit workflow for whitespace checking
1 parent 7df2997 commit bd74403

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

.github/workflows/main.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: CI
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
pre-commit:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- uses: actions/setup-python@v2
11+
- uses: pre-commit/[email protected]

.pre-commit-config.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v3.4.0
4+
hooks:
5+
- id: check-yaml
6+
- id: end-of-file-fixer
7+
files: (?x)^(
8+
[\w-]+[.]tex|
9+
scripts/[\w-]+[.]py|
10+
)$
11+
- id: trailing-whitespace
12+
files: (?x)^(
13+
[\w-]+[.]tex|
14+
scripts/[\w-]+[.]py|
15+
)$

0 commit comments

Comments
 (0)