reporefit 0.4.2 → 0.4.3

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.md CHANGED
@@ -55,4 +55,4 @@ Setup for other clients: https://reporefit.com/en/mcp/
55
55
 
56
56
  Every rule ID (for example `SEC-001`) is explained at https://reporefit.com/en/rules/
57
57
 
58
- RepoRefit 0.4.2 · MIT License · Third-party notices in THIRD_PARTY_NOTICES.md
58
+ RepoRefit 0.4.3 · MIT License · Third-party notices in THIRD_PARTY_NOTICES.md
@@ -11,8 +11,8 @@ import { dirname as dirname2, join as join4, resolve as resolve3 } from "node:pa
11
11
 
12
12
  // ../core/src/types.ts
13
13
  var SCHEMA_VERSION = "0.3.0";
14
- var ENGINE_VERSION = "0.4.2";
15
- var RULESET_VERSION = "2026.12.8";
14
+ var ENGINE_VERSION = "0.4.3";
15
+ var RULESET_VERSION = "2026.12.9";
16
16
 
17
17
  // ../core/src/input/limits.ts
18
18
  var MiB = 1024 * 1024;
@@ -278,7 +278,7 @@ async function sha256Hex(text3) {
278
278
  var utf8 = new TextDecoder("utf-8");
279
279
 
280
280
  // ../core/src/input/folder.ts
281
- function createFolderAdapter(entries, limits) {
281
+ function createFolderAdapter(entries, limits, ignoredDirectories = []) {
282
282
  const listingReasons = [];
283
283
  let listComplete = true;
284
284
  let usable = entries;
@@ -305,6 +305,7 @@ function createFolderAdapter(entries, limits) {
305
305
  const key = path.toLowerCase();
306
306
  if (seen.has(key)) excluded = "name-collision";
307
307
  else seen.add(key);
308
+ if (excluded === null && e.ignored) excluded = "ignored";
308
309
  if (excluded === null) excluded = classifyPath(path);
309
310
  for (const d of ancestorDirectories(path)) directories.add(d);
310
311
  files.push({ path, size: e.size, excluded });
@@ -339,6 +340,12 @@ function createFolderAdapter(entries, limits) {
339
340
  github: null,
340
341
  files,
341
342
  directories,
343
+ ignoredDirectories: ignoredDirectories.flatMap((d) => {
344
+ const n = normalizeEntryPath(d);
345
+ const p = n.ok ? stripWrapper(n.path, wrapperRoot) : null;
346
+ if (p) directories.add(p);
347
+ return p ? [p] : [];
348
+ }),
342
349
  listComplete,
343
350
  listingReasons,
344
351
  bytesRead: () => readSoFar,
@@ -8428,6 +8435,11 @@ function checkDocConsistency(input) {
8428
8435
  var CODE_EXT = /* @__PURE__ */ new Set(["js", "mjs", "cjs", "jsx", "ts", "mts", "cts", "tsx", "vue", "svelte", "py", "rb", "go", "rs", "java", "kt", "cs", "php", "swift"]);
8429
8436
  var DUP_WINDOW = 6;
8430
8437
  var MAX_FINDINGS = 50;
8438
+ var GENERATED_NAME = /\.bundle\.[cm]?js$/i;
8439
+ var GENERATED_HEADER = /\b(?:generated by|auto-?generated|do not edit|@generated|this file (?:is|was) (?:auto-?)?generated|code generated by)\b/i;
8440
+ function isGeneratedFile(path, text3) {
8441
+ return GENERATED_NAME.test(path) || GENERATED_HEADER.test(text3.slice(0, 600));
8442
+ }
8431
8443
  function isCodePath(path) {
8432
8444
  return CODE_EXT.has(extensionOf(path)) && !/\.min\.(js|css)$/.test(path) && !/(^|\/)(vendor|dist|build)\//.test(path);
8433
8445
  }
@@ -8527,7 +8539,8 @@ function meaningful(text3, path) {
8527
8539
  return out;
8528
8540
  }
8529
8541
  function checkDuplicateCode(docs) {
8530
- const files = docs.filter((d) => isCodePath(d.path) && !d.text.split("\n").some((l) => l.length > 500)).sort((a, b) => a.path < b.path ? -1 : 1).map((d) => ({ path: d.path, text: d.text, lines: meaningful(d.text, d.path) }));
8542
+ const generated = docs.filter((d) => isCodePath(d.path) && isGeneratedFile(d.path, d.text)).sort((a, b) => a.path < b.path ? -1 : 1);
8543
+ const files = docs.filter((d) => isCodePath(d.path) && !isGeneratedFile(d.path, d.text) && !d.text.split("\n").some((l) => l.length > 500)).sort((a, b) => a.path < b.path ? -1 : 1).map((d) => ({ path: d.path, text: d.text, lines: meaningful(d.text, d.path) }));
8531
8544
  const codeLines = files.reduce((n, f) => n + f.lines.length, 0);
8532
8545
  const keyAt = (f, i) => i + DUP_WINDOW <= f.lines.length ? f.lines.slice(i, i + DUP_WINDOW).map((l) => l.norm).join("\n") : null;
8533
8546
  const windows = /* @__PURE__ */ new Map();
@@ -8601,11 +8614,26 @@ function checkDuplicateCode(docs) {
8601
8614
  related: locs.slice(1).map(({ path, line, column }) => ({ path, line, column }))
8602
8615
  });
8603
8616
  }
8617
+ if (generated.length) {
8618
+ const first = generated[0];
8619
+ findings.push({
8620
+ id: `DUP-001-${fnv1a(`generated:${generated.map((g) => g.path).join("|")}`)}`,
8621
+ ruleId: "DUP-001",
8622
+ severity: "info",
8623
+ confidence: "high",
8624
+ messageKey: "dup001.generated",
8625
+ params: { count: generated.length, examples: generated.slice(0, 3).map((g) => g.path).join(", ") + (generated.length > 3 ? ", \u2026" : "") },
8626
+ location: { path: first.path, line: 1, column: 1 },
8627
+ evidence: truncate(maskSecrets((first.text.split(/\r?\n/).find((l) => l.trim()) ?? "").trim())),
8628
+ recommendation: { messageKey: "dup001.generated.fix", params: {} },
8629
+ verification: { messageKey: "dup.verify", params: { path: first.path, line: 1 } }
8630
+ });
8631
+ }
8604
8632
  return {
8605
8633
  metrics: { codeLines, duplicatedLines: dupLines.size },
8606
8634
  rule: {
8607
8635
  ruleId: "DUP-001",
8608
- status: files.length === 0 ? "skipped" : findings.length ? "fail" : "pass",
8636
+ status: files.length === 0 && !findings.length ? "skipped" : findings.length ? "fail" : "pass",
8609
8637
  eligible: files.length,
8610
8638
  inspected: files.length,
8611
8639
  findings,
@@ -8785,6 +8813,11 @@ function checkArchitecture(docs, index2) {
8785
8813
  const target = resolveImport(doc.path, ref.spec, index2.files);
8786
8814
  const location = { path: doc.path, line: ref.line, column: ref.column };
8787
8815
  if (!target) {
8816
+ const wanted = normalize(doc.path.includes("/") ? doc.path.slice(0, doc.path.lastIndexOf("/")) : "", ref.spec.split("?")[0]);
8817
+ if (wanted && (index2.ignoredDirectories ?? []).some((d) => wanted === d || wanted.startsWith(`${d}/`))) {
8818
+ unverified.push({ location, target: ref.spec, resolved: wanted, reasonKey: "arc002.unverified.ignored" });
8819
+ continue;
8820
+ }
8788
8821
  if (!index2.listComplete) {
8789
8822
  unverified.push({ location, target: ref.spec, resolved: ref.spec, reasonKey: "arc002.unverified.partialListing" });
8790
8823
  continue;
@@ -9827,6 +9860,13 @@ async function scanOnce(adapter, ctx) {
9827
9860
  excludedByReason[r] = (excludedByReason[r] ?? 0) + 1;
9828
9861
  excluded++;
9829
9862
  };
9863
+ const ignoreFile = adapter.files.find((f) => f.path === ".reporefitignore" && !f.excluded);
9864
+ if (ignoreFile) {
9865
+ const r = await adapter.readText(".reporefitignore", 256 * 1024);
9866
+ const ignored = gitignoreMatcher(r.ok ? r.text : null);
9867
+ const under = (p) => p.split("/").slice(0, -1).some((_, i, parts) => ignored(`${parts.slice(0, i + 1).join("/")}/`));
9868
+ for (const f of adapter.files) if (!f.excluded && f.path !== ".reporefitignore" && (ignored(f.path) || under(f.path))) f.excluded = "ignored";
9869
+ }
9830
9870
  for (const f of adapter.files) if (f.excluded) bump(f.excluded);
9831
9871
  const progress = (stage, filesRead) => ctx.onProgress?.({ stage, discovered: adapter.files.length, filesRead, excluded });
9832
9872
  progress("listing", 0);
@@ -9904,7 +9944,7 @@ async function scanOnce(adapter, ctx) {
9904
9944
  const md002 = checkDuplicates(mdDocs, eligibleMd, mdPartial, MD002_MIN_CHARS, contextPaths);
9905
9945
  const deps = extractDependencies(docs);
9906
9946
  const dup = checkDuplicateCode(docs);
9907
- const arc = checkArchitecture(docs, { files: listed, listComplete: adapter.listComplete });
9947
+ const arc = checkArchitecture(docs, { files: listed, listComplete: adapter.listComplete, ignoredDirectories: adapter.ignoredDirectories ?? [] });
9908
9948
  const ops = checkDeploy(docs, { files: listed, listComplete: adapter.listComplete });
9909
9949
  const sec001 = checkSecrets(docs, candidates.length, mdPartial);
9910
9950
  const sec002 = checkSensitiveFiles([...listed], docs.find((d) => d.path === ".gitignore")?.text ?? null, adapter.kind === "github", new Map(docs.map((d) => [d.path, d.text])));
@@ -10453,6 +10493,9 @@ var enT = {
10453
10493
  "arc002.missing": 'Import "{spec}" does not match any file in the project.',
10454
10494
  "arc002.fix": 'Fix the path in "{spec}" or add the missing file. If the file is generated at build time, you can ignore this.',
10455
10495
  "arc002.unverified.partialListing": "The file list is incomplete, so this import could not be confirmed.",
10496
+ "arc002.unverified.ignored": "The module is in an ignored folder that was not listed, so this import could not be confirmed.",
10497
+ "dup001.generated": '{count} generated file(s) (build output such as bundles, or files marked "generated" or "do not edit") were not compared for duplicates: {examples}.',
10498
+ "dup001.generated.fix": "Generated files are copied on purpose by a build. Look for repeated code in the sources they are built from.",
10456
10499
  "arc.verify": "Run the same check again and confirm {path}:{line} no longer appears.",
10457
10500
  "arc.reason.noCode": "No JavaScript or TypeScript files were found.",
10458
10501
  "arc.reason.capped": "Only the first 50 results are listed.",
@@ -10616,6 +10659,9 @@ var koT = {
10616
10659
  "arc002.missing": 'import "{spec}"\uC5D0 \uB9DE\uB294 \uD30C\uC77C\uC774 \uD504\uB85C\uC81D\uD2B8\uC5D0 \uC5C6\uC2B5\uB2C8\uB2E4.',
10617
10660
  "arc002.fix": '"{spec}" \uACBD\uB85C\uB97C \uACE0\uCE58\uAC70\uB098 \uBE60\uC9C4 \uD30C\uC77C\uC744 \uCD94\uAC00\uD558\uC138\uC694. \uBE4C\uB4DC\uD560 \uB54C \uC0DD\uC131\uB418\uB294 \uD30C\uC77C\uC774\uB77C\uBA74 \uBB34\uC2DC\uD574\uB3C4 \uB429\uB2C8\uB2E4.',
10618
10661
  "arc002.unverified.partialListing": "\uD30C\uC77C \uBAA9\uB85D\uC774 \uC644\uC804\uD558\uC9C0 \uC54A\uC544 \uC774 import\uB294 \uD655\uC778\uD558\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.",
10662
+ "arc002.unverified.ignored": "\uBAA8\uB4C8\uC774 \uBAA9\uB85D\uC5D0\uC11C \uC81C\uC678\uB41C \uBB34\uC2DC \uD3F4\uB354\uC5D0 \uC788\uC5B4 \uC774 import\uB294 \uD655\uC778\uD558\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.",
10663
+ "dup001.generated": '\uC790\uB3D9 \uC0DD\uC131 \uD30C\uC77C {count}\uAC1C(\uBC88\uB4E4 \uAC19\uC740 \uBE4C\uB4DC \uC0B0\uCD9C\uBB3C, "generated"\xB7"do not edit" \uD45C\uC2DC \uD30C\uC77C)\uB294 \uC911\uBCF5 \uBE44\uAD50\uC5D0\uC11C \uBE90\uC2B5\uB2C8\uB2E4: {examples}.',
10664
+ "dup001.generated.fix": "\uC0DD\uC131 \uD30C\uC77C\uC740 \uBE4C\uB4DC\uAC00 \uC77C\uBD80\uB7EC \uBCF5\uC0AC\uD55C \uAC83\uC785\uB2C8\uB2E4. \uC911\uBCF5\uC740 \uADF8 \uD30C\uC77C\uC744 \uB9CC\uB4DC\uB294 \uC6D0\uBCF8 \uC18C\uC2A4\uC5D0\uC11C \uCC3E\uC73C\uC138\uC694.",
10619
10665
  "arc.verify": "\uAC19\uC740 \uAC80\uC0AC\uB97C \uB2E4\uC2DC \uC2E4\uD589\uD574 {path}:{line}\uC774(\uAC00) \uB354 \uC774\uC0C1 \uB098\uC624\uC9C0 \uC54A\uB294\uC9C0 \uD655\uC778\uD558\uC138\uC694.",
10620
10666
  "arc.reason.noCode": "JavaScript\uB098 TypeScript \uD30C\uC77C\uC744 \uCC3E\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.",
10621
10667
  "arc.reason.capped": "\uACB0\uACFC\uB294 \uCC98\uC74C 50\uAC1C\uAE4C\uC9C0\uB9CC \uBCF4\uC5EC \uC90D\uB2C8\uB2E4.",
@@ -10779,6 +10825,9 @@ var jaT = {
10779
10825
  "arc002.missing": 'import "{spec}" \u306B\u4E00\u81F4\u3059\u308B\u30D5\u30A1\u30A4\u30EB\u304C\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306B\u3042\u308A\u307E\u305B\u3093\u3002',
10780
10826
  "arc002.fix": '"{spec}" \u306E\u30D1\u30B9\u3092\u76F4\u3059\u304B\u3001\u8DB3\u308A\u306A\u3044\u30D5\u30A1\u30A4\u30EB\u3092\u8FFD\u52A0\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u30D3\u30EB\u30C9\u6642\u306B\u751F\u6210\u3055\u308C\u308B\u30D5\u30A1\u30A4\u30EB\u306A\u3089\u7121\u8996\u3057\u3066\u304B\u307E\u3044\u307E\u305B\u3093\u3002',
10781
10827
  "arc002.unverified.partialListing": "\u30D5\u30A1\u30A4\u30EB\u4E00\u89A7\u304C\u4E0D\u5B8C\u5168\u306A\u305F\u3081\u3001\u3053\u306E import \u306F\u78BA\u8A8D\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002",
10828
+ "arc002.unverified.ignored": "\u30E2\u30B8\u30E5\u30FC\u30EB\u304C\u4E00\u89A7\u306B\u542B\u3081\u306A\u3044\u7121\u8996\u30D5\u30A9\u30EB\u30C0\u30FC\u306B\u3042\u308B\u305F\u3081\u3001\u3053\u306E import \u306F\u78BA\u8A8D\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002",
10829
+ "dup001.generated": "\u81EA\u52D5\u751F\u6210\u30D5\u30A1\u30A4\u30EB {count} \u4EF6(\u30D0\u30F3\u30C9\u30EB\u306A\u3069\u306E\u30D3\u30EB\u30C9\u6210\u679C\u7269\u3001\u300Cgenerated\u300D\u300Cdo not edit\u300D\u3068\u8A18\u3055\u308C\u305F\u30D5\u30A1\u30A4\u30EB)\u306F\u91CD\u8907\u306E\u6BD4\u8F03\u304B\u3089\u9664\u304D\u307E\u3057\u305F: {examples}\u3002",
10830
+ "dup001.generated.fix": "\u751F\u6210\u30D5\u30A1\u30A4\u30EB\u306F\u30D3\u30EB\u30C9\u304C\u610F\u56F3\u7684\u306B\u30B3\u30D4\u30FC\u3057\u305F\u3082\u306E\u3067\u3059\u3002\u91CD\u8907\u306F\u751F\u6210\u5143\u306E\u30BD\u30FC\u30B9\u3067\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
10782
10831
  "arc.verify": "\u540C\u3058\u691C\u67FB\u3092\u518D\u5B9F\u884C\u3057\u3001{path}:{line} \u304C\u8868\u793A\u3055\u308C\u306A\u304F\u306A\u3063\u305F\u3053\u3068\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
10783
10832
  "arc.reason.noCode": "JavaScript \u3084 TypeScript \u306E\u30D5\u30A1\u30A4\u30EB\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3067\u3057\u305F\u3002",
10784
10833
  "arc.reason.capped": "\u7D50\u679C\u306F\u6700\u521D\u306E 50 \u4EF6\u3060\u3051\u3092\u8868\u793A\u3057\u307E\u3059\u3002",
@@ -10942,6 +10991,9 @@ var zhT = {
10942
10991
  "arc002.missing": '\u5BFC\u5165 "{spec}" \u5728\u9879\u76EE\u4E2D\u627E\u4E0D\u5230\u5BF9\u5E94\u6587\u4EF6\u3002',
10943
10992
  "arc002.fix": '\u4FEE\u6B63 "{spec}" \u7684\u8DEF\u5F84\u6216\u8865\u4E0A\u7F3A\u5931\u7684\u6587\u4EF6\u3002\u5982\u679C\u8BE5\u6587\u4EF6\u5728\u6784\u5EFA\u65F6\u751F\u6210\uFF0C\u53EF\u4EE5\u5FFD\u7565\u3002',
10944
10993
  "arc002.unverified.partialListing": "\u6587\u4EF6\u5217\u8868\u4E0D\u5B8C\u6574\uFF0C\u65E0\u6CD5\u786E\u8BA4\u6B64\u5BFC\u5165\u3002",
10994
+ "arc002.unverified.ignored": "\u6A21\u5757\u4F4D\u4E8E\u672A\u5217\u51FA\u7684\u5FFD\u7565\u6587\u4EF6\u5939\u4E2D\uFF0C\u65E0\u6CD5\u786E\u8BA4\u6B64\u5BFC\u5165\u3002",
10995
+ "dup001.generated": "{count} \u4E2A\u81EA\u52A8\u751F\u6210\u7684\u6587\u4EF6\uFF08\u6253\u5305\u4EA7\u7269\u7B49\u6784\u5EFA\u8F93\u51FA\uFF0C\u6216\u6807\u6709\u201Cgenerated\u201D\u201Cdo not edit\u201D\u7684\u6587\u4EF6\uFF09\u672A\u53C2\u4E0E\u91CD\u590D\u6BD4\u8F83\uFF1A{examples}\u3002",
10996
+ "dup001.generated.fix": "\u751F\u6210\u6587\u4EF6\u662F\u6784\u5EFA\u8FC7\u7A0B\u6709\u610F\u590D\u5236\u7684\u3002\u8BF7\u5728\u751F\u6210\u5B83\u4EEC\u7684\u6E90\u4EE3\u7801\u4E2D\u67E5\u627E\u91CD\u590D\u3002",
10945
10997
  "arc.verify": "\u518D\u6B21\u8FD0\u884C\u76F8\u540C\u7684\u68C0\u67E5\uFF0C\u786E\u8BA4 {path}:{line} \u4E0D\u518D\u51FA\u73B0\u3002",
10946
10998
  "arc.reason.noCode": "\u672A\u627E\u5230 JavaScript \u6216 TypeScript \u6587\u4EF6\u3002",
10947
10999
  "arc.reason.capped": "\u53EA\u5217\u51FA\u524D 50 \u4E2A\u7ED3\u679C\u3002",
@@ -11118,7 +11170,8 @@ var enC = {
11118
11170
  "cli.docs.scopeNote": "Requirement-like units of removed or changed Markdown documents that no agent loads, matched against every Markdown file of the revised copy. Code blocks, images and meaning across sentences are not verified.",
11119
11171
  "cli.links.title": "Links the edit broke (they resolved in the original):",
11120
11172
  "cli.docs.removed": "{path} (removed): {units} units, kept {kept}, probably the same {estimated}, review {review}, possible losses {missing}",
11121
- "cli.docs.changed": "{path} (changed): {units} units, kept {kept}, probably the same {estimated}, review {review}, possible losses {missing}"
11173
+ "cli.docs.changed": "{path} (changed): {units} units, kept {kept}, probably the same {estimated}, review {review}, possible losses {missing}",
11174
+ "cli.notInspected": "Not inspected: {excluded} files ({reasons}); references not confirmed: {unverified}. Findings cover only what was read."
11122
11175
  };
11123
11176
  var koC = {
11124
11177
  "cli.header": "RepoRefit \xB7 {tool} \xB7 \uD30C\uC77C {listed}\uAC1C \uC911 {read}\uAC1C \uC77D\uC74C \xB7 {seconds}\uCD08",
@@ -11189,7 +11242,8 @@ var koC = {
11189
11242
  "cli.docs.scopeNote": "\uC5D0\uC774\uC804\uD2B8\uAC00 \uC77D\uC9C0 \uC54A\uB294 Markdown \uBB38\uC11C \uC911 \uC9C0\uC6B0\uAC70\uB098 \uBC14\uAFBC \uBB38\uC11C\uC758 \uC694\uAD6C\uC0AC\uD56D \uB2E8\uC704\uB97C \uC218\uC815\uBCF8\uC758 \uBAA8\uB4E0 Markdown \uD30C\uC77C\uACFC \uB9DE\uCDB0 \uBD05\uB2C8\uB2E4. \uCF54\uB4DC \uBE14\uB85D, \uC774\uBBF8\uC9C0, \uC5EC\uB7EC \uBB38\uC7A5\uC5D0 \uAC78\uCE5C \uC758\uBBF8\uB294 \uAC80\uC99D\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",
11190
11243
  "cli.links.title": "\uC218\uC815\uC73C\uB85C \uAE68\uC9C4 \uB9C1\uD06C(\uC6D0\uBCF8\uC5D0\uC11C\uB294 \uC5F4\uB838\uB358 \uB9C1\uD06C):",
11191
11244
  "cli.docs.removed": "{path}(\uC0AD\uC81C): \uB2E8\uC704 {units}\uAC1C, \uBCF4\uC874 {kept}, \uAC19\uC544 \uBCF4\uC784 {estimated}, \uAC80\uD1A0 {review}, \uC0AC\uB77C\uC84C\uC744 \uC218 \uC788\uC74C {missing}",
11192
- "cli.docs.changed": "{path}(\uBCC0\uACBD): \uB2E8\uC704 {units}\uAC1C, \uBCF4\uC874 {kept}, \uAC19\uC544 \uBCF4\uC784 {estimated}, \uAC80\uD1A0 {review}, \uC0AC\uB77C\uC84C\uC744 \uC218 \uC788\uC74C {missing}"
11245
+ "cli.docs.changed": "{path}(\uBCC0\uACBD): \uB2E8\uC704 {units}\uAC1C, \uBCF4\uC874 {kept}, \uAC19\uC544 \uBCF4\uC784 {estimated}, \uAC80\uD1A0 {review}, \uC0AC\uB77C\uC84C\uC744 \uC218 \uC788\uC74C {missing}",
11246
+ "cli.notInspected": "\uAC80\uC0AC\uD558\uC9C0 \uC54A\uC74C: \uD30C\uC77C {excluded}\uAC1C({reasons}), \uD655\uC778\uD558\uC9C0 \uBABB\uD55C \uCC38\uC870 {unverified}\uAC1C. \uBC1C\uACAC \uC218\uB294 \uC77D\uC740 \uBC94\uC704\uC5D0\uB9CC \uD574\uB2F9\uD569\uB2C8\uB2E4."
11193
11247
  };
11194
11248
  var jaC = {
11195
11249
  "cli.header": "RepoRefit \xB7 {tool} \xB7 {listed} \u4EF6\u4E2D {read} \u4EF6\u306E\u30D5\u30A1\u30A4\u30EB\u3092\u8AAD\u307F\u8FBC\u307F \xB7 {seconds} \u79D2",
@@ -11260,7 +11314,8 @@ var jaC = {
11260
11314
  "cli.docs.scopeNote": "\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u304C\u8AAD\u307E\u306A\u3044 Markdown \u6587\u66F8\u306E\u3046\u3061\u3001\u524A\u9664\u30FB\u5909\u66F4\u3055\u308C\u305F\u6587\u66F8\u306E\u8981\u4EF6\u306E\u5358\u4F4D\u3092\u3001\u4FEE\u6B63\u7248\u306E\u3059\u3079\u3066\u306E Markdown \u30D5\u30A1\u30A4\u30EB\u3068\u7167\u5408\u3057\u307E\u3059\u3002\u30B3\u30FC\u30C9\u30D6\u30ED\u30C3\u30AF\u3001\u753B\u50CF\u3001\u8907\u6570\u306E\u6587\u306B\u307E\u305F\u304C\u308B\u610F\u5473\u306F\u691C\u8A3C\u3057\u307E\u305B\u3093\u3002",
11261
11315
  "cli.links.title": "\u4FEE\u6B63\u3067\u58CA\u308C\u305F\u30EA\u30F3\u30AF(\u5143\u306E\u7248\u3067\u306F\u958B\u3051\u305F\u3082\u306E):",
11262
11316
  "cli.docs.removed": "{path}(\u524A\u9664): \u5358\u4F4D {units} \u4EF6\u3001\u4FDD\u6301 {kept}\u3001\u540C\u3058\u306B\u898B\u3048\u308B {estimated}\u3001\u78BA\u8A8D {review}\u3001\u5931\u308F\u308C\u305F\u53EF\u80FD\u6027 {missing}",
11263
- "cli.docs.changed": "{path}(\u5909\u66F4): \u5358\u4F4D {units} \u4EF6\u3001\u4FDD\u6301 {kept}\u3001\u540C\u3058\u306B\u898B\u3048\u308B {estimated}\u3001\u78BA\u8A8D {review}\u3001\u5931\u308F\u308C\u305F\u53EF\u80FD\u6027 {missing}"
11317
+ "cli.docs.changed": "{path}(\u5909\u66F4): \u5358\u4F4D {units} \u4EF6\u3001\u4FDD\u6301 {kept}\u3001\u540C\u3058\u306B\u898B\u3048\u308B {estimated}\u3001\u78BA\u8A8D {review}\u3001\u5931\u308F\u308C\u305F\u53EF\u80FD\u6027 {missing}",
11318
+ "cli.notInspected": "\u691C\u67FB\u3057\u3066\u3044\u306A\u3044: \u30D5\u30A1\u30A4\u30EB {excluded} \u4EF6({reasons})\u3001\u78BA\u8A8D\u3067\u304D\u306A\u304B\u3063\u305F\u53C2\u7167 {unverified} \u4EF6\u3002\u691C\u51FA\u6570\u306F\u8AAD\u307F\u8FBC\u3093\u3060\u7BC4\u56F2\u3060\u3051\u306E\u3082\u306E\u3067\u3059\u3002"
11264
11319
  };
11265
11320
  var zhC = {
11266
11321
  "cli.header": "RepoRefit \xB7 {tool} \xB7 \u5DF2\u8BFB\u53D6 {listed} \u4E2A\u6587\u4EF6\u4E2D\u7684 {read} \u4E2A \xB7 {seconds} \u79D2",
@@ -11331,7 +11386,8 @@ var zhC = {
11331
11386
  "cli.docs.scopeNote": "\u628A\u4EE3\u7406\u4E0D\u8BFB\u53D6\u7684 Markdown \u6587\u6863\u4E2D\u88AB\u5220\u9664\u6216\u4FEE\u6539\u7684\u6587\u6863\u7684\u8981\u6C42\u5355\u5143\uFF0C\u4E0E\u4FEE\u6539\u7248\u7684\u6240\u6709 Markdown \u6587\u4EF6\u8FDB\u884C\u6BD4\u5BF9\u3002\u4E0D\u9A8C\u8BC1\u4EE3\u7801\u5757\u3001\u56FE\u7247\u548C\u8DE8\u53E5\u5B50\u7684\u542B\u4E49\u3002",
11332
11387
  "cli.links.title": "\u8FD9\u6B21\u4FEE\u6539\u5F04\u574F\u7684\u94FE\u63A5\uFF08\u5728\u539F\u7248\u4E2D\u53EF\u4EE5\u6253\u5F00\uFF09\uFF1A",
11333
11388
  "cli.docs.removed": "{path}\uFF08\u5220\u9664\uFF09\uFF1A\u5355\u5143 {units} \u4E2A\uFF0C\u4FDD\u7559 {kept}\uFF0C\u770B\u4F3C\u76F8\u540C {estimated}\uFF0C\u590D\u6838 {review}\uFF0C\u53EF\u80FD\u4E22\u5931 {missing}",
11334
- "cli.docs.changed": "{path}\uFF08\u4FEE\u6539\uFF09\uFF1A\u5355\u5143 {units} \u4E2A\uFF0C\u4FDD\u7559 {kept}\uFF0C\u770B\u4F3C\u76F8\u540C {estimated}\uFF0C\u590D\u6838 {review}\uFF0C\u53EF\u80FD\u4E22\u5931 {missing}"
11389
+ "cli.docs.changed": "{path}\uFF08\u4FEE\u6539\uFF09\uFF1A\u5355\u5143 {units} \u4E2A\uFF0C\u4FDD\u7559 {kept}\uFF0C\u770B\u4F3C\u76F8\u540C {estimated}\uFF0C\u590D\u6838 {review}\uFF0C\u53EF\u80FD\u4E22\u5931 {missing}",
11390
+ "cli.notInspected": "\u672A\u68C0\u67E5\uFF1A\u6587\u4EF6 {excluded} \u4E2A\uFF08{reasons}\uFF09\uFF0C\u65E0\u6CD5\u786E\u8BA4\u7684\u5F15\u7528 {unverified} \u4E2A\u3002\u53D1\u73B0\u6570\u53EA\u9488\u5BF9\u5DF2\u8BFB\u53D6\u7684\u8303\u56F4\u3002"
11335
11391
  };
11336
11392
 
11337
11393
  // ../core/src/i18n/messages.ts
@@ -11415,6 +11471,7 @@ var en = {
11415
11471
  "coverage.github-request-budget": "Stopped after the per-scan budget of {limit} GitHub requests.",
11416
11472
  "coverage.read-failures": "{count} file(s) could not be read.",
11417
11473
  "exclusion.excluded-directory": "Dependency/build/VCS folder",
11474
+ "exclusion.ignored": "Ignored by .reporefitignore, .gitignore or --ignore (listed, not read)",
11418
11475
  "exclusion.binary": "Binary file",
11419
11476
  "exclusion.nested-archive": "Nested archive (not opened)",
11420
11477
  "exclusion.symlink": "Symbolic link",
@@ -11505,6 +11562,7 @@ var ko = {
11505
11562
  "coverage.github-request-budget": "\uAC80\uC0AC\uB2F9 GitHub \uC694\uCCAD \uC608\uC0B0 {limit}\uD68C\uC5D0\uC11C \uBA48\uCDC4\uC2B5\uB2C8\uB2E4.",
11506
11563
  "coverage.read-failures": "\uD30C\uC77C {count}\uAC1C\uB97C \uC77D\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.",
11507
11564
  "exclusion.excluded-directory": "\uC758\uC874\uC131\xB7\uBE4C\uB4DC\xB7VCS \uD3F4\uB354",
11565
+ "exclusion.ignored": ".reporefitignore\xB7.gitignore\xB7--ignore\uB85C \uC81C\uC678(\uBAA9\uB85D\uC5D0\uB294 \uC788\uC74C, \uC77D\uC9C0 \uC54A\uC74C)",
11508
11566
  "exclusion.binary": "\uBC14\uC774\uB108\uB9AC \uD30C\uC77C",
11509
11567
  "exclusion.nested-archive": "\uC911\uCCA9 \uC555\uCD95 \uD30C\uC77C(\uC5F4\uC9C0 \uC54A\uC74C)",
11510
11568
  "exclusion.symlink": "\uC2EC\uBCFC\uB9AD \uB9C1\uD06C",
@@ -11595,6 +11653,7 @@ var ja = {
11595
11653
  "coverage.github-request-budget": "\u691C\u67FB\u3042\u305F\u308A\u306E GitHub \u30EA\u30AF\u30A8\u30B9\u30C8\u4E88\u7B97 {limit} \u56DE\u3067\u505C\u6B62\u3057\u307E\u3057\u305F\u3002",
11596
11654
  "coverage.read-failures": "{count} \u4EF6\u306E\u30D5\u30A1\u30A4\u30EB\u3092\u8AAD\u307F\u53D6\u308C\u307E\u305B\u3093\u3067\u3057\u305F\u3002",
11597
11655
  "exclusion.excluded-directory": "\u4F9D\u5B58\u95A2\u4FC2\u30FB\u30D3\u30EB\u30C9\u30FBVCS \u30D5\u30A9\u30EB\u30C0\u30FC",
11656
+ "exclusion.ignored": ".reporefitignore\u30FB.gitignore\u30FB--ignore \u3067\u9664\u5916(\u4E00\u89A7\u306B\u306F\u3042\u308A\u3001\u8AAD\u307F\u8FBC\u307E\u306A\u3044)",
11598
11657
  "exclusion.binary": "\u30D0\u30A4\u30CA\u30EA\u30D5\u30A1\u30A4\u30EB",
11599
11658
  "exclusion.nested-archive": "\u5165\u308C\u5B50\u306E\u5727\u7E2E\u30D5\u30A1\u30A4\u30EB(\u958B\u304B\u306A\u3044)",
11600
11659
  "exclusion.symlink": "\u30B7\u30F3\u30DC\u30EA\u30C3\u30AF\u30EA\u30F3\u30AF",
@@ -11685,6 +11744,7 @@ var zhHans = {
11685
11744
  "coverage.github-request-budget": "\u8FBE\u5230\u6BCF\u6B21\u68C0\u67E5 {limit} \u4E2A GitHub \u8BF7\u6C42\u7684\u9884\u7B97\u540E\u505C\u6B62\u3002",
11686
11745
  "coverage.read-failures": "\u6709 {count} \u4E2A\u6587\u4EF6\u65E0\u6CD5\u8BFB\u53D6\u3002",
11687
11746
  "exclusion.excluded-directory": "\u4F9D\u8D56\u3001\u6784\u5EFA\u6216\u7248\u672C\u63A7\u5236\u6587\u4EF6\u5939",
11747
+ "exclusion.ignored": "\u88AB .reporefitignore\u3001.gitignore \u6216 --ignore \u6392\u9664\uFF08\u5DF2\u5217\u51FA\uFF0C\u672A\u8BFB\u53D6\uFF09",
11688
11748
  "exclusion.binary": "\u4E8C\u8FDB\u5236\u6587\u4EF6",
11689
11749
  "exclusion.nested-archive": "\u5D4C\u5957\u538B\u7F29\u6587\u4EF6(\u4E0D\u6253\u5F00)",
11690
11750
  "exclusion.symlink": "\u7B26\u53F7\u94FE\u63A5",
@@ -12377,7 +12437,7 @@ function listFolder(root, opts) {
12377
12437
  };
12378
12438
  const patterns = [opts.useIgnoreFiles ? read(".gitignore") : "", opts.useIgnoreFiles ? read(".reporefitignore") : "", opts.ignore.join("\n")].join("\n");
12379
12439
  const ignored = gitignoreMatcher(patterns.trim() ? patterns : null);
12380
- const out = { entries: [], skippedSymlinks: 0, ignored: 0, truncated: false };
12440
+ const out = { entries: [], skippedSymlinks: 0, ignored: 0, ignoredDirs: [], truncated: false };
12381
12441
  const walk2 = (dir, rel) => {
12382
12442
  let names;
12383
12443
  try {
@@ -12406,15 +12466,14 @@ function listFolder(root, opts) {
12406
12466
  if (SKIP_DIRS.has(name)) continue;
12407
12467
  if (ignored(`${path}/`) || ignored(path)) {
12408
12468
  out.ignored++;
12469
+ out.ignoredDirs.push(`${top}/${path}`);
12409
12470
  continue;
12410
12471
  }
12411
12472
  walk2(full, path);
12412
12473
  } else if (st.isFile()) {
12413
- if (ignored(path)) {
12414
- out.ignored++;
12415
- continue;
12416
- }
12417
- out.entries.push({ path: `${top}/${path}`, size: st.size, read: async () => new Uint8Array(readFileSync(full)) });
12474
+ const skip = ignored(path);
12475
+ if (skip) out.ignored++;
12476
+ out.entries.push({ path: `${top}/${path}`, size: st.size, read: async () => new Uint8Array(readFileSync(full)), ...skip ? { ignored: true } : {} });
12418
12477
  }
12419
12478
  }
12420
12479
  };
@@ -12444,7 +12503,7 @@ async function runFolder(root, o) {
12444
12503
  const limits = cliLimits(o.maxFiles, o.maxReadMb);
12445
12504
  const tool2 = resolveTool(o.tool);
12446
12505
  const listing = listFolder(root, { maxFiles: limits.maxDiscoveredFiles, useIgnoreFiles: o.useIgnoreFiles ?? true, ignore: o.ignore ?? [] });
12447
- const adapter = createFolderAdapter(listing.entries, limits);
12506
+ const adapter = createFolderAdapter(listing.entries, limits, listing.ignoredDirs);
12448
12507
  if (listing.truncated) {
12449
12508
  adapter.listComplete = false;
12450
12509
  adapter.listingReasons.push({ code: "file-count-limit", params: { limit: limits.maxDiscoveredFiles } });
@@ -12475,7 +12534,7 @@ function shouldFail(r, failOn) {
12475
12534
  }
12476
12535
 
12477
12536
  // src/version.ts
12478
- var VERSION = "0.4.2";
12537
+ var VERSION = "0.4.3";
12479
12538
 
12480
12539
  // src/mcp.ts
12481
12540
  import { createInterface } from "node:readline";
@@ -12819,7 +12878,16 @@ function summarize(r, locale, max) {
12819
12878
  findings_total: r.findings.length,
12820
12879
  // Every finding is in exactly one severity: the parts add up to findings_total (info included).
12821
12880
  by_severity: { high: r.bySeverity.high, medium: r.bySeverity.medium, low: r.bySeverity.low, info: r.bySeverity.info },
12822
- coverage: { files_listed: c.discovered, files_read: c.inspected, partial: c.partial, reasons: c.reasons.map((x) => t(locale, `coverage.${x.code}`, x.params)) },
12881
+ coverage: {
12882
+ files_listed: c.discovered,
12883
+ files_read: c.inspected,
12884
+ // Not inspected: a clean result covers only what was read.
12885
+ files_excluded: c.excluded,
12886
+ excluded_by_reason: c.excludedByReason,
12887
+ unverified_references: r.report.rules.reduce((n, x) => n + x.unverified.length, 0),
12888
+ partial: c.partial,
12889
+ reasons: c.reasons.map((x) => t(locale, `coverage.${x.code}`, x.params))
12890
+ },
12823
12891
  findings: r.findings.slice(0, max).map((f) => ({
12824
12892
  rule: f.ruleId,
12825
12893
  severity: f.severity,
@@ -12999,6 +13067,11 @@ function renderText(r, locale) {
12999
13067
  lines.push("", t(locale, "cli.summary", { findings: r.findings.length, high: b.high, medium: b.medium, low: b.low, info: b.info, passed: r.passed, evaluated: r.evaluated }));
13000
13068
  if (c.partial) lines.push(t(locale, "cli.partial", { reasons: c.reasons.map((x) => t(locale, `coverage.${x.code}`, x.params)).join(" ") || t(locale, "cli.partialUnknown") }));
13001
13069
  if (r.listing.skippedSymlinks) lines.push(t(locale, "cli.symlinks", { count: r.listing.skippedSymlinks }));
13070
+ const unverified = r.report.rules.reduce((n, x) => n + x.unverified.length, 0);
13071
+ if (c.excluded || unverified) {
13072
+ const reasons = Object.entries(c.excludedByReason).map(([k, n]) => `${t(locale, `exclusion.${k}`)} ${n}`).join(", ");
13073
+ lines.push(t(locale, "cli.notInspected", { excluded: c.excluded, reasons: reasons || "-", unverified }));
13074
+ }
13002
13075
  if (r.findings.length) lines.push(t(locale, "cli.ruleDetails", { url: RULES_URL(locale, r.findings[0].ruleId).replace(/#.*$/, "") }));
13003
13076
  return lines.join("\n") + "\n";
13004
13077
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reporefit",
3
- "version": "0.4.2",
3
+ "version": "0.4.3",
4
4
  "description": "Check AI coding projects (instructions, tokens, secrets, MCP, dependencies, structure, deploy setup) on your own machine. Nothing is uploaded.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -25,8 +25,8 @@
25
25
  "url": "https://github.com/reporefit/action/issues"
26
26
  },
27
27
  "reporefit": {
28
- "engine": "0.4.2",
29
- "rules": "2026.12.8",
28
+ "engine": "0.4.3",
29
+ "rules": "2026.12.9",
30
30
  "schema": "0.3.0"
31
31
  },
32
32
  "keywords": [