-
Notifications
You must be signed in to change notification settings - Fork 516
Jenkins parser does not resolve shared library methods from @Library #7229
Copy link
Copy link
Open
Description
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
@Libraryimports as external dependencies so that downstream recipes can distinguish "unresolved external method" from "truly unknown method"
Reactions are currently unavailable
Metadata
Metadata
Assignees
Type
Projects
Status
No status