-
-
Notifications
You must be signed in to change notification settings - Fork 61
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
--noserver does not honor --parse #323
Labels
question
Further information is requested
Comments
@tbroyer please can you check with v13.0.0 ? :) |
Nope, no change with 13.0.0: $ alias insidedocker
alias insidedocker='docker run --rm -it -u $(id -u):$(id -g) -v "$PWD:$PWD" -w "$PWD"'
$ insidedocker nvuillam/npm-groovy-lint:v13.0.0 vars/utils.groovy
***REDACTED***/vars/utils.groovy
56 error Unexpected input: '***REDACTED***' @ line 56, column 1. NglParseError
npm-groovy-lint results in 1 linted files:
┌─────────┬───────────┬─────────────┐
│ (index) │ Severity │ Total found │
├─────────┼───────────┼─────────────┤
│ 0 │ 'Error' │ 1 │
│ 1 │ 'Warning' │ 0 │
│ 2 │ 'Info' │ 0 │
└─────────┴───────────┴─────────────┘
Failure: 1 error(s) have been found
0 warning(s) have been found
0 info(s) have been found
$ insidedocker nvuillam/npm-groovy-lint:v13.0.0 --noserver vars/utils.groovy
npm-groovy-lint results in 1 linted files:
┌─────────┬───────────┬─────────────┐
│ (index) │ Severity │ Total found │
├─────────┼───────────┼─────────────┤
│ 0 │ 'Error' │ 0 │
│ 1 │ 'Warning' │ 0 │
│ 2 │ 'Info' │ 0 │
└─────────┴───────────┴─────────────┘ |
Parsing is done within the CodeNarc server... and with --noserver we directly call CodeNarc... it's possible than --noserver makes that limitation , we should update the doc :/ |
I wouldn't expect it to differ, do you have an example you can share to test locally? |
Sure, using the $ alias insidedocker
alias insidedocker='docker run --rm -it -u $(id -u):$(id -g) -v "$PWD:$PWD" -w "$PWD"'
$ insidedocker nvuillam/npm-groovy-lint:v14.0.0 WithParseError.groovy
***REDACTED***/WithParseError.groovy
3 error Unexpected input: '\n' @ line 3, column 20. NglParseError
5 info Static imports should appear before normal imports MisorderedStaticImports
43 warning The line exceeds 120 characters. The line is 133 characters. LineLength
npm-groovy-lint results in 1 linted files:
┌─────────┬───────────┬─────────────┐
│ (index) │ Severity │ Total found │
├─────────┼───────────┼─────────────┤
│ 0 │ 'Error' │ 1 │
│ 1 │ 'Warning' │ 1 │
│ 2 │ 'Info' │ 1 │
└─────────┴───────────┴─────────────┘
Failure: 1 error(s) have been found
1 warning(s) have been found
1 info(s) have been found
$ insidedocker nvuillam/npm-groovy-lint:v14.0.0 --noserver WithParseError.groovy
***REDACTED***/WithParseError.groovy
5 info Static imports should appear before normal imports MisorderedStaticImports
43 warning The line exceeds 120 characters. The line is 133 characters. LineLength
npm-groovy-lint results in 1 linted files:
┌─────────┬───────────┬─────────────┐
│ (index) │ Severity │ Total found │
├─────────┼───────────┼─────────────┤
│ 0 │ 'Error' │ 0 │
│ 1 │ 'Warning' │ 1 │
│ 2 │ 'Info' │ 1 │
└─────────┴───────────┴─────────────┘
Failure: 0 error(s) have been found
1 warning(s) have been found
1 info(s) have been found |
stevenh
added a commit
that referenced
this issue
Dec 18, 2023
Refactor request processing so that the flow is the same with and without --noserver command line option which was preventing parse errors being reported when --noserver was specified. Add duration in milliseconds to request logging so we easily monitor how long the server side requests are taking. Explicitly handle 404 errors so we don't needlessly retry them with a slow direct request. Use chaining to improve readability. Fixes #323
stevenh
added a commit
that referenced
this issue
Dec 18, 2023
Refactor request processing so that the flow is the same with and without --noserver command line option which was preventing parse errors being reported when --noserver was specified. Add duration in milliseconds to request logging so we easily monitor how long the server side requests are taking. Explicitly handle 404 errors so we don't needlessly retry them with a slow direct request. Use chaining to improve readability. Fixes #323
stevenh
added a commit
that referenced
this issue
Dec 18, 2023
Refactor request processing so that the flow is the same with and without --noserver command line option which was preventing parse errors being reported when --noserver was specified. Add duration in milliseconds to request logging so we easily monitor how long the server side requests are taking. Explicitly handle 404 errors so we don't needlessly retry them with a slow direct request. Use chaining to improve readability. Switch to java.time.* instead of Date as recommended by CodeNarc. Fixes #323
stevenh
added a commit
that referenced
this issue
Dec 19, 2023
Refactor request processing so that the flow is the same with and without --noserver command line option which was preventing parse errors being reported when --noserver was specified. Add duration in milliseconds to request logging so we easily monitor how long the server side requests are taking. Explicitly handle 404 errors so we don't needlessly retry them with a slow direct request. Use chaining to improve readability. Switch to java.time.* instead of Date as recommended by CodeNarc. Fixes #323
nvuillam
pushed a commit
that referenced
this issue
Dec 20, 2023
Refactor request processing so that the flow is the same with and without --noserver command line option which was preventing parse errors being reported when --noserver was specified. Add duration in milliseconds to request logging so we easily monitor how long the server side requests are taking. Explicitly handle 404 errors so we don't needlessly retry them with a slow direct request. Use chaining to improve readability. Switch to java.time.* instead of Date as recommended by CodeNarc. Fixes #323
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Tracking differences between using
--noserver
or not (see #290), I stumbled on another difference: a file with a parse error will be seen as OK with--noserver
, whereas it will fail without.Fwiw, the reason for using
--noserver
is that I'm using npm-groovy-lint through Docker (on CI, but also locally), so starting a server for a one-shot analysis seemed unnecessary.Given that
--noserver
is also used as a fallback for when the server codepath fails, I expect it to behave the same.(using version 11.1.1 here due to #319)
The text was updated successfully, but these errors were encountered: