Giter Club home page Giter Club logo

Comments (8)

nvuillam avatar nvuillam commented on September 25, 2024

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.

nvuillam avatar nvuillam commented on September 25, 2024

Addendum: seems also that your npx call has an issue

Try with Ant-Style arguments :)

npx npm-groovy-lint -f **/Jenkinsfile

image

from npm-groovy-lint.

sinkcup avatar sinkcup commented on September 25, 2024

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.

nvuillam avatar nvuillam commented on September 25, 2024

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.

sinkcup avatar sinkcup commented on September 25, 2024

I have tried */Jenkinsfile, it's wrong.
ignore maybe OK, but it's not easy to use

from npm-groovy-lint.

nvuillam avatar nvuillam commented on September 25, 2024

./Jenkinsfile ?

from npm-groovy-lint.

sinkcup avatar sinkcup commented on September 25, 2024

./Jenkinsfile is same as Jenkinsfile, output nothing.

from npm-groovy-lint.

nvuillam avatar nvuillam commented on September 25, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.