Description
The Jenkins/Groovy parser does not resolve methods provided by shared libraries imported via the @Library annotation. This affects any recipe that relies on type attribution in Jenkinsfiles and lead to unresolvable types.
Example Jenkinsfile:
#!groovy
@Library(['my-pipeline-library', 'my-jenkins-library'])
sbPipeline()
sbPipeline() is defined in an external Jenkins shared library, not in the Jenkinsfile itself. The parser cannot resolve this method, resulting in missing type attribution. Recipes like FindCallGraph then report "Method type not found" warnings, but the root cause is the parser not understanding @Library imports.
Expected behavior
The Jenkins/Groovy parser should either:
- Resolve shared library methods if the library source is available in the analysis scope, or
- Model
@Library imports as external dependencies so that downstream recipes can distinguish "unresolved external method" from "truly unknown method"
Description
The Jenkins/Groovy parser does not resolve methods provided by shared libraries imported via the
@Libraryannotation. This affects any recipe that relies on type attribution in Jenkinsfiles and lead to unresolvable types.Example Jenkinsfile:
sbPipeline()is defined in an external Jenkins shared library, not in the Jenkinsfile itself. The parser cannot resolve this method, resulting in missing type attribution. Recipes likeFindCallGraphthen report "Method type not found" warnings, but the root cause is the parser not understanding@Libraryimports.Expected behavior
The Jenkins/Groovy parser should either:
@Libraryimports as external dependencies so that downstream recipes can distinguish "unresolved external method" from "truly unknown method"