Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Uninformative error message from qltest when there are no source files #3406

Copy link
Copy link
Closed
@ghost

Description

I ran odasa qltest on a test directory in which I'd neglected to include any source files.

Expected: The extractor should fail with a message like "There are no source files in this test directory."

Actual: The extractor fails with a null pointer exception.

[1/3] Extraction failed in D:\dev\codeql-2\msft\cpp\ql\test\query-tests\Maintainability\CopyrightNoticeCommentsExpertise (extraction: 175ms)
java.lang.NullPointerException
java.nio.file.Files.provider(Files.java:97)
java.nio.file.Files.exists(Files.java:2385)
com.semmle.api.QueryEngine.createDatabase(QueryEngine.java:486)
com.semmle.odasa.qltest.TestDirectory.createDatabase(TestDirectory.java:483)
com.semmle.odasa.qltest.TestDirectory.importTrap(TestDirectory.java:583)
com.semmle.odasa.qltest.TestDirectory.extract(TestDirectory.java:310)
com.semmle.odasa.actions.Qltest.lambda$executeTests$0(Qltest.java:230)
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
java.util.concurrent.FutureTask.run(FutureTask.java:266)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
java.lang.Thread.run(Thread.java:748)

Let me know if this isn't the right repo to file this in.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requestedFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.