CodeQL integration with Visual Studio 2022
- 主要语言
- CodeQL
- 星标
- 10.1k
- 派生
- 2.1k
- 平均合并
- 2 天 15 小时
- 30 天内合并 PR
- 141
描述
Hello all,
I was trying to run Codeql from Visual studio2022, steps given below.
1-downloaded codeql-bundle-win64 from git >> set Path for Codeql
2-Open My sample C# application
3- Created Batch file with "codeql database create D:\csharp-database1057 --language=csharp --overwrite"
4- set as Prebuild event
5- Created Batch file with "codeql database analyze D:\csharp-database1057 csharp-code-scanning.qls --sarif-category=javascript-typescript --format=sarif-latest --output=C:\Output\xyz.sarif"
6- Build the solution
o/p: exception from step3
2023-12-22 18:29:48] Exception caught at top level: D:\csharp-database1057 is not a recognized CodeQL database.
com.semmle.cli2.database.DatabaseLayout.(DatabaseLayout.java:189)
com.semmle.cli2.database.DatabaseLayout.load(DatabaseLayout.java:136)
com.semmle.cli2.database.DatabaseLayout.loadAndSetupLogging(DatabaseLayout.java:237)
com.semmle.cli2.database.MultiDatabaseOptions.resolveDatabases(MultiDatabaseOptions.java:68)
com.semmle.cli2.database.MultiDatabaseOptions.resolveDatabases(MultiDatabaseOptions.java:60)
com.semmle.cli2.database.FinalizeCommand.executeSubcommand(FinalizeCommand.java:120)
com.semmle.cli2.picocli.SubcommandCommon.lambda$executeSubcommandWithMessages$5(SubcommandCommon.java:803)
com.semmle.cli2.picocli.SubcommandCommon.withCompilationMessages(SubcommandCommon.java:442)
com.semmle.cli2.picocli.SubcommandCommon.executeSubcommandWithMessages(SubcommandCommon.java:801)
com.semmle.cli2.picocli.PlumbingRunner.run(PlumbingRunner.java:119)
com.semmle.cli2.picocli.SubcommandCommon.runPlumbingInProcess(SubcommandCommon.java:199)
com.semmle.cli2.database.CreateCommand.executeSubcommand(CreateCommand.java:199)
com.semmle.cli2.picocli.SubcommandCommon.lambda$executeSubcommandWithMessages$5(SubcommandCommon.java:803)
com.semmle.cli2.picocli.SubcommandCommon.withCompilationMessages(SubcommandCommon.java:442)
com.semmle.cli2.picocli.SubcommandCommon.executeSubcommandWithMessages(SubcommandCommon.java:801)
com.semmle.cli2.picocli.SubcommandCommon.toplevelMain(SubcommandCommon.java:685)
com.semmle.cli2.picocli.SubcommandCommon.call(SubcommandCommon.java:666)
com.semmle.cli2.picocli.SubcommandMaker.runMain(SubcommandMaker.java:237)
com.semmle.cli2.picocli.SubcommandMaker.runMain(SubcommandMaker.java:247)
com.semmle.cli2.CodeQL.main(CodeQL.java:115)
Can someone provide suggestion how I can go about this CodeQL integration with Vs2022? Any suggestions will be greatly appreciated.
It is working fine with individual command execution from Command Prompt for Database Creation /database analyze.
Thanks,
Avdhesh
贡献指南
评估
这个 Issue 还没有评估数据。