Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion packages/code-analyzer-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
"url": "git+https://github.com/forcedotcom/code-analyzer-core.git",
"directory": "packages/code-analyzer-core"
},
"main": "dist/index.js",
"exports": {
".": "./dist/index.js",
"./output-formats": "./dist/output-formats/index.js"
},
"types": "dist/index.d.ts",
"dependencies": {
"@salesforce/code-analyzer-engine-api": "0.28.0-SNAPSHOT",
Expand Down
3 changes: 3 additions & 0 deletions packages/code-analyzer-core/src/output-formats/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export type {
ViolationCounts
} from "./results/json-run-results-format"
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,35 @@ export type JsonResultsOutput = {
runDir: string

// Object containing the aggregate counts of the violations
violationCounts: {
// The total amount of violations
total: number
violationCounts: ViolationCounts

// The amount of Critical severity level violations
sev1: number
// Object containing the versions of core and engine modules that ran
versions: JsonVersionOutput

// The amount of High severity level violations
sev2: number
// Array of objects containing information about the violations detected
violations: JsonViolationOutput[]
}
/**
* Type representing violation counts by severity level; this is specifically exported externally.
*/
export type ViolationCounts = {
// The total amount of violations
total: number

// The amount of Moderate severity level violations
sev3: number
// The amount of Critical severity level violations
sev1: number

// The amount of Low severity level violations
sev4: number
// The amount of High severity level violations
sev2: number

// The amount of Info severity level violations
sev5: number
}
// The amount of Moderate severity level violations
sev3: number

// Object containing the versions of core and engine modules that ran
versions: JsonVersionOutput
// The amount of Low severity level violations
sev4: number

// Array of objects containing information about the violations detected
violations: JsonViolationOutput[]
// The amount of Info severity level violations
sev5: number
}
export type JsonVersionOutput = {
[coreOrEngineName: string]: string
Expand Down
Loading