Comments (8)
It's because your test cases are in /tmp folder ^^
As CodeNarc requires RuleSet files in groovy format, I generate them "on the fly" from groovylintrc.js analysis , then store them in a temporary groovy file (in os.tmpDir) that I send to CodeNarc as argument
The second file you see is this temporary file ( stored in /tmp, like your test file )
I think that if you put your file anywhere else , you will have a single result :)
Note: in the future, I'll propose a PR to CodeNarc where I can send the RuleSets content as argument instead of file, so this issue should disappear 😇
from npm-groovy-lint.
Addendum: seems also that your npx call has an issue
Try with Ant-Style arguments :)
npx npm-groovy-lint -f **/Jenkinsfile
from npm-groovy-lint.
this project only has 1 Jenkinsfile, it's ./Jenkinsfile
, if use **/Jenkinsfile
, it will check ./node_moudles/xxx/Jenkinsfile
, so how can I check ./Jenkinsfile
from npm-groovy-lint.
hmmmm there must be some Ant way to write it 😄
maybe --files */Jenkinsfile
?
https://ant.apache.org/manual/dirtasks.html#patterns
You can also exclude node_modules
npm-groovy-lint --files **/Jenkinsfile --ignorepattern **/node_modules/**
should work, but if my first proposed solution works too, it will be more performant (less files to browse)
from npm-groovy-lint.
I have tried */Jenkinsfile
, it's wrong.
ignore maybe OK, but it's not easy to use
from npm-groovy-lint.
./Jenkinsfile
?
from npm-groovy-lint.
./Jenkinsfile
is same as Jenkinsfile
, output nothing.
from npm-groovy-lint.
hmmmm i'm struggling but i didn't find a solution yet
my real job is starting, i may check later ;)
from npm-groovy-lint.
Related Issues (20)
- Error when running as pre-commit hook: SyntaxError: Unexpected token ; HOT 2
- Error with latest version of the docker container when running in GHA HOT 13
- CodeNarcServer unexpected error HOT 11
- Make a warning when enabling non-disabled rule HOT 5
- Critical vulnerabilities with axios package in latest version HOT 4
- Incorrect indentation in blocks and braces HOT 2
- Error running npm-groovy-lint in Docker container: GroovyLint: Unable to start CodeNarc Server. HOT 2
- In case of grouped imports linter returns error NglParseError: unable to find class 'TestGroup.CAN' HOT 2
- CodeNarcServer unexpected error: Parse Error: Invalid status code HOT 8
- bug: Wrong autoformat indentation after complex expressions HOT 3
- bug: Wrong indentation for comments HOT 2
- Unable to disable indentation formatting HOT 3
- indentation issue HOT 2
- Dependency Dashboard
- Exception in thread "main" com.fasterxml.jackson.databind.JsonMappingException: Document nesting depth (1001) exceeds the maximum allowed HOT 10
- Transversal dependency to Inflight 1.0.6 HOT 2
- Cannot read properties of undefined (reading 'filename') HOT 7
- Error "unable to resolve class Library" with [email protected] HOT 6
- Adding custom jar files for Groovy parsing HOT 1
- NglParseError when trying to lint a groovy shared library via pre-commit
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from npm-groovy-lint.