npm-groovy-lint icon indicating copy to clipboard operation
npm-groovy-lint copied to clipboard

Support Multiple Library Imports in Jenksinfile

Open codezninja opened this issue 2 years ago • 0 comments

So Jenkinsfile recommends importing multiple shared libraries like so

/* Accessing multiple libraries with one statement */
@Library(['my-shared-library', 'otherlib@abc1234']) _

npm-groovy-lint is by default failing for the _ on

  • The variable [_] in class None is not used UnusedVariable
  • Variable named _ in class None does not match the pattern [a-z][a-zA-Z0-9]* VariableName

Current workaround is to add // groovylint-disable-line UnusedVariable, VariableName. Could we by default add support for multiple library support?

codezninja avatar Oct 11 '22 10:10 codezninja