check-my-toolkit 0.1.0 → 0.1.2

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 (90) hide show
  1. package/README.md +157 -1
  2. package/dist/cli.js +81 -27
  3. package/dist/cli.js.map +1 -1
  4. package/dist/code/index.d.ts.map +1 -1
  5. package/dist/code/index.js +10 -6
  6. package/dist/code/index.js.map +1 -1
  7. package/dist/code/tools/tsc.d.ts +1 -0
  8. package/dist/code/tools/tsc.d.ts.map +1 -1
  9. package/dist/code/tools/tsc.js +18 -14
  10. package/dist/code/tools/tsc.js.map +1 -1
  11. package/dist/config/loader.d.ts +2 -1
  12. package/dist/config/loader.d.ts.map +1 -1
  13. package/dist/config/loader.js +68 -62
  14. package/dist/config/loader.js.map +1 -1
  15. package/dist/config/schema.d.ts +0 -714
  16. package/dist/config/schema.d.ts.map +1 -1
  17. package/dist/config/schema.js +16 -16
  18. package/dist/config/schema.js.map +1 -1
  19. package/dist/output/index.d.ts.map +1 -1
  20. package/dist/output/index.js +33 -34
  21. package/dist/output/index.js.map +1 -1
  22. package/package.json +11 -2
  23. package/dist/code/audit.d.ts +0 -14
  24. package/dist/code/audit.d.ts.map +0 -1
  25. package/dist/code/audit.js +0 -130
  26. package/dist/code/audit.js.map +0 -1
  27. package/dist/code/linting.d.ts +0 -10
  28. package/dist/code/linting.d.ts.map +0 -1
  29. package/dist/code/linting.js +0 -233
  30. package/dist/code/linting.js.map +0 -1
  31. package/dist/code/types.d.ts +0 -6
  32. package/dist/code/types.d.ts.map +0 -1
  33. package/dist/code/types.js +0 -132
  34. package/dist/code/types.js.map +0 -1
  35. package/dist/src/cli.d.ts +0 -3
  36. package/dist/src/cli.d.ts.map +0 -1
  37. package/dist/src/cli.js +0 -116
  38. package/dist/src/cli.js.map +0 -1
  39. package/dist/src/code/index.d.ts +0 -13
  40. package/dist/src/code/index.d.ts.map +0 -1
  41. package/dist/src/code/index.js +0 -53
  42. package/dist/src/code/index.js.map +0 -1
  43. package/dist/src/code/tools/base.d.ts +0 -52
  44. package/dist/src/code/tools/base.d.ts.map +0 -1
  45. package/dist/src/code/tools/base.js +0 -83
  46. package/dist/src/code/tools/base.js.map +0 -1
  47. package/dist/src/code/tools/eslint.d.ts +0 -15
  48. package/dist/src/code/tools/eslint.d.ts.map +0 -1
  49. package/dist/src/code/tools/eslint.js +0 -79
  50. package/dist/src/code/tools/eslint.js.map +0 -1
  51. package/dist/src/code/tools/index.d.ts +0 -5
  52. package/dist/src/code/tools/index.d.ts.map +0 -1
  53. package/dist/src/code/tools/index.js +0 -5
  54. package/dist/src/code/tools/index.js.map +0 -1
  55. package/dist/src/code/tools/ruff.d.ts +0 -26
  56. package/dist/src/code/tools/ruff.d.ts.map +0 -1
  57. package/dist/src/code/tools/ruff.js +0 -149
  58. package/dist/src/code/tools/ruff.js.map +0 -1
  59. package/dist/src/code/tools/tsc.d.ts +0 -21
  60. package/dist/src/code/tools/tsc.d.ts.map +0 -1
  61. package/dist/src/code/tools/tsc.js +0 -94
  62. package/dist/src/code/tools/tsc.js.map +0 -1
  63. package/dist/src/config/index.d.ts +0 -3
  64. package/dist/src/config/index.d.ts.map +0 -1
  65. package/dist/src/config/index.js +0 -3
  66. package/dist/src/config/index.js.map +0 -1
  67. package/dist/src/config/loader.d.ts +0 -22
  68. package/dist/src/config/loader.d.ts.map +0 -1
  69. package/dist/src/config/loader.js +0 -124
  70. package/dist/src/config/loader.js.map +0 -1
  71. package/dist/src/config/schema.d.ts +0 -503
  72. package/dist/src/config/schema.d.ts.map +0 -1
  73. package/dist/src/config/schema.js +0 -190
  74. package/dist/src/config/schema.js.map +0 -1
  75. package/dist/src/index.d.ts +0 -8
  76. package/dist/src/index.d.ts.map +0 -1
  77. package/dist/src/index.js +0 -16
  78. package/dist/src/index.js.map +0 -1
  79. package/dist/src/output/index.d.ts +0 -15
  80. package/dist/src/output/index.d.ts.map +0 -1
  81. package/dist/src/output/index.js +0 -96
  82. package/dist/src/output/index.js.map +0 -1
  83. package/dist/src/types/index.d.ts +0 -96
  84. package/dist/src/types/index.d.ts.map +0 -1
  85. package/dist/src/types/index.js +0 -89
  86. package/dist/src/types/index.js.map +0 -1
  87. package/dist/tests/e2e/e2e.test.d.ts +0 -2
  88. package/dist/tests/e2e/e2e.test.d.ts.map +0 -1
  89. package/dist/tests/e2e/e2e.test.js +0 -398
  90. package/dist/tests/e2e/e2e.test.js.map +0 -1
@@ -1,83 +0,0 @@
1
- import * as fs from "node:fs";
2
- import * as path from "node:path";
3
- import { CheckResult, } from "../../types/index.js";
4
- /**
5
- * Abstract base class for tool runners.
6
- * Provides common functionality for checking configs and handling errors.
7
- */
8
- export class BaseToolRunner {
9
- /**
10
- * Check if any of the config files exist
11
- */
12
- hasConfig(projectRoot) {
13
- return this.configFiles.some((config) => fs.existsSync(path.join(projectRoot, config)));
14
- }
15
- /**
16
- * Find which config file exists (if any)
17
- */
18
- findConfig(projectRoot) {
19
- for (const config of this.configFiles) {
20
- if (fs.existsSync(path.join(projectRoot, config))) {
21
- return config;
22
- }
23
- }
24
- return null;
25
- }
26
- /**
27
- * Check if an error indicates the tool is not installed
28
- */
29
- isNotInstalledError(error) {
30
- if (!(error instanceof Error))
31
- return false;
32
- const message = error.message.toLowerCase();
33
- return message.includes("enoent") || message.includes("not found");
34
- }
35
- /**
36
- * Create a skip result for when config is missing
37
- */
38
- skipNoConfig(duration) {
39
- return CheckResult.skip(this.name, this.rule, `No ${this.name} config found`, duration);
40
- }
41
- /**
42
- * Create a skip result for when tool is not installed
43
- */
44
- skipNotInstalled(duration) {
45
- return CheckResult.skip(this.name, this.rule, `${this.name} not installed`, duration);
46
- }
47
- /**
48
- * Create a pass result
49
- */
50
- pass(duration) {
51
- return CheckResult.pass(this.name, this.rule, duration);
52
- }
53
- /**
54
- * Create a fail result from violations
55
- */
56
- fail(violations, duration) {
57
- return CheckResult.fail(this.name, this.rule, violations, duration);
58
- }
59
- /**
60
- * Create a result from violations (pass if empty, fail otherwise)
61
- */
62
- fromViolations(violations, duration) {
63
- return CheckResult.fromViolations(this.name, this.rule, violations, duration);
64
- }
65
- /**
66
- * Default audit implementation - checks if config exists
67
- */
68
- async audit(projectRoot) {
69
- const startTime = Date.now();
70
- if (this.hasConfig(projectRoot)) {
71
- return CheckResult.pass(`${this.name} Config`, this.rule, Date.now() - startTime);
72
- }
73
- return CheckResult.fail(`${this.name} Config`, this.rule, [
74
- {
75
- rule: `${this.rule}.${this.toolId}`,
76
- tool: "audit",
77
- message: `${this.name} config not found. Expected one of: ${this.configFiles.join(", ")}`,
78
- severity: "error",
79
- },
80
- ], Date.now() - startTime);
81
- }
82
- }
83
- //# sourceMappingURL=base.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"base.js","sourceRoot":"","sources":["../../../../src/code/tools/base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,EACL,WAAW,GAGZ,MAAM,sBAAsB,CAAC;AAE9B;;;GAGG;AACH,MAAM,OAAgB,cAAc;IAMlC;;OAEG;IACO,SAAS,CAAC,WAAmB;QACrC,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CACtC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,CAC9C,CAAC;IACJ,CAAC;IAED;;OAEG;IACO,UAAU,CAAC,WAAmB;QACtC,KAAK,MAAM,MAAM,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;YACtC,IAAI,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC;gBAClD,OAAO,MAAM,CAAC;YAChB,CAAC;QACH,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;OAEG;IACO,mBAAmB,CAAC,KAAc;QAC1C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AC;QAE7B,IAAI,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,CAAC;YAChC,OAAO,WAAW,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,SAAS,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC,CAAC;QACpF,CAAC;QAED,OAAO,WAAW,CAAC,IAAI,CACrB,GAAG,IAAI,CAAC,IAAI,SAAS,EACrB,IAAI,CAAC,IAAI,EACT;YACE;gBACE,IAAI,EAAE,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,EAAE;gBACnC,IAAI,EAAE,OAAO;gBACb,OAAO,EAAE,GAAG,IAAI,CAAC,IAAI,uCAAuC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;gBACzF,QAAQ,EAAE,OAAO;aAClB;SACF,EACD,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,CACvB,CAAC;IACJ,CAAC;CACF"}
@@ -1,15 +0,0 @@
1
- import { type CheckResult } from "../../types/index.js";
2
- import { BaseToolRunner } from "./base.js";
3
- /**
4
- * ESLint tool runner
5
- */
6
- export declare class ESLintRunner extends BaseToolRunner {
7
- readonly name = "ESLint";
8
- readonly rule = "code.linting";
9
- readonly toolId = "eslint";
10
- readonly configFiles: string[];
11
- run(projectRoot: string): Promise<CheckResult>;
12
- private parseOutput;
13
- private createErrorViolation;
14
- }
15
- //# sourceMappingURL=eslint.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"eslint.d.ts","sourceRoot":"","sources":["../../../../src/code/tools/eslint.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,WAAW,EAAkB,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAiB3C;;GAEG;AACH,qBAAa,YAAa,SAAQ,cAAc;IAC9C,QAAQ,CAAC,IAAI,YAAY;IACzB,QAAQ,CAAC,IAAI,kBAAkB;IAC/B,QAAQ,CAAC,MAAM,YAAY;IAC3B,QAAQ,CAAC,WAAW,WAQlB;IAEI,GAAG,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAsCpD,OAAO,CAAC,WAAW;IA0BnB,OAAO,CAAC,oBAAoB;CAQ7B"}
@@ -1,79 +0,0 @@
1
- import * as path from "node:path";
2
- import { execa } from "execa";
3
- import { BaseToolRunner } from "./base.js";
4
- /**
5
- * ESLint tool runner
6
- */
7
- export class ESLintRunner extends BaseToolRunner {
8
- name = "ESLint";
9
- rule = "code.linting";
10
- toolId = "eslint";
11
- configFiles = [
12
- "eslint.config.js",
13
- "eslint.config.mjs",
14
- "eslint.config.cjs",
15
- ".eslintrc.js",
16
- ".eslintrc.json",
17
- ".eslintrc.yml",
18
- ".eslintrc.yaml",
19
- ];
20
- async run(projectRoot) {
21
- const startTime = Date.now();
22
- if (!this.hasConfig(projectRoot)) {
23
- return this.skipNoConfig(Date.now() - startTime);
24
- }
25
- try {
26
- const result = await execa("npx", ["eslint", ".", "--format", "json"], {
27
- cwd: projectRoot,
28
- reject: false,
29
- timeout: 5 * 60 * 1000,
30
- });
31
- const violations = this.parseOutput(result.stdout, projectRoot);
32
- // Handle parse failure with non-zero exit
33
- if (violations === null && result.exitCode !== 0 && result.stderr) {
34
- return this.fail([this.createErrorViolation(`ESLint error: ${result.stderr}`)], Date.now() - startTime);
35
- }
36
- return this.fromViolations(violations ?? [], Date.now() - startTime);
37
- }
38
- catch (error) {
39
- if (this.isNotInstalledError(error)) {
40
- return this.skipNotInstalled(Date.now() - startTime);
41
- }
42
- const message = error instanceof Error ? error.message : "Unknown error";
43
- return this.fail([this.createErrorViolation(`ESLint error: ${message}`)], Date.now() - startTime);
44
- }
45
- }
46
- parseOutput(stdout, projectRoot) {
47
- try {
48
- const results = JSON.parse(stdout);
49
- const violations = [];
50
- for (const fileResult of results) {
51
- for (const msg of fileResult.messages) {
52
- violations.push({
53
- rule: `${this.rule}.${this.toolId}`,
54
- tool: this.toolId,
55
- file: path.relative(projectRoot, fileResult.filePath),
56
- line: msg.line,
57
- column: msg.column,
58
- message: msg.message,
59
- code: msg.ruleId ?? undefined,
60
- severity: msg.severity === 2 ? "error" : "warning",
61
- });
62
- }
63
- }
64
- return violations;
65
- }
66
- catch {
67
- return null;
68
- }
69
- }
70
- createErrorViolation(message) {
71
- return {
72
- rule: `${this.rule}.${this.toolId}`,
73
- tool: this.toolId,
74
- message,
75
- severity: "error",
76
- };
77
- }
78
- }
79
- //# sourceMappingURL=eslint.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"eslint.js","sourceRoot":"","sources":["../../../../src/code/tools/eslint.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAG9B,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAiB3C;;GAEG;AACH,MAAM,OAAO,YAAa,SAAQ,cAAc;IACrC,IAAI,GAAG,QAAQ,CAAC;IAChB,IAAI,GAAG,cAAc,CAAC;IACtB,MAAM,GAAG,QAAQ,CAAC;IAClB,WAAW,GAAG;QACrB,kBAAkB;QAClB,mBAAmB;QACnB,mBAAmB;QACnB,cAAc;QACd,gBAAgB;QAChB,eAAe;QACf,gBAAgB;KACjB,CAAC;IAEF,KAAK,CAAC,GAAG,CAAC,WAAmB;QAC3B,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QAE7B,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,CAAC;YACjC,OAAO,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC,CAAC;QACnD,CAAC;QAED,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE,UAAU,EAAE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AuB,CAAC;YACzD,MAAM,UAAU,GAAgB,EAAE,CAAC;YAEnC,KAAK,MAAM,UAAU,IAAI,OAAO,EAAE,CAAC;gBACjC,KAAK,MAAM,GAAG,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;oBACtC,UAAU,CAAC,IAAI,CAAC;wBACd,IAAI,EAAE,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,EAAE;wBACnC,IAAI,EAAE,IAAI,CAAC,MAAM;wBACjB,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,UAAU,CAAC,QAAQ,CAAC;wBACrD,IAAI,EAAE,GAAG,CAAC,IAAI;wBACd,MAAM,EAAE,GAAG,CAAC,MAAM;wBAClB,OAAO,EAAE,GAAG,CAAC,OAAO;wBACpB,IAAI,EAAE,GAAG,CAAC,MAAM,IAAI,SAAS;wBAC7B,QAAQ,EAAE,GAAG,CAAC,QAAQ,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS;qBACnD,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;YAED,OAAO,UAAU,CAAC;QACpB,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IAEO,oBAAoB,CAAC,OAAe;QAC1C,OAAO;YACL,IAAI,EAAE,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,EAAE;YACnC,IAAI,EAAE,IAAI,CAAC,MAAM;YACjB,OAAO;YACP,QAAQ,EAAE,OAAO;SAClB,CAAC;IACJ,CAAC;CACF"}
@@ -1,5 +0,0 @@
1
- export { BaseToolRunner } from "./base.js";
2
- export { ESLintRunner } from "./eslint.js";
3
- export { RuffRunner } from "./ruff.js";
4
- export { TscRunner } from "./tsc.js";
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/code/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC"}
@@ -1,5 +0,0 @@
1
- export { BaseToolRunner } from "./base.js";
2
- export { ESLintRunner } from "./eslint.js";
3
- export { RuffRunner } from "./ruff.js";
4
- export { TscRunner } from "./tsc.js";
5
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/code/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC"}
@@ -1,26 +0,0 @@
1
- import { type CheckResult } from "../../types/index.js";
2
- import { BaseToolRunner } from "./base.js";
3
- /**
4
- * Ruff (Python linter) tool runner
5
- */
6
- export declare class RuffRunner extends BaseToolRunner {
7
- readonly name = "Ruff";
8
- readonly rule = "code.linting";
9
- readonly toolId = "ruff";
10
- readonly configFiles: string[];
11
- /**
12
- * Override hasConfig to also check for [tool.ruff] in pyproject.toml
13
- */
14
- protected hasConfig(projectRoot: string): boolean;
15
- private hasPyprojectConfig;
16
- private hasPythonFiles;
17
- run(projectRoot: string): Promise<CheckResult>;
18
- private skip;
19
- private parseOutput;
20
- private createErrorViolation;
21
- /**
22
- * Override audit to include pyproject.toml check
23
- */
24
- audit(projectRoot: string): Promise<CheckResult>;
25
- }
26
- //# sourceMappingURL=ruff.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ruff.d.ts","sourceRoot":"","sources":["../../../../src/code/tools/ruff.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,WAAW,EAAkB,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAa3C;;GAEG;AACH,qBAAa,UAAW,SAAQ,cAAc;IAC5C,QAAQ,CAAC,IAAI,UAAU;IACvB,QAAQ,CAAC,IAAI,kBAAkB;IAC/B,QAAQ,CAAC,MAAM,UAAU;IACzB,QAAQ,CAAC,WAAW,WAA+B;IAEnD;;OAEG;cACgB,SAAS,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO;IAU1D,OAAO,CAAC,kBAAkB;YAcZ,cAAc;IAYtB,GAAG,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAuCpD,OAAO,CAAC,IAAI;IAYZ,OAAO,CAAC,WAAW;IAsBnB,OAAO,CAAC,oBAAoB;IAS5B;;OAEG;IACY,KAAK,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;CA+BhE"}
@@ -1,149 +0,0 @@
1
- import * as fs from "node:fs";
2
- import * as path from "node:path";
3
- import { execa } from "execa";
4
- import { BaseToolRunner } from "./base.js";
5
- /**
6
- * Ruff (Python linter) tool runner
7
- */
8
- export class RuffRunner extends BaseToolRunner {
9
- name = "Ruff";
10
- rule = "code.linting";
11
- toolId = "ruff";
12
- configFiles = ["ruff.toml", ".ruff.toml"];
13
- /**
14
- * Override hasConfig to also check for [tool.ruff] in pyproject.toml
15
- */
16
- hasConfig(projectRoot) {
17
- // Check dedicated config files
18
- if (super.hasConfig(projectRoot)) {
19
- return true;
20
- }
21
- // Check pyproject.toml for [tool.ruff] section
22
- return this.hasPyprojectConfig(projectRoot);
23
- }
24
- hasPyprojectConfig(projectRoot) {
25
- const pyprojectPath = path.join(projectRoot, "pyproject.toml");
26
- if (!fs.existsSync(pyprojectPath)) {
27
- return false;
28
- }
29
- try {
30
- const content = fs.readFileSync(pyprojectPath, "utf-8");
31
- return content.includes("[tool.ruff]");
32
- }
33
- catch {
34
- return false;
35
- }
36
- }
37
- async hasPythonFiles(projectRoot) {
38
- try {
39
- const result = await execa("find", [".", "-name", "*.py", "-type", "f"], {
40
- cwd: projectRoot,
41
- reject: false,
42
- });
43
- return Boolean(result.stdout.trim());
44
- }
45
- catch {
46
- return false;
47
- }
48
- }
49
- async run(projectRoot) {
50
- const startTime = Date.now();
51
- // Skip if no Python files
52
- if (!(await this.hasPythonFiles(projectRoot))) {
53
- return this.skip("No Python files found", Date.now() - startTime);
54
- }
55
- try {
56
- const result = await execa("ruff", ["check", ".", "--output-format", "json"], {
57
- cwd: projectRoot,
58
- reject: false,
59
- timeout: 5 * 60 * 1000,
60
- });
61
- const violations = this.parseOutput(result.stdout, projectRoot);
62
- // Handle parse failure with non-zero exit
63
- if (violations === null && result.exitCode !== 0 && result.stderr) {
64
- return this.fail([this.createErrorViolation(`Ruff error: ${result.stderr}`)], Date.now() - startTime);
65
- }
66
- return this.fromViolations(violations ?? [], Date.now() - startTime);
67
- }
68
- catch (error) {
69
- if (this.isNotInstalledError(error)) {
70
- return this.skipNotInstalled(Date.now() - startTime);
71
- }
72
- const message = error instanceof Error ? error.message : "Unknown error";
73
- return this.fail([this.createErrorViolation(`Ruff error: ${message}`)], Date.now() - startTime);
74
- }
75
- }
76
- skip(reason, duration) {
77
- return {
78
- name: this.name,
79
- rule: this.rule,
80
- passed: true,
81
- violations: [],
82
- skipped: true,
83
- skipReason: reason,
84
- duration,
85
- };
86
- }
87
- parseOutput(stdout, projectRoot) {
88
- if (!stdout.trim()) {
89
- return [];
90
- }
91
- try {
92
- const results = JSON.parse(stdout);
93
- return results.map((msg) => ({
94
- rule: `${this.rule}.${this.toolId}`,
95
- tool: this.toolId,
96
- file: path.relative(projectRoot, msg.filename),
97
- line: msg.location.row,
98
- column: msg.location.column,
99
- message: msg.message,
100
- code: msg.code,
101
- severity: "error",
102
- }));
103
- }
104
- catch {
105
- return null;
106
- }
107
- }
108
- createErrorViolation(message) {
109
- return {
110
- rule: `${this.rule}.${this.toolId}`,
111
- tool: this.toolId,
112
- message,
113
- severity: "error",
114
- };
115
- }
116
- /**
117
- * Override audit to include pyproject.toml check
118
- */
119
- async audit(projectRoot) {
120
- const startTime = Date.now();
121
- if (this.hasConfig(projectRoot)) {
122
- return {
123
- name: `${this.name} Config`,
124
- rule: this.rule,
125
- passed: true,
126
- violations: [],
127
- skipped: false,
128
- duration: Date.now() - startTime,
129
- };
130
- }
131
- const allConfigs = [...this.configFiles, "pyproject.toml [tool.ruff]"];
132
- return {
133
- name: `${this.name} Config`,
134
- rule: this.rule,
135
- passed: false,
136
- violations: [
137
- {
138
- rule: `${this.rule}.${this.toolId}`,
139
- tool: "audit",
140
- message: `Ruff config not found. Expected one of: ${allConfigs.join(", ")}`,
141
- severity: "error",
142
- },
143
- ],
144
- skipped: false,
145
- duration: Date.now() - startTime,
146
- };
147
- }
148
- }
149
- //# sourceMappingURL=ruff.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ruff.js","sourceRoot":"","sources":["../../../../src/code/tools/ruff.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAG9B,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAa3C;;GAEG;AACH,MAAM,OAAO,UAAW,SAAQ,cAAc;IACnC,IAAI,GAAG,MAAM,CAAC;IACd,IAAI,GAAG,cAAc,CAAC;IACtB,MAAM,GAAG,MAAM,CAAC;IAChB,WAAW,GAAG,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC;IAEnD;;OAEG;IACgB,SAAS,CAAC,WAAmB;QAC9C,+BAA+B;QAC/B,IAAI,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,CAAC;YACjC,OAAO,IAAI,CAAC;QACd,CAAC;QAED,+CAA+C;QAC/C,OAAO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AAC,WAAmB;QACtC,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QAE7B,IAAI,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,CAAC;YAChC,OAAO;gBACL,IAAI,EAAE,GAAG,IAAI,CAAC,IAAI,SAAS;gBAC3B,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,MAAM,EAAE,IAAI;gBACZ,UAAU,EAAE,EAAE;gBACd,OAAO,EAAE,KAAK;gBACd,QAAQ,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS;aACjC,CAAC;QACJ,CAAC;QAED,MAAM,UAAU,GAAG,CAAC,GAAG,IAAI,CAAC,WAAW,EAAE,4BAA4B,CAAC,CAAC;QACvE,OAAO;YACL,IAAI,EAAE,GAAG,IAAI,CAAC,IAAI,SAAS;YAC3B,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,MAAM,EAAE,KAAK;YACb,UAAU,EAAE;gBACV;oBACE,IAAI,EAAE,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,EAAE;oBACnC,IAAI,EAAE,OAAO;oBACb,OAAO,EAAE,2CAA2C,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;oBAC3E,QAAQ,EAAE,OAAO;iBAClB;aACF;YACD,OAAO,EAAE,KAAK;YACd,QAAQ,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS;SACjC,CAAC;IACJ,CAAC;CACF"}
@@ -1,21 +0,0 @@
1
- import { type CheckResult } from "../../types/index.js";
2
- import { BaseToolRunner } from "./base.js";
3
- /**
4
- * TypeScript type checker tool runner
5
- */
6
- export declare class TscRunner extends BaseToolRunner {
7
- readonly name = "TypeScript";
8
- readonly rule = "code.types";
9
- readonly toolId = "tsc";
10
- readonly configFiles: string[];
11
- private handleTscFailure;
12
- run(projectRoot: string): Promise<CheckResult>;
13
- /**
14
- * Parse tsc output into diagnostics
15
- * Format: file(line,col): error TSxxxx: message
16
- */
17
- private parseOutput;
18
- private parseDiagnostics;
19
- private createErrorViolation;
20
- }
21
- //# sourceMappingURL=tsc.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tsc.d.ts","sourceRoot":"","sources":["../../../../src/code/tools/tsc.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,WAAW,EAAkB,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAW3C;;GAEG;AACH,qBAAa,SAAU,SAAQ,cAAc;IAC3C,QAAQ,CAAC,IAAI,gBAAgB;IAC7B,QAAQ,CAAC,IAAI,gBAAgB;IAC7B,QAAQ,CAAC,MAAM,SAAS;IACxB,QAAQ,CAAC,WAAW,WAAqB;IAEzC,OAAO,CAAC,gBAAgB;IAYlB,GAAG,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IA8BpD;;;OAGG;IACH,OAAO,CAAC,WAAW;IAcnB,OAAO,CAAC,gBAAgB;IAsBxB,OAAO,CAAC,oBAAoB;CAQ7B"}
@@ -1,94 +0,0 @@
1
- import * as path from "node:path";
2
- import { execa } from "execa";
3
- import { BaseToolRunner } from "./base.js";
4
- /**
5
- * TypeScript type checker tool runner
6
- */
7
- export class TscRunner extends BaseToolRunner {
8
- name = "TypeScript";
9
- rule = "code.types";
10
- toolId = "tsc";
11
- configFiles = ["tsconfig.json"];
12
- handleTscFailure(result, projectRoot) {
13
- const stdout = String(result.stdout ?? "");
14
- const violations = this.parseOutput(stdout, projectRoot);
15
- if (violations.length === 0) {
16
- const errorOutput = stdout || String(result.stderr ?? "");
17
- if (errorOutput) {
18
- return [this.createErrorViolation(`TypeScript error: ${errorOutput.slice(0, 500)}`)];
19
- }
20
- }
21
- return violations;
22
- }
23
- async run(projectRoot) {
24
- const startTime = Date.now();
25
- const elapsed = () => Date.now() - startTime;
26
- if (!this.hasConfig(projectRoot)) {
27
- return this.skipNoConfig(elapsed());
28
- }
29
- try {
30
- const result = await execa("npx", ["tsc", "--noEmit"], {
31
- cwd: projectRoot,
32
- reject: false,
33
- timeout: 5 * 60 * 1000,
34
- });
35
- if (result.exitCode === 0) {
36
- return this.pass(elapsed());
37
- }
38
- const violations = this.handleTscFailure(result, projectRoot);
39
- return this.fromViolations(violations, elapsed());
40
- }
41
- catch (error) {
42
- if (this.isNotInstalledError(error)) {
43
- return this.skipNotInstalled(elapsed());
44
- }
45
- const message = error instanceof Error ? error.message : "Unknown error";
46
- return this.fail([this.createErrorViolation(`TypeScript error: ${message}`)], elapsed());
47
- }
48
- }
49
- /**
50
- * Parse tsc output into diagnostics
51
- * Format: file(line,col): error TSxxxx: message
52
- */
53
- parseOutput(stdout, projectRoot) {
54
- const diagnostics = this.parseDiagnostics(stdout, projectRoot);
55
- return diagnostics.map((diag) => ({
56
- rule: `${this.rule}.${this.toolId}`,
57
- tool: this.toolId,
58
- file: diag.file,
59
- line: diag.line,
60
- column: diag.column,
61
- message: diag.message,
62
- code: `TS${diag.code}`,
63
- severity: "error",
64
- }));
65
- }
66
- parseDiagnostics(output, projectRoot) {
67
- const diagnostics = [];
68
- const lines = output.split("\n");
69
- const errorRegex = /^(.+?)\((\d+),(\d+)\):\s*error\s+TS(\d+):\s*(.+)$/;
70
- for (const line of lines) {
71
- const match = errorRegex.exec(line);
72
- if (match) {
73
- const [, filePath, lineNum, colNum, code, message] = match;
74
- diagnostics.push({
75
- file: path.relative(projectRoot, filePath),
76
- line: parseInt(lineNum, 10),
77
- column: parseInt(colNum, 10),
78
- code: parseInt(code, 10),
79
- message: message.trim(),
80
- });
81
- }
82
- }
83
- return diagnostics;
84
- }
85
- createErrorViolation(message) {
86
- return {
87
- rule: `${this.rule}.${this.toolId}`,
88
- tool: this.toolId,
89
- message,
90
- severity: "error",
91
- };
92
- }
93
- }
94
- //# sourceMappingURL=tsc.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tsc.js","sourceRoot":"","sources":["../../../../src/code/tools/tsc.ts"],"names":[],"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AAO;YACP,QAAQ,EAAE,OAAO;SAClB,CAAC;IACJ,CAAC;CACF"}
@@ -1,3 +0,0 @@
1
- export { ConfigError, findConfigFile, getProjectRoot, loadConfig } from "./loader.js";
2
- export { Config, configSchema, defaultConfig } from "./schema.js";
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAC,cAAc,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACrF,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC"}
@@ -1,3 +0,0 @@
1
- export { ConfigError, findConfigFile, getProjectRoot, loadConfig } from "./loader.js";
2
- export { configSchema, defaultConfig } from "./schema.js";
3
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAC,cAAc,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACrF,OAAO,EAAU,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC"}
@@ -1,22 +0,0 @@
1
- import { type Config } from "./schema.js";
2
- interface LoadConfigResult {
3
- config: Config;
4
- configPath: string;
5
- }
6
- export declare class ConfigError extends Error {
7
- constructor(message: string);
8
- }
9
- /**
10
- * Find check.toml by walking up the directory tree
11
- */
12
- export declare function findConfigFile(startDir?: string): string | null;
13
- /**
14
- * Load and parse check.toml configuration
15
- */
16
- export declare function loadConfig(configPath?: string): LoadConfigResult;
17
- /**
18
- * Get the project root directory (where check.toml is located)
19
- */
20
- export declare function getProjectRoot(configPath: string): string;
21
- export {};
22
- //# sourceMappingURL=loader.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../../src/config/loader.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,MAAM,EAA+B,MAAM,aAAa,CAAC;AAEvE,UAAU,gBAAgB;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,qBAAa,WAAY,SAAQ,KAAK;gBACxB,OAAO,EAAE,MAAM;CAI5B;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,QAAQ,GAAE,MAAsB,GAAG,MAAM,GAAG,IAAI,CAe9E;AAyCD;;GAEG;AACH,wBAAgB,UAAU,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,gBAAgB,CAMhE;AAsDD;;GAEG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAEzD"}