exasol/error-code-crawler-maven-plugin

Wrong src url when used with lombok

Closed this issue · 2 comments

When used with projects that use Lombok, we run this tool on the delomboked sources. So on target/delombok/main/ instread of src/main/java. That's required because this plugin could not parse the sourecode with Lombok annotations (Spoon woul throw compile errors).

A problem with that is, that the crawler writes the wrong URLs into the report. For example:

{
      "identifier": "E-PK-SMC-37",
      "message": "Could not get checked out branch of repository.",
      "sourceFile": "target/delombok/main/com/exasol/projectkeeper/shared/repository/GitRepository.java",
      "sourceLine": 53,
    },

A simple solution would be to replace the prefix in the filename. However, this does not fit, since the line-numbers are different in the delomboked files, since the Lombok annotations are unfolded to Java code.

Another idea is to change the crawler to run on the compiled byte code instead of the source code.

Another option would be simply not to crawl the source location in that case. Currently, we anyway don't display it in the catalog.

Don't craw in this case.