diff --git a/.github/workflows/code-hygiene.yml b/.github/workflows/code-hygiene.yml new file mode 100644 index 00000000..a1adbb8a --- /dev/null +++ b/.github/workflows/code-hygiene.yml @@ -0,0 +1,14 @@ +name: Code Hygiene + +on: [pull_request] + +jobs: + linelint: + runs-on: ubuntu-latest + name: Check if all files end in newline + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Linelint + uses: fernandrone/linelint@0.0.4 diff --git a/.linelint.yml b/.linelint.yml new file mode 100644 index 00000000..116e1294 --- /dev/null +++ b/.linelint.yml @@ -0,0 +1,18 @@ +# 'true' will fix files +autofix: true + +ignore: + - CONTRIBUTING.md + - DEVELOPER_GUIDE.md + - SECURITY.md + - formatter/license-header.txt + - src/main/resources/log4j2.xml + +rules: + # checks if file ends in a newline character + end-of-file: + # set to true to enable this rule + enable: true + + # if true also checks if file ends in a single newline character + single-new-line: true diff --git a/settings.gradle b/settings.gradle index 8c502654..7186114e 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,2 +1 @@ rootProject.name = 'IndependentPlugin' -