diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index ebd63a9..474bcff 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -27,6 +27,11 @@ jobs: fetch-depth: 0 fetch-tags: true + - name: Check for new lines at the end of files + # https://medium.com/@alexey.inkin/how-to-force-newline-at-end-of-files-and-why-you-should-do-it-fdf76d1d090e + working-directory: ${{github.workspace}}/src + run: find . -type f -not -path "./.git/*" | xargs -L1 bash -c 'test $(tail -c1 "$0") && echo "No newline at end of $0"' + - name: Check formatting with git diff --check working-directory: ${{github.workspace}}/src run: git diff --check --color HEAD~