Skip to content

Codeql using open-api generator does not take into consideration .openapi-generator-ignore #15949

@mihaileb

Description

@mihaileb

We are using codeql in our Jenkins environment for a java library for a product.
The library contains a submodule which uses the openapi-generator maven plugin to generate classes from some specs.
We have added an .openapi-generator-ignore file containing the 3 files and locally it does not work.
When we run in in the pipeline it sees that this setting is not taken into consideration and we have compilation failure detection due to some files which should not be generated but taken from the generated source folder.

[2024-03-17T21:42:59.680Z] info  codeqlExecuteScan - [2024-03-17 22:42:59] [build-stdout] [INFO] Recompiling the module because of changed dependency.
[2024-03-17T21:42:59.680Z] info  codeqlExecuteScan - [2024-03-17 22:42:59] [build-stdout] [INFO] Compiling 194 source files with javac [debug parameters release 17] to target/classes
[2024-03-17T21:43:00.247Z] info  codeqlExecuteScan - [2024-03-17 22:43:00] [build-stdout] [INFO] -------------------------------------------------------------
[2024-03-17T21:43:00.247Z] error codeqlExecuteScan - [2024-03-17 22:43:00] [build-stdout] [ERROR] COMPILATION ERROR : 
[2024-03-17T21:43:00.247Z] info  codeqlExecuteScan - [2024-03-17 22:43:00] [build-stdout] [INFO] -------------------------------------------------------------
[2024-03-17T21:43:00.247Z] error codeqlExecuteScan - [2024-03-17 22:43:00] [build-stdout] [ERROR] /home/jenkins/agent/workspace/tityService_dim-client-java_main/dim-client-domain-model/generated/src/gen/java/main/com/sap/cp/cf/dim/client/model/DIDDocumentDTOContext.java:[67,58] illegal start of type

Have you encountered such an issue?
Thank you,
Bruno.

Metadata

Metadata

Assignees

No one assigned

    Labels

    JavaquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions