Skip to content

Commit

Permalink
Make sure that all text files end with a newline character. (lra#1836)
Browse files Browse the repository at this point in the history
* Make sure that all text files end with a newline character.

* Ignore legit files without newlines

* enable all rules

* Update .linelint.yml
  • Loading branch information
lra authored Jul 9, 2022
1 parent f9e0bb7 commit 28811b7
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/linelint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Make sure that all text files end with a newline character.
# Configure your editor to end every file with a newline character.
# See <https://stackoverflow.com/a/729795>
on:
- pull_request
- push
name: linelint
jobs:
linelint:
runs-on: ubuntu-latest
name: Check if all files end with a newline character
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Linelint
uses: fernandrone/linelint@master
19 changes: 19 additions & 0 deletions .linelint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# 'true' will fix files
autofix: false

# list of paths to ignore, uses gitignore syntaxes (executes before any rule)
ignore:
- tests/fixtures/Library/Application Support/Box/Box Sync/sync_root_folder.txt
- tests/fixtures/Library/Mobile Documents/com~apple~CloudDocs/_blank_.md

rules:
# checks if file ends in a newline character
end-of-file:
# set to true to enable this rule
enable: true

# set to true to disable autofix (if enabled globally)
disable-autofix: true

# if true also checks if file ends in a single newline character
single-new-line: true

0 comments on commit 28811b7

Please sign in to comment.