Skip to content

Commit

Permalink
Added linter to add new line
Browse files Browse the repository at this point in the history
Signed-off-by: Owais Kazi <[email protected]>
  • Loading branch information
owaiskazi19 committed Apr 12, 2022
1 parent a89b7e6 commit 1aeb64f
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/new-line.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Code Hygiene

on: [push, 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/[email protected]
20 changes: 20 additions & 0 deletions .linelint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# 'true' will fix files
autofix: true

ignore:
- .git/
- .gradle/
- '*.sha1'
- '*.txt'
- 'buildSrc/src/testKit/opensearch.build/LICENSE'
- 'buildSrc/src/testKit/opensearch.build/NOTICE'
- 'server/licenses/apache-log4j-extras-DEPENDENCIES'

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

0 comments on commit 1aeb64f

Please sign in to comment.