Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"File does not end with a newline" false/erroneous diagnostic #440

Open
slabstone opened this issue Dec 27, 2024 · 0 comments
Open

"File does not end with a newline" false/erroneous diagnostic #440

slabstone opened this issue Dec 27, 2024 · 0 comments

Comments

@slabstone
Copy link

Environment

Windows 10, Ubuntu 20.04 WSL and

$ nvm use --lts
Now using node v22.12.0 (npm v10.9.0)
$ npm exec -- npm-groovy-lint --version
GroovyLint: Successfully processed CodeNarc:
CodeNarc version 3.5.0
npm-groovy-lint version 15.0.2

Embeds:
CodeNarc version 3.5.0
- Groovy version 3.0.9 (superlite)

Test file

echo "def s = 'hello'" > hello.groovy

echo adds newline but just it case let's check it:

$ xxd hello.groovy
00000000: 6465 6620 7320 3d20 2768 656c 6c6f 270a  def s = 'hello'.

newline character is present (0a)

Run

npm exec -- npm-groovy-lint -c recommended-jenkinsfile -s hello.groovy
0
  0     info     File codeNarcTmpDir_0.7216443869861697.groovy does not end with a newline  FileEndsWithoutNewline


npm-groovy-lint results in 1 linted files:
┌─────────┬───────────┬─────────────┐
│ (index) │ Severity  │ Total found │
├─────────┼───────────┼─────────────┤
│ 0       │ 'Error'   │ 0           │
│ 1       │ 'Warning' │ 0           │
│ 2       │ 'Info'    │ 1           │
└─────────┴───────────┴─────────────┘
Failure: 0 error(s) have been found
 0 warning(s) have been found
 1 info(s) have been found

This message is unexpected

  0     info     File codeNarcTmpDir_0.7216443869861697.groovy does not end with a newline  FileEndsWithoutNewline
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant