Initial commit (from f5274cbdce4ae7c9e4b937dcdf95ac70ae436d5f)
This commit is contained in:
commit
28ccc3db2d
13974 changed files with 2618436 additions and 0 deletions
92
src/testdata/fingerprinting.expected.sarif
vendored
Normal file
92
src/testdata/fingerprinting.expected.sarif
vendored
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
{
|
||||
"$schema": "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json",
|
||||
"version": "2.1.0",
|
||||
"runs": [
|
||||
{
|
||||
"tool": {
|
||||
"driver": {
|
||||
"name": "CodeQL command-line toolchain",
|
||||
"organization": "GitHub",
|
||||
"semanticVersion": "2.0.0",
|
||||
"rules": []
|
||||
}
|
||||
},
|
||||
"artifacts": [
|
||||
{
|
||||
"location": {
|
||||
"uri": "testFile1.js",
|
||||
"uriBaseId": "%SRCROOT%",
|
||||
"index": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"location": {
|
||||
"uri": "testFile2.js",
|
||||
"uriBaseId": "%SRCROOT%",
|
||||
"index": 1
|
||||
}
|
||||
}
|
||||
],
|
||||
"results": [
|
||||
{
|
||||
"ruleId": "js/unused-local-variable",
|
||||
"ruleIndex": 0,
|
||||
"message": {
|
||||
"text": "Unused variable a."
|
||||
},
|
||||
"locations": [
|
||||
{
|
||||
"physicalLocation": {
|
||||
"artifactLocation": {
|
||||
"uri": "testFile1.js",
|
||||
"uriBaseId": "%SRCROOT%",
|
||||
"index": 0
|
||||
},
|
||||
"region": {
|
||||
"startLine": 1,
|
||||
"startColumn": 1,
|
||||
"endColumn": 10
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"partialFingerprints": {
|
||||
"primaryLocationLineHash": "5e4d5a9cf1294ad9:1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"ruleId": "js/unused-local-variable",
|
||||
"ruleIndex": 0,
|
||||
"message": {
|
||||
"text": "Unused variable bar."
|
||||
},
|
||||
"locations": [
|
||||
{
|
||||
"physicalLocation": {
|
||||
"artifactLocation": {
|
||||
"index": 1
|
||||
},
|
||||
"region": {
|
||||
"startLine": 2
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"partialFingerprints": {
|
||||
"primaryLocationLineHash": "f7592a95a9381ac0:1"
|
||||
}
|
||||
}
|
||||
],
|
||||
"newlineSequences": [
|
||||
"\r\n",
|
||||
"\n",
|
||||
"
",
|
||||
"
"
|
||||
],
|
||||
"columnKind": "utf16CodeUnits",
|
||||
"properties": {
|
||||
"semmle.formatSpecifier": "sarif-latest"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
86
src/testdata/fingerprinting.input.sarif
vendored
Normal file
86
src/testdata/fingerprinting.input.sarif
vendored
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
{
|
||||
"$schema": "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json",
|
||||
"version": "2.1.0",
|
||||
"runs": [
|
||||
{
|
||||
"tool": {
|
||||
"driver": {
|
||||
"name": "CodeQL command-line toolchain",
|
||||
"organization": "GitHub",
|
||||
"semanticVersion": "2.0.0",
|
||||
"rules": []
|
||||
}
|
||||
},
|
||||
"artifacts": [
|
||||
{
|
||||
"location": {
|
||||
"uri": "testFile1.js",
|
||||
"uriBaseId": "%SRCROOT%",
|
||||
"index": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"location": {
|
||||
"uri": "testFile2.js",
|
||||
"uriBaseId": "%SRCROOT%",
|
||||
"index": 1
|
||||
}
|
||||
}
|
||||
],
|
||||
"results": [
|
||||
{
|
||||
"ruleId": "js/unused-local-variable",
|
||||
"ruleIndex": 0,
|
||||
"message": {
|
||||
"text": "Unused variable a."
|
||||
},
|
||||
"locations": [
|
||||
{
|
||||
"physicalLocation": {
|
||||
"artifactLocation": {
|
||||
"uri": "testFile1.js",
|
||||
"uriBaseId": "%SRCROOT%",
|
||||
"index": 0
|
||||
},
|
||||
"region": {
|
||||
"startLine": 1,
|
||||
"startColumn": 1,
|
||||
"endColumn": 10
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"ruleId": "js/unused-local-variable",
|
||||
"ruleIndex": 0,
|
||||
"message": {
|
||||
"text": "Unused variable bar."
|
||||
},
|
||||
"locations": [
|
||||
{
|
||||
"physicalLocation": {
|
||||
"artifactLocation": {
|
||||
"index": 1
|
||||
},
|
||||
"region": {
|
||||
"startLine": 2
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"newlineSequences": [
|
||||
"\r\n",
|
||||
"\n",
|
||||
"
",
|
||||
"
"
|
||||
],
|
||||
"columnKind": "utf16CodeUnits",
|
||||
"properties": {
|
||||
"semmle.formatSpecifier": "sarif-latest"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
77
src/testdata/fingerprinting2.expected.sarif
vendored
Normal file
77
src/testdata/fingerprinting2.expected.sarif
vendored
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
{
|
||||
"runs": [
|
||||
{
|
||||
"artifacts": [
|
||||
{
|
||||
"location": {
|
||||
"index": 0,
|
||||
"uri": "src/ex_cmds.h",
|
||||
"uriBaseId": "%SRCROOT%"
|
||||
}
|
||||
}
|
||||
],
|
||||
"columnKind": "utf16CodeUnits",
|
||||
"properties": {
|
||||
"semmle.formatSpecifier": "sarif-latest"
|
||||
},
|
||||
"results": [
|
||||
{
|
||||
"locations": [
|
||||
{
|
||||
"physicalLocation": {
|
||||
"artifactLocation": {
|
||||
"index": 0,
|
||||
"uri": "no_header_guard.h",
|
||||
"uriBaseId": "%SRCROOT%"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"message": {
|
||||
"text": "This header file should contain a header guard to prevent multiple inclusion."
|
||||
},
|
||||
"partialFingerprints": {
|
||||
"primaryLocationLineHash": "599c824c91d0f75e:1"
|
||||
},
|
||||
"ruleId": "cpp/missing-header-guard",
|
||||
"ruleIndex": 0
|
||||
}
|
||||
],
|
||||
"tool": {
|
||||
"driver": {
|
||||
"name": "CodeQL command-line toolchain",
|
||||
"organization": "GitHub",
|
||||
"rules": [
|
||||
{
|
||||
"defaultConfiguration": {},
|
||||
"fullDescription": {
|
||||
"text": "Header files should contain header guards (#defines to prevent the file from being included twice). This prevents errors and inefficiencies caused by repeated inclusion."
|
||||
},
|
||||
"id": "cpp/missing-header-guard",
|
||||
"name": "cpp/missing-header-guard",
|
||||
"properties": {
|
||||
"description": "Header files should contain header guards (#defines to prevent\n the file from being included twice). This prevents errors and\n inefficiencies caused by repeated inclusion.",
|
||||
"id": "cpp/missing-header-guard",
|
||||
"kind": "problem",
|
||||
"name": "Missing header guard",
|
||||
"precision": "high",
|
||||
"problem.severity": "warning",
|
||||
"tags": [
|
||||
"efficiency",
|
||||
"maintainability",
|
||||
"modularity",
|
||||
"external/jsf"
|
||||
]
|
||||
},
|
||||
"shortDescription": {
|
||||
"text": "Missing header guard"
|
||||
}
|
||||
}
|
||||
],
|
||||
"semanticVersion": "2.0.0+202002031536"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"version": "2.1.0"
|
||||
}
|
||||
76
src/testdata/fingerprinting2.input.sarif
vendored
Normal file
76
src/testdata/fingerprinting2.input.sarif
vendored
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
{
|
||||
"runs": [
|
||||
{
|
||||
"artifacts": [
|
||||
{
|
||||
"location": {
|
||||
"index": 0,
|
||||
"uri": "src/ex_cmds.h",
|
||||
"uriBaseId": "%SRCROOT%"
|
||||
}
|
||||
}
|
||||
],
|
||||
"columnKind": "utf16CodeUnits",
|
||||
"properties": {
|
||||
"semmle.formatSpecifier": "sarif-latest"
|
||||
},
|
||||
"results": [
|
||||
{
|
||||
"locations": [
|
||||
{
|
||||
"physicalLocation": {
|
||||
"artifactLocation": {
|
||||
"index": 0,
|
||||
"uri": "no_header_guard.h",
|
||||
"uriBaseId": "%SRCROOT%"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"message": {
|
||||
"text": "This header file should contain a header guard to prevent multiple inclusion."
|
||||
},
|
||||
"partialFingerprints": {
|
||||
},
|
||||
"ruleId": "cpp/missing-header-guard",
|
||||
"ruleIndex": 0
|
||||
}
|
||||
],
|
||||
"tool": {
|
||||
"driver": {
|
||||
"name": "CodeQL command-line toolchain",
|
||||
"organization": "GitHub",
|
||||
"rules": [
|
||||
{
|
||||
"defaultConfiguration": {},
|
||||
"fullDescription": {
|
||||
"text": "Header files should contain header guards (#defines to prevent the file from being included twice). This prevents errors and inefficiencies caused by repeated inclusion."
|
||||
},
|
||||
"id": "cpp/missing-header-guard",
|
||||
"name": "cpp/missing-header-guard",
|
||||
"properties": {
|
||||
"description": "Header files should contain header guards (#defines to prevent\n the file from being included twice). This prevents errors and\n inefficiencies caused by repeated inclusion.",
|
||||
"id": "cpp/missing-header-guard",
|
||||
"kind": "problem",
|
||||
"name": "Missing header guard",
|
||||
"precision": "high",
|
||||
"problem.severity": "warning",
|
||||
"tags": [
|
||||
"efficiency",
|
||||
"maintainability",
|
||||
"modularity",
|
||||
"external/jsf"
|
||||
]
|
||||
},
|
||||
"shortDescription": {
|
||||
"text": "Missing header guard"
|
||||
}
|
||||
}
|
||||
],
|
||||
"semanticVersion": "2.0.0+202002031536"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"version": "2.1.0"
|
||||
}
|
||||
5
src/testdata/no_header_guard.h
vendored
Normal file
5
src/testdata/no_header_guard.h
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
/*
|
||||
* Blah blah
|
||||
*/
|
||||
|
||||
#define BLAH 1234
|
||||
4
src/testdata/testFile1.js
vendored
Normal file
4
src/testdata/testFile1.js
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
var a = 0;
|
||||
var b = 0;
|
||||
var c = 0;
|
||||
var d = 0;
|
||||
4
src/testdata/testFile2.js
vendored
Normal file
4
src/testdata/testFile2.js
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
var foo = 0;
|
||||
var bar = 0;
|
||||
var baz = 0;
|
||||
var qux = 0;
|
||||
Loading…
Add table
Add a link
Reference in a new issue