Set up automated coverage reports for Go

Copied from https://github.com/github/codeql/pull/6148
This commit is contained in:
Owen Mansel-Chan 2023-10-11 16:39:14 +01:00
Родитель a31f946d6f
Коммит 06a600c7fb
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 67E427E02E6DA1B8
6 изменённых файлов: 23 добавлений и 3 удалений

Просмотреть файл

@ -0,0 +1 @@
CWE,Sink identifier,Label
1 CWE Sink identifier Label

Просмотреть файл

@ -0,0 +1 @@
Framework name,URL,Package prefixes
1 Framework name URL Package prefixes

Просмотреть файл

@ -0,0 +1,14 @@
/**
* @name Framework coverage
* @description The number of API endpoints covered by MaD models sorted by
* package and source-, sink-, and summary-kind.
* @kind table
* @id go/meta/framework-coverage
*/
import go
import semmle.go.dataflow.ExternalFlow
from string package, int pkgs, string kind, string part, int n
where modelCoverage(package, pkgs, kind, part, n)
select package, pkgs, kind, part, n

Просмотреть файл

@ -114,7 +114,9 @@ configs = [
utils.LanguageConfig(
"java", "Java", ".java", query_prefix + "java/ql/src/meta/frameworks/Coverage.ql"),
utils.LanguageConfig(
"csharp", "C#", ".cs", query_prefix + "csharp/ql/src/meta/frameworks/Coverage.ql")
"csharp", "C#", ".cs", query_prefix + "csharp/ql/src/meta/frameworks/Coverage.ql"),
utils.LanguageConfig(
"go", "Go", ".go", query_prefix + "go/ql/src/meta/frameworks/Coverage.ql")
]
# The names of input and output files. The placeholder {language} is replaced with the language name.

Просмотреть файл

@ -74,7 +74,9 @@ configs = [
utils.LanguageConfig(
"java", "Java", ".java", "java/ql/src/meta/frameworks/Coverage.ql", ["java/ql/lib/config/semmlecode.dbscheme", "java/ql/src/config/semmlecode.dbscheme"]),
utils.LanguageConfig(
"csharp", "C#", ".cs", "csharp/ql/src/meta/frameworks/Coverage.ql", ["csharp/ql/lib/semmlecode.csharp.dbscheme", "csharp/ql/src/semmlecode.csharp.dbscheme"])
"csharp", "C#", ".cs", "csharp/ql/src/meta/frameworks/Coverage.ql", ["csharp/ql/lib/semmlecode.csharp.dbscheme", "csharp/ql/src/semmlecode.csharp.dbscheme"]),
utils.LanguageConfig(
"go", "Go", ".go", "go/ql/src/meta/frameworks/Coverage.ql", ["go/ql/lib/go.dbscheme", "go/ql/src/go.dbscheme"])
]
output_prefix = "framework-coverage-timeseries-"

Просмотреть файл

@ -21,4 +21,4 @@ output_csv_file_name = "coverage.csv"
repo_output_rst = documentation_folder + output_rst_file_name
repo_output_csv = documentation_folder + output_csv_file_name
languages = ['java', 'csharp']
languages = ['java', 'csharp', 'go']