Skip to content

Commit 14f41bd

Browse files
committed
Add kind property to AnalysisConfig and documentation
1 parent d5e3177 commit 14f41bd

File tree

5 files changed

+17
-0
lines changed

5 files changed

+17
-0
lines changed

lib/analyze-action.js

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/init-action-post.js

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/upload-lib.js

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/upload-sarif-action.js

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/analyses.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,22 @@ export enum SARIF_UPLOAD_ENDPOINT {
4747

4848
// Represents configurations for different analysis kinds.
4949
export interface AnalysisConfig {
50+
/** The analysis kind the configuration is for. */
51+
kind: AnalysisKind;
52+
/** A display friendly name for logs. */
5053
name: string;
54+
/** The API endpoint to upload SARIF files to. */
5155
target: SARIF_UPLOAD_ENDPOINT;
56+
/** A predicate on filenames to decide whether a SARIF file
57+
* belongs to this kind of analysis. */
5258
sarifPredicate: (name: string) => boolean;
59+
/** A prefix for environment variables used to track the uniqueness of SARIF uploads. */
5360
sentinelPrefix: string;
5461
}
5562

5663
// Represents the Code Scanning analysis configuration.
5764
export const CodeScanning: AnalysisConfig = {
65+
kind: AnalysisKind.CodeScanning,
5866
name: "code scanning",
5967
target: SARIF_UPLOAD_ENDPOINT.CODE_SCANNING,
6068
sarifPredicate: (name) =>
@@ -64,6 +72,7 @@ export const CodeScanning: AnalysisConfig = {
6472

6573
// Represents the Code Quality analysis configuration.
6674
export const CodeQuality: AnalysisConfig = {
75+
kind: AnalysisKind.CodeQuality,
6776
name: "code quality",
6877
target: SARIF_UPLOAD_ENDPOINT.CODE_QUALITY,
6978
sarifPredicate: (name) => name.endsWith(".quality.sarif"),

0 commit comments

Comments
 (0)