ira-review 3.0.1 → 3.0.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.
- package/README.github.md +4 -4
- package/README.md +1 -1
- package/README.npm.md +1 -1
- package/dist/cli.js +3 -4
- package/dist/index.cjs +3 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -4
- package/dist/index.js.map +1 -1
- package/package.json +8 -1
package/README.github.md
CHANGED
|
@@ -182,7 +182,7 @@ Each rule has a `message` (what to tell the developer), a `severity` (BLOCKER, C
|
|
|
182
182
|
}
|
|
183
183
|
```
|
|
184
184
|
|
|
185
|
-
Rules without `paths` apply to all files. Rules with `paths` are only checked against matching files. The file is validated at load time: invalid severity values and missing required fields are skipped with a warning.
|
|
185
|
+
Rules without `paths` apply to all files. Rules with `paths` are only checked against matching files. The file is validated at load time: invalid severity values and missing required fields are skipped with a warning. There is no hard cap on the number of rules; a soft warning is logged above 500 since large rulesets can inflate the AI prompt. IRA rules are for nuanced, context-dependent standards that linters cannot express. Deterministic checks (naming conventions, import order, formatting) belong in ESLint.
|
|
186
186
|
|
|
187
187
|
Rules are enforced in all review surfaces (CLI, CI/CD, VS Code extension) with no license gating. In the VS Code extension, run `IRA: Init Rules File` from the command palette to scaffold an empty `.ira-rules.json`. The extension ships a JSON Schema for the file, so you get autocomplete and validation as you edit.
|
|
188
188
|
|
|
@@ -279,10 +279,10 @@ Suggested Fix: Use parameterized queries:
|
|
|
279
279
|
|
|
280
280
|
1. Install from the [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=ira-review.ira-review-vscode)
|
|
281
281
|
2. Open a project with a GitHub or Bitbucket remote
|
|
282
|
-
3. `Cmd+Shift+P` > `IRA:
|
|
283
|
-
4.
|
|
282
|
+
3. `Cmd+Shift+P` > `IRA: Quick Start` (auto-detects SCM, walks you through tokens, optionally sets up JIRA)
|
|
283
|
+
4. `Cmd+Shift+P` > `IRA: Review Current PR` and enter your PR number
|
|
284
284
|
|
|
285
|
-
If you have GitHub Copilot,
|
|
285
|
+
If you have GitHub Copilot, Quick Start finishes in seconds — no API keys, no configuration. Alternatively, set the AI provider to `amp` if you have the AMP CLI installed (`amp login`). For Bitbucket Server / Data Center or JIRA, Quick Start gives you the right token-creation links inline.
|
|
286
286
|
|
|
287
287
|
### CLI
|
|
288
288
|
|
package/README.md
CHANGED
|
@@ -78,7 +78,7 @@ Commit a `.ira-rules.json` to your repo root. Rules are injected into the AI pro
|
|
|
78
78
|
**Rules:**
|
|
79
79
|
- `message` + `severity` required. `bad`/`good` examples and `paths` are optional.
|
|
80
80
|
- Rules without `paths` apply to all files. Rules with `paths` match only those directories.
|
|
81
|
-
-
|
|
81
|
+
- No hard cap on rules (soft warning above 500). Deterministic checks (naming, formatting) belong in ESLint.
|
|
82
82
|
- Invalid rules are skipped with a warning, not a crash.
|
|
83
83
|
- No license gating. Works in CLI, CI/CD, and VS Code extension.
|
|
84
84
|
|
package/README.npm.md
CHANGED
|
@@ -78,7 +78,7 @@ Commit a `.ira-rules.json` to your repo root. Rules are injected into the AI pro
|
|
|
78
78
|
**Rules:**
|
|
79
79
|
- `message` + `severity` required. `bad`/`good` examples and `paths` are optional.
|
|
80
80
|
- Rules without `paths` apply to all files. Rules with `paths` match only those directories.
|
|
81
|
-
-
|
|
81
|
+
- No hard cap on rules (soft warning above 500). Deterministic checks (naming, formatting) belong in ESLint.
|
|
82
82
|
- Invalid rules are skipped with a warning, not a crash.
|
|
83
83
|
- No license gating. Works in CLI, CI/CD, and VS Code extension.
|
|
84
84
|
|
package/dist/cli.js
CHANGED
|
@@ -513,7 +513,7 @@ function annotateDiffWithLineNumbers(diff) {
|
|
|
513
513
|
import { readFileSync as readFileSync4, existsSync as existsSync6 } from "fs";
|
|
514
514
|
import { resolve } from "path";
|
|
515
515
|
var VALID_SEVERITIES = ["BLOCKER", "CRITICAL", "MAJOR", "MINOR"];
|
|
516
|
-
var
|
|
516
|
+
var RULES_SOFT_WARN_THRESHOLD = 500;
|
|
517
517
|
function loadRawRulesFile(cwd) {
|
|
518
518
|
const dir = cwd ?? process.cwd();
|
|
519
519
|
const filePath = resolve(dir, ".ira-rules.json");
|
|
@@ -569,9 +569,8 @@ function loadRulesFile(cwd) {
|
|
|
569
569
|
...typeof rule.createdAt === "string" && { createdAt: rule.createdAt }
|
|
570
570
|
});
|
|
571
571
|
}
|
|
572
|
-
if (valid.length >
|
|
573
|
-
console.warn(`IRA: .ira-rules.json has
|
|
574
|
-
return valid.slice(0, MAX_RULES);
|
|
572
|
+
if (valid.length > RULES_SOFT_WARN_THRESHOLD) {
|
|
573
|
+
console.warn(`IRA: .ira-rules.json has ${valid.length} rules (>${RULES_SOFT_WARN_THRESHOLD}). All will be enforced, but large rulesets can inflate the AI prompt and risk hitting model context limits. Tip: Move deterministic rules to ESLint and keep only nuanced, context-dependent rules in IRA.`);
|
|
575
574
|
}
|
|
576
575
|
return valid;
|
|
577
576
|
}
|
package/dist/index.cjs
CHANGED
|
@@ -747,7 +747,7 @@ function annotateDiffWithLineNumbers(diff) {
|
|
|
747
747
|
var import_node_fs6 = require("fs");
|
|
748
748
|
var import_node_path6 = require("path");
|
|
749
749
|
var VALID_SEVERITIES = ["BLOCKER", "CRITICAL", "MAJOR", "MINOR"];
|
|
750
|
-
var
|
|
750
|
+
var RULES_SOFT_WARN_THRESHOLD = 500;
|
|
751
751
|
function loadRawRulesFile(cwd) {
|
|
752
752
|
const dir = cwd ?? process.cwd();
|
|
753
753
|
const filePath = (0, import_node_path6.resolve)(dir, ".ira-rules.json");
|
|
@@ -803,9 +803,8 @@ function loadRulesFile(cwd) {
|
|
|
803
803
|
...typeof rule.createdAt === "string" && { createdAt: rule.createdAt }
|
|
804
804
|
});
|
|
805
805
|
}
|
|
806
|
-
if (valid.length >
|
|
807
|
-
console.warn(`IRA: .ira-rules.json has
|
|
808
|
-
return valid.slice(0, MAX_RULES);
|
|
806
|
+
if (valid.length > RULES_SOFT_WARN_THRESHOLD) {
|
|
807
|
+
console.warn(`IRA: .ira-rules.json has ${valid.length} rules (>${RULES_SOFT_WARN_THRESHOLD}). All will be enforced, but large rulesets can inflate the AI prompt and risk hitting model context limits. Tip: Move deterministic rules to ESLint and keep only nuanced, context-dependent rules in IRA.`);
|
|
809
808
|
}
|
|
810
809
|
return valid;
|
|
811
810
|
}
|