aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert@zeitkraut.de>2020-11-07 19:38:03 +0100
committerGitHub <noreply@github.com>2020-11-07 10:38:03 -0800
commit527346cc7e2bc874092be2f6793001860e10a719 (patch)
tree7c26c03a30f00f63c340d98cebdadd2f6408df21 /.github
parent0ed3436588951d457eefb11351f72d3560bdc544 (diff)
downloadpandoc-527346cc7e2bc874092be2f6793001860e10a719.tar.gz
Lint code in PRs and when committing to master (#6790)
* Remove unused LANGUAGE pragmata * Apply HLint suggestions * Configure HLint to ignore some warnings * Lint code when committing to master
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/lint.yml30
1 files changed, 30 insertions, 0 deletions
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
new file mode 100644
index 000000000..d2f463ec7
--- /dev/null
+++ b/.github/workflows/lint.yml
@@ -0,0 +1,30 @@
+name: Lint
+
+# Trigger the workflow on push or pull request, but only for the
+# master branch
+on:
+ pull_request:
+ branch: [master]
+ push:
+ branch: [master]
+ paths-ignore:
+ - LICENSE
+ - README.md
+ - CHANGELOG.md
+ - stack.yaml
+ - .travis.yml
+
+jobs:
+ lint:
+ name: Lint
+ runs-on: ubuntu-latest
+ env:
+ hlint_script: https://raw.github.com/ndmitchell/hlint/master/misc/run.sh
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+
+ - name: Download and run hlint
+ run: |
+ curl -sSL "${hlint_script}" | sh -s .