We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Description of the false positive
Variables that are only used in junit assert statements like assertEquals are marked as Unread local variable.
assert
assertEquals
Unread local variable
Code samples or links to source code
I.e. https://github.com/it-at-m/refarch/blob/e18859331d0f55b43aae3170f947b840df1fde9c/refarch-integrations/refarch-dms-integration/refarch-dms-integration-core/src/test/java/de/muenchen/refarch/integration/dms/adapter/out/fabasoft/FabasoftAdapterTest.java#L84-L86 where procedureResponse is marked as Unread local variable. This makes also no difference if Lombok val is used or the direct type.
procedureResponse
val
Above code extracted for reference:
val procedureResponse = fabasoftAdapter.createFile(file, "user"); assertEquals(procedureResponse, "1234567890");
URL to the alert on GitHub code scanning (optional)
https://github.com/it-at-m/refarch/security/code-scanning/36 https://github.com/it-at-m/refarch/security/code-scanning/55 (same line but with direct type String)
The text was updated successfully, but these errors were encountered:
Could be a duplicate of #11989 but not really sure.
Sorry, something went wrong.
Looks like this is caused by use of the package com.fabasoft.schemas.websvc.lhmbai_15_1700_giwsd, which appears to be generated code. I recommend either generating Java source for that package (within the repository directory) prior to CodeQL extraction, or switching to build-mode autobuild or manual per https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages#codeql-build-modes in order to generate and analyse this code as part of your normal build process.
com.fabasoft.schemas.websvc.lhmbai_15_1700_giwsd
autobuild
manual
No branches or pull requests
Description of the false positive
Variables that are only used in junit
assert
statements likeassertEquals
are marked asUnread local variable
.Code samples or links to source code
I.e. https://github.com/it-at-m/refarch/blob/e18859331d0f55b43aae3170f947b840df1fde9c/refarch-integrations/refarch-dms-integration/refarch-dms-integration-core/src/test/java/de/muenchen/refarch/integration/dms/adapter/out/fabasoft/FabasoftAdapterTest.java#L84-L86
where
procedureResponse
is marked asUnread local variable
. This makes also no difference if Lombokval
is used or the direct type.Above code extracted for reference:
URL to the alert on GitHub code scanning (optional)
https://github.com/it-at-m/refarch/security/code-scanning/36
https://github.com/it-at-m/refarch/security/code-scanning/55 (same line but with direct type String)
The text was updated successfully, but these errors were encountered: