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

ignorepattern not working? #34

Closed
LRWeber opened this issue Apr 30, 2020 · 9 comments · Fixed by #35
Closed

ignorepattern not working? #34

LRWeber opened this issue Apr 30, 2020 · 9 comments · Fixed by #35

Comments

@LRWeber
Copy link

LRWeber commented Apr 30, 2020

I'm trying to use the --ignorepattern option on the command line, but it doesn't seem to be working as expected. Specifically, I would like to ignore the usual node_modules directory.

npm-groovy-lint --files '**/*.groovy' --ignorepattern '**/node_modules/*'

I've tried several variations on the pattern with no luck. Is this a bug, or am I just missing the right format?

I'm currently running on Windows 10 with:

npm-groovy-lint version 4.5.4

Embeds:
- CodeNarc version 1.5
- Groovy version 3.0.3 (superlite)
@nvuillam
Copy link
Owner

nvuillam commented Apr 30, 2020

Oops, my bad, I simply forgot to take in account this option 😊
You can go with --ignorepattern **/node_modules/** using new version 4.5.5 😃

I added a test method, but please can you confirm it works for your case ?

@LRWeber
Copy link
Author

LRWeber commented Apr 30, 2020

I tried it out, and it's working now! Thank you! 🌟

@cvakiitho
Copy link

cvakiitho commented May 21, 2020

Hi Sorry to reopen, but it seems to be not working on macos? :

pwd
/Users/blabla/

npm-groovy-lint --files '**/*.groovy' --ignorepattern 'bin/**/*'

And results contain:

/Users/blabla/bin/target/test-classes/vars/blabla.groovy

@nvuillam
Copy link
Owner

nvuillam commented May 21, 2020 via email

@cvakiitho
Copy link

I tried, still the same, full log you mean with some verbose settings?

@cvakiitho
Copy link

~/devel/test   codestyle  npm-groovy-lint --files '**/*.groovy' --ignorepattern '/bin/**/*' 
GroovyLint: Started CodeNarc Server after 1 attempts
/Users/.../devel/test/bin/target/test-classes/vars/....groovy
  1     info     Method "call" has a dynamic return type  MethodReturnTypeRequired

/Users/.../devel/test/bin/target/test-classes/vars/....groovy
  5     info     Method "call" has a dynamic return type  MethodReturnTypeRequired
  48    warning  The line exceeds 120 characters. The line is 176 characters.  LineLength              

/Users/.../devel/test/bin/target/test-classes/vars/....groovy
  1     info     Method "call" has a dynamic return type  MethodReturnTypeRequired
  6     warning  The variable [startServer] in class None is not used  UnusedVariable          
  7     warning  The variable [startNote] in class None is not used  UnusedVariable         

@nvuillam nvuillam reopened this May 22, 2020
@nvuillam
Copy link
Owner

nvuillam commented May 22, 2020

Please can you try the following command and post the full log ? (in private to nicolas.vuillamy@gmail.com if you don't want your log details to be posted publicly :) )
DEBUG=npm-groovy-lint npm-groovy-lint --files '**/*.groovy' --ignorepattern '/bin/**/*' --verbose

@nvuillam
Copy link
Owner

I think it would work with --ignorepattern '**/bin/**', please can you check ? 😃

@nvuillam
Copy link
Owner

as discussed by mail, problem solved with --ignorepattern '**/bin/**' , I close again the issue :)

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

Successfully merging a pull request may close this issue.

3 participants