首页 > 解决方案 > 有没有办法在codeql中处理Lombok-ed源文件

问题描述

我正在尝试使用 codeql ( https://securitylab.github.com/tools/codeql ) 编写代码分析器,但我考虑了一个错误,该错误显示为以下内容

[2021-01-20 15:56:59] [javac-extractor-4576] [WARN] Skipping Lombok-ed source file: 

所以我的 lombok-ed 源文件不包含在 codeql 数据库中

eg.my lombok-ed 源文件显示为以下内容

public class Test1{
    public static String testOkHttpGet() {
        OkHttpClient okHttpClient = new OkHttpClient();

        HttpUrl httpUrl = HttpUrl.parse("http://localhost:8080/demo/list").newBuilder()
                .addQueryParameter("name", "HTTP").build();

        okhttp3.Request request = new okhttp3.Request.Builder().url(httpUrl.toString()).build();
        try (Response response = okHttpClient.newCall(request).execute()) {
            ResponseBody body = response.body();
            if (response.isSuccessful()) {
            } else {
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
        return null;
    }

    @Data
    @AllArgsConstructor
    class Student{
        String name;
        String age;
    }

}

并且该文件不包含在 src.zip 中 在此处输入图像描述

标签: githubcodeql

解决方案


推荐阅读