Open KingXS opened 1 year ago
This is because those files use Lombok, and Lombok is only supported via workarounds at the moment. Seamless Lombok support is coming soon, but until then you can work around this by running delombok before building the project.
For jeecg-boot, I was able to do this using the Maven delombok plugin:
<plugins>
block of the root pom.xml
file: <plugin>
<groupId>org.projectlombok</groupId>
<artifactId>lombok-maven-plugin</artifactId>
<version>1.18.20.0</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>delombok</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<!-- Note I force using the latest Lombok, because 1.18.20 has a bug that breaks delombok for this project -->
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.28</version>
</dependency>
</dependencies>
</plugin>
Move src/main/java
directories to src/main/lombok
-- this means they will be put through delombok before compilation: for d in $(find . | grep src/main/java$); do mv $d ${d/java/lombok}; done
Extract with CodeQL: codeql database create -l java codeql-db
-- CodeQL will now see the delombok'd "plain" Java that it understands.
When I add the CodeQL-generated source code analysis database (referred to as "jeecgdb source archive") to the workspace in VS Code for viewing, I notice that some source code files are missing in the generated database structure. What could be the reason for this situation?
The missing file is:/Users/fqy/Desktop/CodeAudit/JAVA/jeecg-boot-3.5.0/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/api/controller/SystemApiController.java,In the generated database file, none of the files under the "api" directory have been included.