Code: Select all
import python
from File f
where f.getFileExtension() = "py"
select f, "Fichier Python analysé"
< /code>
Es gibt einen Fehler, der darauf hinweist: < /p>
Failed to run query:
ERROR: could not resolve module python (H:\Desktop\Codeql\test.ql:1,8-14)
ERROR: could not resolve type File (H:\Desktop\Codeql\test.ql:3,6-10
< /code>
Ich habe die Datenbank vorgeladen, bevor er die Abfrage mit diesem Befehl ausführte: < /p>
codeql database create database --language=python --overwrite
eingeben kannPS H:\Desktop\Codeql> codeql --version
CodeQL command-line toolchain release 2.19.3.
Copyright (C) 2019-2024 GitHub, Inc.
Unpacked in: h:\Desktop\codeql-win64\codeql
Analysis results depend critically on separately distributed query and
extractor modules. To list modules that are visible to the toolchain,
use 'codeql resolve packs' and 'codeql resolve languages'.
PS H:\Desktop\Codeql> codeql resolve languages
cpp (h:\Desktop\codeql-win64\codeql\cpp)
csharp (h:\Desktop\codeql-win64\codeql\csharp)
csv (h:\Desktop\codeql-win64\codeql\csv)
go (h:\Desktop\codeql-win64\codeql\go)
html (h:\Desktop\codeql-win64\codeql\html)
java (h:\Desktop\codeql-win64\codeql\java)
javascript (h:\Desktop\codeql-win64\codeql\javascript)
properties (h:\Desktop\codeql-win64\codeql\properties)
python (h:\Desktop\codeql-win64\codeql\python)
ruby (h:\Desktop\codeql-win64\codeql\ruby)
swift (h:\Desktop\codeql-win64\codeql\swift)
xml (h:\Desktop\codeql-win64\codeql\xml)
yaml (h:\Desktop\codeql-win64\codeql\yaml)
< /code>
Ich weiß nicht, wie man das Problem löst. < /p>
Ich erwarte, dass dieses Programm korrekt ausgeführt wird. Ich habe die Pfade richtig hinzugefügt (ich benutze Windows, aber selbst unter meinem Linux funktioniert es nicht)
 Mobile version
 Mobile version