0

I would like to use Code QL in Visual Studio Code to parse a Java project and I am selecting the source folder of my java project after clicking on the icon "choose database from folder". My project's folder looks like this: enter image description here

I am receiving the error 'c:\Users\mouna\git\chess\java-chess' does not contain a dataset directory. , how can I fix this? what am I doing wrong?

1 Answers1

1

First of all you have to install the codeQL package in your machine. Makesure codeql command is accessible from your command line by adding it in environment variable PATH. Then follow the instruction here and create a database for your codebase

ex : codeql database  create projectName-database --language=java
      --command="mvn clean install" --source-root="C:\code\projectFolder"

Then upload the newly created database to VS code. Follow the instructions here to to run your analysis

Steephen
  • 14,645
  • 7
  • 40
  • 47
  • I did this exactly, and it still gives me the same error – Mansur Sep 11 '21 at 05:58
  • `Spawned process exited abnormally (code 1; tried to run: [D:\Tools\codeql-win64\codeql\tools\win64\runner.exe, cmd.exe, /C, type, NUL, &&, D:\Tools\codeql-win64\codeql\xml\tools\index-files.cmd, D:\Projects\IntelliJ Projects\codeql_target_repo\java-database\working\files-to-index1524764287162886810.list])` and this was the command: `codeql database create java-database --language=java --command="mvn clean package"` – Mansur Sep 13 '21 at 00:47