flowlint 0.5.3 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. package/README.md +45 -355
  2. package/dist/cli.js +8053 -21
  3. package/dist/cli.js.map +1 -1
  4. package/package.json +52 -57
  5. package/dist/cli.d.ts +0 -8
  6. package/dist/commands/init.d.ts +0 -8
  7. package/dist/commands/init.js +0 -34
  8. package/dist/commands/init.js.map +0 -1
  9. package/dist/commands/scan.d.ts +0 -11
  10. package/dist/commands/scan.js +0 -104
  11. package/dist/commands/scan.js.map +0 -1
  12. package/dist/packages/config/flowlint-config.d.ts +0 -73
  13. package/dist/packages/config/flowlint-config.js +0 -120
  14. package/dist/packages/config/flowlint-config.js.map +0 -1
  15. package/dist/packages/config/index.d.ts +0 -4
  16. package/dist/packages/config/index.js +0 -21
  17. package/dist/packages/config/index.js.map +0 -1
  18. package/dist/packages/github/client.d.ts +0 -2
  19. package/dist/packages/github/client.js +0 -94
  20. package/dist/packages/github/client.js.map +0 -1
  21. package/dist/packages/logger/index.d.ts +0 -11
  22. package/dist/packages/logger/index.js +0 -40
  23. package/dist/packages/logger/index.js.map +0 -1
  24. package/dist/packages/observability/collectors.d.ts +0 -40
  25. package/dist/packages/observability/collectors.js +0 -75
  26. package/dist/packages/observability/collectors.js.map +0 -1
  27. package/dist/packages/observability/index.d.ts +0 -10
  28. package/dist/packages/observability/index.js +0 -35
  29. package/dist/packages/observability/index.js.map +0 -1
  30. package/dist/packages/observability/metrics.d.ts +0 -119
  31. package/dist/packages/observability/metrics.js +0 -194
  32. package/dist/packages/observability/metrics.js.map +0 -1
  33. package/dist/packages/observability/middleware.d.ts +0 -32
  34. package/dist/packages/observability/middleware.js +0 -58
  35. package/dist/packages/observability/middleware.js.map +0 -1
  36. package/dist/packages/review/analysis-engine.d.ts +0 -19
  37. package/dist/packages/review/analysis-engine.js +0 -111
  38. package/dist/packages/review/analysis-engine.js.map +0 -1
  39. package/dist/packages/review/index.d.ts +0 -12
  40. package/dist/packages/review/index.js +0 -29
  41. package/dist/packages/review/index.js.map +0 -1
  42. package/dist/packages/review/parser-n8n.d.ts +0 -2
  43. package/dist/packages/review/parser-n8n.js +0 -122
  44. package/dist/packages/review/parser-n8n.js.map +0 -1
  45. package/dist/packages/review/providers/github.d.ts +0 -62
  46. package/dist/packages/review/providers/github.js +0 -275
  47. package/dist/packages/review/providers/github.js.map +0 -1
  48. package/dist/packages/review/providers.d.ts +0 -106
  49. package/dist/packages/review/providers.js +0 -12
  50. package/dist/packages/review/providers.js.map +0 -1
  51. package/dist/packages/review/reporter.d.ts +0 -17
  52. package/dist/packages/review/reporter.js +0 -59
  53. package/dist/packages/review/reporter.js.map +0 -1
  54. package/dist/packages/review/rules/index.d.ts +0 -9
  55. package/dist/packages/review/rules/index.js +0 -415
  56. package/dist/packages/review/rules/index.js.map +0 -1
  57. package/dist/packages/review/rules/rule-utils.d.ts +0 -36
  58. package/dist/packages/review/rules/rule-utils.js +0 -75
  59. package/dist/packages/review/rules/rule-utils.js.map +0 -1
  60. package/dist/packages/review/schemas/index.d.ts +0 -17
  61. package/dist/packages/review/schemas/index.js +0 -167
  62. package/dist/packages/review/schemas/index.js.map +0 -1
  63. package/dist/packages/review/schemas/n8n-workflow.schema.json +0 -177
  64. package/dist/packages/review/sniffer.d.ts +0 -15
  65. package/dist/packages/review/sniffer.js +0 -47
  66. package/dist/packages/review/sniffer.js.map +0 -1
  67. package/dist/packages/review/types.d.ts +0 -40
  68. package/dist/packages/review/types.js +0 -3
  69. package/dist/packages/review/types.js.map +0 -1
  70. package/dist/packages/review/utils/findings.d.ts +0 -23
  71. package/dist/packages/review/utils/findings.js +0 -34
  72. package/dist/packages/review/utils/findings.js.map +0 -1
  73. package/dist/packages/review/utils/merge.d.ts +0 -12
  74. package/dist/packages/review/utils/merge.js +0 -40
  75. package/dist/packages/review/utils/merge.js.map +0 -1
  76. package/dist/packages/review/utils.d.ts +0 -60
  77. package/dist/packages/review/utils.js +0 -214
  78. package/dist/packages/review/utils.js.map +0 -1
  79. package/dist/packages/tracing/github-tracer.d.ts +0 -38
  80. package/dist/packages/tracing/github-tracer.js +0 -79
  81. package/dist/packages/tracing/github-tracer.js.map +0 -1
  82. package/dist/packages/tracing/index.d.ts +0 -81
  83. package/dist/packages/tracing/index.js +0 -240
  84. package/dist/packages/tracing/index.js.map +0 -1
  85. package/dist/packages/tracing/tracer.d.ts +0 -30
  86. package/dist/packages/tracing/tracer.js +0 -141
  87. package/dist/packages/tracing/tracer.js.map +0 -1
  88. package/dist/providers/local-config-provider.d.ts +0 -11
  89. package/dist/providers/local-config-provider.js +0 -39
  90. package/dist/providers/local-config-provider.js.map +0 -1
  91. package/dist/providers/local-file-source.d.ts +0 -13
  92. package/dist/providers/local-file-source.js +0 -47
  93. package/dist/providers/local-file-source.js.map +0 -1
  94. package/dist/reporters/console-reporter.d.ts +0 -8
  95. package/dist/reporters/console-reporter.js +0 -75
  96. package/dist/reporters/console-reporter.js.map +0 -1
  97. package/dist/reporters/github-actions-reporter.d.ts +0 -30
  98. package/dist/reporters/github-actions-reporter.js +0 -104
  99. package/dist/reporters/github-actions-reporter.js.map +0 -1
  100. package/dist/reporters/json-reporter.d.ts +0 -14
  101. package/dist/reporters/json-reporter.js +0 -57
  102. package/dist/reporters/json-reporter.js.map +0 -1
  103. package/dist/reporters/junit-reporter.d.ts +0 -25
  104. package/dist/reporters/junit-reporter.js +0 -142
  105. package/dist/reporters/junit-reporter.js.map +0 -1
  106. package/dist/reporters/sarif-reporter.d.ts +0 -21
  107. package/dist/reporters/sarif-reporter.js +0 -125
  108. package/dist/reporters/sarif-reporter.js.map +0 -1
@@ -1,30 +0,0 @@
1
- /**
2
- * GitHub Actions Reporter
3
- * Outputs findings using GitHub Actions workflow commands
4
- * Suitable for:
5
- * - GitHub Actions workflows
6
- * - Immediate inline annotations in workflow logs
7
- * - Complementary to SARIF (SARIF for Code Scanning, this for workflow logs)
8
- *
9
- * Format: ::error file={file},line={line}::{message}
10
- * Docs: https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions
11
- */
12
- import type { AnalysisResult, Reporter } from 'packages/review/providers';
13
- export declare class GithubActionsReporter implements Reporter {
14
- report(results: AnalysisResult[]): Promise<void>;
15
- private outputWorkflowCommand;
16
- private severityToCommand;
17
- private buildProperties;
18
- private buildMessage;
19
- private outputSummary;
20
- /**
21
- * Escape property values for GitHub Actions workflow commands
22
- * Properties use comma as delimiter, so commas must be escaped
23
- */
24
- private escapeProperty;
25
- /**
26
- * Escape data values for GitHub Actions workflow commands
27
- * Data values support newlines but special characters must be escaped
28
- */
29
- private escapeData;
30
- }
@@ -1,104 +0,0 @@
1
- "use strict";
2
- /**
3
- * GitHub Actions Reporter
4
- * Outputs findings using GitHub Actions workflow commands
5
- * Suitable for:
6
- * - GitHub Actions workflows
7
- * - Immediate inline annotations in workflow logs
8
- * - Complementary to SARIF (SARIF for Code Scanning, this for workflow logs)
9
- *
10
- * Format: ::error file={file},line={line}::{message}
11
- * Docs: https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions
12
- */
13
- Object.defineProperty(exports, "__esModule", { value: true });
14
- exports.GithubActionsReporter = void 0;
15
- const findings_1 = require("../packages/review/utils/findings");
16
- class GithubActionsReporter {
17
- async report(results) {
18
- const allFindings = results.flatMap((r) => r.findings);
19
- // Output workflow commands for each finding
20
- for (const result of results) {
21
- for (const finding of result.findings) {
22
- this.outputWorkflowCommand(finding);
23
- }
24
- }
25
- // Output summary
26
- this.outputSummary(allFindings);
27
- }
28
- outputWorkflowCommand(finding) {
29
- const command = this.severityToCommand(finding.severity);
30
- const properties = this.buildProperties(finding);
31
- const message = this.buildMessage(finding);
32
- console.log(`::${command} ${properties}::${message}`);
33
- }
34
- severityToCommand(severity) {
35
- switch (severity) {
36
- case 'must':
37
- return 'error';
38
- case 'should':
39
- return 'warning';
40
- case 'nit':
41
- return 'notice';
42
- }
43
- }
44
- buildProperties(finding) {
45
- const props = [];
46
- props.push(`file=${this.escapeProperty(finding.path)}`);
47
- if (finding.line) {
48
- props.push(`line=${finding.line}`);
49
- }
50
- props.push(`title=${this.escapeProperty(finding.rule)}`);
51
- return props.join(',');
52
- }
53
- buildMessage(finding) {
54
- let message = finding.message;
55
- if (finding.nodeId) {
56
- message += ` (Node: ${finding.nodeId})`;
57
- }
58
- if (finding.raw_details) {
59
- // GitHub Actions workflow commands support newlines in messages
60
- message += `\n\n${finding.raw_details}`;
61
- }
62
- if (finding.documentationUrl) {
63
- message += `\n\nSee: ${finding.documentationUrl}`;
64
- }
65
- return this.escapeData(message);
66
- }
67
- outputSummary(findings) {
68
- const summary = (0, findings_1.countFindingsBySeverity)(findings);
69
- console.log();
70
- console.log('::group::FlowLint Summary');
71
- if (summary.total === 0) {
72
- console.log('✓ No issues found');
73
- }
74
- else {
75
- console.log(`Total findings: ${summary.total}`);
76
- if (summary.must > 0) {
77
- console.log(` - Errors (must-fix): ${summary.must}`);
78
- }
79
- if (summary.should > 0) {
80
- console.log(` - Warnings (should-fix): ${summary.should}`);
81
- }
82
- if (summary.nit > 0) {
83
- console.log(` - Notices (nit): ${summary.nit}`);
84
- }
85
- }
86
- console.log('::endgroup::');
87
- }
88
- /**
89
- * Escape property values for GitHub Actions workflow commands
90
- * Properties use comma as delimiter, so commas must be escaped
91
- */
92
- escapeProperty(value) {
93
- return value.replace(/%/g, '%25').replace(/,/g, '%2C').replace(/:/g, '%3A');
94
- }
95
- /**
96
- * Escape data values for GitHub Actions workflow commands
97
- * Data values support newlines but special characters must be escaped
98
- */
99
- escapeData(value) {
100
- return value.replace(/%/g, '%25').replace(/\r/g, '%0D').replace(/\n/g, '%0A');
101
- }
102
- }
103
- exports.GithubActionsReporter = GithubActionsReporter;
104
- //# sourceMappingURL=github-actions-reporter.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"github-actions-reporter.js","sourceRoot":"","sources":["../../../../../apps/cli/src/reporters/github-actions-reporter.ts"],"names":[],"mappings":";AAAA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AAI,EAAE,CAAC,CAAC;YACxD,CAAC;YACD,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBACvB,OAAO,CAAC,GAAG,CAAC,8BAA8B,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;YAC9D,CAAC;YACD,IAAI,OAAO,CAAC,GAAG,GAAG,CAAC,EAAE,CAAC;gBACpB,OAAO,CAAC,GAAG,CAAC,sBAAsB,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;YACnD,CAAC;QACH,CAAC;QAED,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAC9B,CAAC;IAED;;;OAGG;IACK,cAAc,CAAC,KAAa;QAClC,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC9E,CAAC;IAED;;;OAGG;IACK,UAAU,CAAC,KAAa;QAC9B,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IAChF,CAAC;CACF;AA1GD,sDA0GC"}
@@ -1,14 +0,0 @@
1
- /**
2
- * JSON Reporter
3
- * Outputs findings as structured JSON
4
- * Suitable for:
5
- * - Integration with other tools
6
- * - Uploading to Web Dashboard (future)
7
- * - Programmatic processing
8
- */
9
- import type { AnalysisResult, Reporter } from 'packages/review/providers';
10
- export declare class JsonReporter implements Reporter {
11
- private outputFile?;
12
- constructor(outputFile?: string | undefined);
13
- report(results: AnalysisResult[]): Promise<void>;
14
- }
@@ -1,57 +0,0 @@
1
- "use strict";
2
- /**
3
- * JSON Reporter
4
- * Outputs findings as structured JSON
5
- * Suitable for:
6
- * - Integration with other tools
7
- * - Uploading to Web Dashboard (future)
8
- * - Programmatic processing
9
- */
10
- var __importDefault = (this && this.__importDefault) || function (mod) {
11
- return (mod && mod.__esModule) ? mod : { "default": mod };
12
- };
13
- Object.defineProperty(exports, "__esModule", { value: true });
14
- exports.JsonReporter = void 0;
15
- const fs_1 = __importDefault(require("fs"));
16
- const findings_1 = require("../packages/review/utils/findings");
17
- class JsonReporter {
18
- constructor(outputFile) {
19
- this.outputFile = outputFile;
20
- }
21
- async report(results) {
22
- const allFindings = results.flatMap((r) => r.findings);
23
- const severitySummary = (0, findings_1.countFindingsBySeverity)(allFindings);
24
- const report = {
25
- version: '1.0',
26
- timestamp: new Date().toISOString(),
27
- summary: {
28
- totalFiles: results.length,
29
- totalFindings: severitySummary.total,
30
- findingsBySeverity: {
31
- must: severitySummary.must,
32
- should: severitySummary.should,
33
- nit: severitySummary.nit,
34
- },
35
- },
36
- results: results.map((result) => ({
37
- file: {
38
- path: result.file.path,
39
- },
40
- findings: result.findings,
41
- errors: result.errors,
42
- })),
43
- };
44
- const json = JSON.stringify(report, null, 2);
45
- if (this.outputFile) {
46
- // Write to file
47
- fs_1.default.writeFileSync(this.outputFile, json, 'utf8');
48
- console.log(`✓ Report written to ${this.outputFile}`);
49
- }
50
- else {
51
- // Print to stdout
52
- console.log(json);
53
- }
54
- }
55
- }
56
- exports.JsonReporter = JsonReporter;
57
- //# sourceMappingURL=json-reporter.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"json-reporter.js","sourceRoot":"","sources":["../../../../../apps/cli/src/reporters/json-reporter.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;;;;AAEH,4CAAoB;AAEpB,6DAAyE;AAkCzE,MAAa,YAAY;IACvB,YAAoB,UAAmB;QAAnB,eAAU,GAAV,UAAU,CAAS;IAAG,CAAC;IAE3C,KAAK,CAAC,MAAM,CAAC,OAAyB;QACpC,MAAM,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;QACvD,MAA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* - Other CI/CD platforms that support JUnit test results
10
- *
11
- * Each workflow file becomes a test suite
12
- * Each finding becomes a test failure
13
- */
14
- import type { AnalysisResult, Reporter } from 'packages/review/providers';
15
- export declare class JunitReporter implements Reporter {
16
- private outputFile?;
17
- constructor(outputFile?: string | undefined);
18
- report(results: AnalysisResult[]): Promise<void>;
19
- private buildJunitXml;
20
- private addTestSuite;
21
- private addTestCase;
22
- private buildFailureMessage;
23
- private buildFailureDetails;
24
- private severityToFailureType;
25
- }
@@ -1,142 +0,0 @@
1
- "use strict";
2
- /**
3
- * JUnit Reporter
4
- * Outputs findings in JUnit XML format
5
- * Suitable for:
6
- * - Jenkins
7
- * - GitLab CI
8
- * - CircleCI
9
- * - Azure Pipelines
10
- * - Other CI/CD platforms that support JUnit test results
11
- *
12
- * Each workflow file becomes a test suite
13
- * Each finding becomes a test failure
14
- */
15
- var __importDefault = (this && this.__importDefault) || function (mod) {
16
- return (mod && mod.__esModule) ? mod : { "default": mod };
17
- };
18
- Object.defineProperty(exports, "__esModule", { value: true });
19
- exports.JunitReporter = void 0;
20
- const fs_1 = __importDefault(require("fs"));
21
- const xmlbuilder2_1 = require("xmlbuilder2");
22
- class JunitReporter {
23
- constructor(outputFile) {
24
- this.outputFile = outputFile;
25
- }
26
- async report(results) {
27
- const xml = this.buildJunitXml(results);
28
- if (this.outputFile) {
29
- // Write to file
30
- fs_1.default.writeFileSync(this.outputFile, xml, 'utf8');
31
- console.log(`✓ JUnit report written to ${this.outputFile}`);
32
- }
33
- else {
34
- // Print to stdout
35
- console.log(xml);
36
- }
37
- }
38
- buildJunitXml(results) {
39
- const timestamp = new Date().toISOString();
40
- // Count total tests: each finding is a test, or 1 passing test if no findings
41
- const totalTests = results.reduce((sum, r) => sum + (r.findings.length === 0 ? 1 : r.findings.length), 0);
42
- const totalFailures = results.reduce((sum, r) => sum + r.findings.length, 0);
43
- const totalTime = 0; // We don't track execution time
44
- // Create root element
45
- const root = (0, xmlbuilder2_1.create)({ version: '1.0', encoding: 'UTF-8' })
46
- .ele('testsuites', {
47
- name: 'FlowLint',
48
- tests: totalTests,
49
- failures: totalFailures,
50
- errors: 0,
51
- time: totalTime,
52
- timestamp,
53
- });
54
- // Add a test suite for each file
55
- for (const result of results) {
56
- this.addTestSuite(root, result);
57
- }
58
- return root.end({ prettyPrint: true });
59
- }
60
- addTestSuite(parent, result) {
61
- const { file, findings } = result;
62
- // If no findings, create one passing test case
63
- const testCount = findings.length === 0 ? 1 : findings.length;
64
- const failureCount = findings.length; // All findings are failures
65
- const testsuite = parent.ele('testsuite', {
66
- name: file.path,
67
- tests: testCount,
68
- failures: failureCount,
69
- errors: 0,
70
- time: 0,
71
- timestamp: new Date().toISOString(),
72
- });
73
- // If no findings, add a passing test
74
- if (findings.length === 0) {
75
- testsuite.ele('testcase', {
76
- name: 'No issues found',
77
- classname: file.path,
78
- time: 0,
79
- });
80
- }
81
- else {
82
- // Add a test case for each finding
83
- for (const finding of findings) {
84
- this.addTestCase(testsuite, finding, file.path);
85
- }
86
- }
87
- }
88
- addTestCase(parent, finding, filePath) {
89
- const testcase = parent.ele('testcase', {
90
- name: finding.rule,
91
- classname: filePath,
92
- time: 0,
93
- });
94
- // Add failure element
95
- const failureMessage = this.buildFailureMessage(finding);
96
- const failureType = this.severityToFailureType(finding.severity);
97
- testcase.ele('failure', {
98
- message: failureMessage,
99
- type: failureType,
100
- }).txt(this.buildFailureDetails(finding));
101
- }
102
- buildFailureMessage(finding) {
103
- const location = finding.line ? `:${finding.line}` : '';
104
- return `[${finding.severity.toUpperCase()}] ${finding.message} (${finding.path}${location})`;
105
- }
106
- buildFailureDetails(finding) {
107
- const parts = [];
108
- parts.push(`Rule: ${finding.rule}`);
109
- parts.push(`Severity: ${finding.severity.toUpperCase()}`);
110
- parts.push(`File: ${finding.path}`);
111
- if (finding.line) {
112
- parts.push(`Line: ${finding.line}`);
113
- }
114
- if (finding.nodeId) {
115
- parts.push(`Node ID: ${finding.nodeId}`);
116
- }
117
- parts.push('');
118
- parts.push(finding.message);
119
- if (finding.raw_details) {
120
- parts.push('');
121
- parts.push('Details:');
122
- parts.push(finding.raw_details);
123
- }
124
- if (finding.documentationUrl) {
125
- parts.push('');
126
- parts.push(`Documentation: ${finding.documentationUrl}`);
127
- }
128
- return parts.join('\n');
129
- }
130
- severityToFailureType(severity) {
131
- switch (severity) {
132
- case 'must':
133
- return 'FlowLintError';
134
- case 'should':
135
- return 'FlowLintWarning';
136
- case 'nit':
137
- return 'FlowLintSuggestion';
138
- }
139
- }
140
- }
141
- exports.JunitReporter = JunitReporter;
142
- //# sourceMappingURL=junit-reporter.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"junit-reporter.js","sourceRoot":"","sources":["../../../../../apps/cli/src/reporters/junit-reporter.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG;;;;;;AAEH,4CAAoB;AACpB,6CAAqC;AAIrC,MAAa,aAAa;IACxB,YAAoB,UAAmB;QAAnB,eAAU,GAAV,UAAU,CAAS;IAAG,CAAC;IAE3C,KAAK,CAAC,MAAM,CAAC,OAAyB;QACpC,MAAM,GAAG,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QAExC,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;YACpB,gBAAgB;YAChB,YAAE,CAAC,aAAa,CAAC,IAAI,CAAC,UAAU,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC;YAC/C,OAAO,CAAC,GAAG,CAAC,6BAA6B,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC;QAC9D,CAAC;aAAM,CAAC;YACN,kBAAkB;YAClB,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACnB,CAAC;IACH,CAAC;IAEO,aAAa,CAAC,OAAyB;QAC7C,MAAM,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;QAC3C,8EAA8E;QAC9E,MAAM,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,EA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,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACf,KAAK,CAAC,IAAI,CAAC,kBAAkB,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAAC;QAC3D,CAAC;QAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;IAEO,qBAAqB,CAAC,QAAmC;QAC/D,QAAQ,QAAQ,EAAE,CAAC;YACjB,KAAK,MAAM;gBACT,OAAO,eAAe,CAAC;YACzB,KAAK,QAAQ;gBACX,OAAO,iBAAiB,CAAC;YAC3B,KAAK,KAAK;gBACR,OAAO,oBAAoB,CAAC;QAChC,CAAC;IACH,CAAC;CACF;AAxID,sCAwIC"}
@@ -1,21 +0,0 @@
1
- /**
2
- * SARIF Reporter
3
- * Outputs findings in SARIF 2.1.0 format
4
- * Suitable for:
5
- * - GitHub Code Scanning
6
- * - Azure DevOps
7
- * - Security scanners and analysis platforms
8
- * - CI/CD pipelines
9
- *
10
- * Spec: https://docs.oasis-open.org/sarif/sarif/v2.1.0/sarif-v2.1.0.html
11
- */
12
- import type { AnalysisResult, Reporter } from 'packages/review/providers';
13
- export declare class SarifReporter implements Reporter {
14
- private outputFile?;
15
- constructor(outputFile?: string | undefined);
16
- report(results: AnalysisResult[]): Promise<void>;
17
- private buildSarifLog;
18
- private extractUniqueRules;
19
- private findingToSarifResult;
20
- private severityToSarifLevel;
21
- }
@@ -1,125 +0,0 @@
1
- "use strict";
2
- /**
3
- * SARIF Reporter
4
- * Outputs findings in SARIF 2.1.0 format
5
- * Suitable for:
6
- * - GitHub Code Scanning
7
- * - Azure DevOps
8
- * - Security scanners and analysis platforms
9
- * - CI/CD pipelines
10
- *
11
- * Spec: https://docs.oasis-open.org/sarif/sarif/v2.1.0/sarif-v2.1.0.html
12
- */
13
- var __importDefault = (this && this.__importDefault) || function (mod) {
14
- return (mod && mod.__esModule) ? mod : { "default": mod };
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.SarifReporter = void 0;
18
- const fs_1 = __importDefault(require("fs"));
19
- class SarifReporter {
20
- constructor(outputFile) {
21
- this.outputFile = outputFile;
22
- }
23
- async report(results) {
24
- const sarifLog = this.buildSarifLog(results);
25
- const json = JSON.stringify(sarifLog, null, 2);
26
- if (this.outputFile) {
27
- // Write to file
28
- fs_1.default.writeFileSync(this.outputFile, json, 'utf8');
29
- console.log(`✓ SARIF report written to ${this.outputFile}`);
30
- }
31
- else {
32
- // Print to stdout
33
- console.log(json);
34
- }
35
- }
36
- buildSarifLog(results) {
37
- const allFindings = results.flatMap((r) => r.findings);
38
- // Extract unique rules
39
- const uniqueRules = this.extractUniqueRules(allFindings);
40
- // Build artifacts list (analyzed files)
41
- const artifacts = results.map((r) => ({
42
- location: {
43
- uri: r.file.path,
44
- },
45
- }));
46
- // Build SARIF results
47
- const sarifResults = [];
48
- for (const result of results) {
49
- for (const finding of result.findings) {
50
- sarifResults.push(this.findingToSarifResult(finding));
51
- }
52
- }
53
- return {
54
- version: '2.1.0',
55
- $schema: 'https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json',
56
- runs: [
57
- {
58
- tool: {
59
- driver: {
60
- name: 'FlowLint',
61
- version: '0.3.8',
62
- informationUri: 'https://flowlint.dev',
63
- rules: uniqueRules,
64
- },
65
- },
66
- results: sarifResults,
67
- artifacts,
68
- },
69
- ],
70
- };
71
- }
72
- extractUniqueRules(findings) {
73
- const ruleMap = new Map();
74
- for (const finding of findings) {
75
- if (!ruleMap.has(finding.rule)) {
76
- ruleMap.set(finding.rule, {
77
- id: finding.rule,
78
- shortDescription: {
79
- text: finding.message,
80
- },
81
- helpUri: finding.documentationUrl,
82
- });
83
- }
84
- }
85
- return Array.from(ruleMap.values());
86
- }
87
- findingToSarifResult(finding) {
88
- const result = {
89
- ruleId: finding.rule,
90
- level: this.severityToSarifLevel(finding.severity),
91
- message: {
92
- text: finding.raw_details ? `${finding.message}\n\n${finding.raw_details}` : finding.message,
93
- },
94
- locations: [
95
- {
96
- physicalLocation: {
97
- artifactLocation: {
98
- uri: finding.path,
99
- },
100
- region: finding.line ? { startLine: finding.line } : undefined,
101
- },
102
- },
103
- ],
104
- };
105
- // Add nodeId as property if present
106
- if (finding.nodeId) {
107
- result.properties = {
108
- nodeId: finding.nodeId,
109
- };
110
- }
111
- return result;
112
- }
113
- severityToSarifLevel(severity) {
114
- switch (severity) {
115
- case 'must':
116
- return 'error';
117
- case 'should':
118
- return 'warning';
119
- case 'nit':
120
- return 'note';
121
- }
122
- }
123
- }
124
- exports.SarifReporter = SarifReporter;
125
- //# sourceMappingURL=sarif-reporter.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sarif-reporter.js","sourceRoot":"","sources":["../../../../../apps/cli/src/reporters/sarif-reporter.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;;AAEH,4CAAoB;AAqEpB,MAAa,aAAa;IACxB,YAAoB,UAAmB;QAAnB,eAAU,GAAV,UAAU,CAAS;IAAG,CAAC;IAE3C,KAAK,CAAC,MAAM,CAAC,OAAyB;QACpC,MAAM,QAAQ,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QAC7C,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;QAE/C,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;YACpB,gBAAgB;YAChB,YAAE,CAAC,aAAa,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;YAChD,OAAO,CAAC,GAAG,CAAC,6BAA6B,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC;QAC9D,CAAC;aAAM,CAAC;YACN,kBAAkB;YAClB,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACpB,CAAC;IACH,CAAC;IAEO,aAAa,CAAC,OAAyB;QAC7C,MAAM,WAAW,GAAG,OAAO,CAAC,OAAO,CAA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