We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3a641da commit 3080d33Copy full SHA for 3080d33
.github/workflows/osrd-ui-build.yml
@@ -45,3 +45,25 @@ jobs:
45
}
46
47
commit_titles | TERM=xterm-color .github/scripts/check-commit-titles.sh
48
+
49
+ final_newline_lint:
50
+ runs-on: ubuntu-latest
51
+ name: Check final newline
52
+ steps:
53
+ - name: Install ripgrep
54
+ run: sudo apt-get install -y ripgrep
55
+ - name: Checkout
56
+ uses: actions/checkout@v4
57
+ - name: Check final newline is present
58
+ run: |
59
+ # search missing final newline
60
+ if rg -Ul '[^\n]\z' -g '!*.svg' .; then
61
+ echo "Found missing final newline on listed file(s)"
62
+ exit 1
63
+ fi
64
65
+ # search multiple final newlines
66
+ if rg -Ul '\n\n\z' .; then
67
+ echo "Found multiple final newlines on listed file(s)"
68
69
0 commit comments