@herbertgao/pi-extensions 2026.11.6 → 2026.11.8
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/CHANGELOG.md +20 -0
- package/README.md +9 -9
- package/THIRD_PARTY_NOTICES.md +2 -2
- package/node_modules/@herbertgao/pi-impeccable/CHANGELOG.md +6 -0
- package/node_modules/@herbertgao/pi-impeccable/README.md +2 -2
- package/node_modules/@herbertgao/pi-impeccable/package.json +4 -4
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/SKILL.md +1 -1
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/scripts/VERSION +1 -1
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/scripts/engine-checksums.txt +5 -5
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/scripts/live-browser.js +71 -56
- package/node_modules/@herbertgao/pi-subagents/CHANGELOG.md +6 -0
- package/node_modules/@herbertgao/pi-subagents/README.md +2 -2
- package/node_modules/@herbertgao/pi-subagents/package.json +4 -4
- package/node_modules/@herbertgao/pi-subagents/src/ui/conversation-viewer.ts +10 -6
- package/node_modules/@herbertgao/pi-subagents/src/ui/viewer-keys.ts +47 -4
- package/node_modules/@narumitw/pi-btw/CHANGELOG.md +12 -0
- package/node_modules/@narumitw/pi-btw/dist/chunks/{main-tree-picker-WHRN26NJ.ts → main-tree-picker-3PXJARQW.ts} +59 -53
- package/node_modules/@narumitw/pi-btw/dist/chunks/main-tree-picker-3PXJARQW.ts.map +7 -0
- package/node_modules/@narumitw/pi-btw/dist/index.ts +1 -1
- package/node_modules/@narumitw/pi-btw/docs/main-tree-snapshots.md +39 -0
- package/node_modules/@narumitw/pi-btw/docs/workflows.md +1 -0
- package/node_modules/@narumitw/pi-btw/package.json +1 -1
- package/node_modules/@narumitw/pi-btw/src/main-tree-picker.ts +73 -63
- package/node_modules/@pi-plugins/fast-mode/dist/index.d.mts +1 -4
- package/node_modules/@pi-plugins/fast-mode/dist/index.d.mts.map +1 -1
- package/node_modules/@pi-plugins/fast-mode/dist/index.mjs +5620 -2946
- package/node_modules/@pi-plugins/fast-mode/dist/index.mjs.map +1 -1
- package/node_modules/@pi-plugins/fast-mode/package.json +11 -11
- package/node_modules/pi-commandcode-provider/CHANGELOG.md +5 -0
- package/node_modules/pi-commandcode-provider/README.md +1 -1
- package/node_modules/pi-commandcode-provider/package.json +1 -1
- package/node_modules/pi-commandcode-provider/src/commandcode-catalog.ts +5 -4
- package/node_modules/pi-commandcode-provider/src/pricing.ts +8 -2
- package/node_modules/pi-lens/CHANGELOG-USER.md +12 -12
- package/node_modules/pi-lens/CHANGELOG.md +212 -0
- package/node_modules/pi-lens/README.md +1 -0
- package/node_modules/pi-lens/dist/{chunk-W4CUK5G6.js → chunk-2HWVG3IM.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-B2YUE6YD.js → chunk-3EIZMRXI.js} +11 -11
- package/node_modules/pi-lens/dist/{chunk-Y3EHLUPL.js → chunk-3MHY4BQY.js} +4 -4
- package/node_modules/pi-lens/dist/{chunk-IDCTDKIA.js → chunk-3PMLYGJN.js} +6 -6
- package/node_modules/pi-lens/dist/{chunk-VPFRU5IG.js → chunk-3QMLB4TI.js} +3 -3
- package/node_modules/pi-lens/dist/{chunk-NL5LSKVD.js → chunk-3R3Z54J7.js} +10 -4
- package/node_modules/pi-lens/dist/chunk-3VWEZ6H2.js +72 -0
- package/node_modules/pi-lens/dist/{chunk-YT2VR4SL.js → chunk-5EEWCJG7.js} +7 -7
- package/node_modules/pi-lens/dist/{chunk-4NCDHTFI.js → chunk-5FDUKJZO.js} +10 -10
- package/node_modules/pi-lens/dist/{chunk-QUQY3IME.js → chunk-5KLRCUDT.js} +9 -8
- package/node_modules/pi-lens/dist/{chunk-FOEPIX76.js → chunk-6EIV3H7O.js} +158 -61
- package/node_modules/pi-lens/dist/{chunk-GMC4ZGYR.js → chunk-6EXGCXM5.js} +5 -5
- package/node_modules/pi-lens/dist/{chunk-CTB5BAJI.js → chunk-6GWCYEP7.js} +17 -16
- package/node_modules/pi-lens/dist/{chunk-NBM7PNBP.js → chunk-6JLNZ6DP.js} +37 -26
- package/node_modules/pi-lens/dist/{chunk-ACRJ2GZ5.js → chunk-7424ANRU.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-TJQSYX3J.js → chunk-75TVYCQW.js} +6 -6
- package/node_modules/pi-lens/dist/{chunk-J6BR5XN2.js → chunk-7BEADGAZ.js} +3 -3
- package/node_modules/pi-lens/dist/chunk-7KWI5UHL.js +28 -0
- package/node_modules/pi-lens/dist/{chunk-GUGKKGG7.js → chunk-7M64NTAK.js} +3 -3
- package/node_modules/pi-lens/dist/{chunk-SKVNHCT5.js → chunk-7T64QA5D.js} +48 -43
- package/node_modules/pi-lens/dist/{chunk-YQA34KAF.js → chunk-7ZVEFWOE.js} +11 -11
- package/node_modules/pi-lens/dist/{chunk-SJQUWQR6.js → chunk-AAIVSSUU.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-6I44EDNQ.js → chunk-AD7JDEI6.js} +17 -15
- package/node_modules/pi-lens/dist/{chunk-3FRI5H4T.js → chunk-AGEQRJ5A.js} +24 -10
- package/node_modules/pi-lens/dist/{chunk-NPNFGYLV.js → chunk-AVBEPUCD.js} +19 -2
- package/node_modules/pi-lens/dist/{chunk-OTSTS7L2.js → chunk-AYDE7RFV.js} +34 -3
- package/node_modules/pi-lens/dist/{chunk-UOO4D2TK.js → chunk-AZXTLZHE.js} +34 -35
- package/node_modules/pi-lens/dist/{chunk-AWQWXSW4.js → chunk-B4FAFEBP.js} +7 -2
- package/node_modules/pi-lens/dist/{chunk-S3WFVG5P.js → chunk-BEIPWPVR.js} +137 -126
- package/node_modules/pi-lens/dist/{chunk-CZAWWXP6.js → chunk-BMMRLJA4.js} +7 -5
- package/node_modules/pi-lens/dist/{chunk-QWTHFFU6.js → chunk-C6V2DSZZ.js} +12 -12
- package/node_modules/pi-lens/dist/chunk-CIA7X2PZ.js +26 -0
- package/node_modules/pi-lens/dist/{chunk-ZD4KVFXI.js → chunk-D2ZYRI7M.js} +172 -3
- package/node_modules/pi-lens/dist/{chunk-F6FT6BVQ.js → chunk-D6ANA6YU.js} +34 -35
- package/node_modules/pi-lens/dist/{chunk-HILZE4BQ.js → chunk-D7OEGXDX.js} +396 -306
- package/node_modules/pi-lens/dist/{chunk-FCQSZQAT.js → chunk-DFAY7JUN.js} +14 -5
- package/node_modules/pi-lens/dist/{chunk-DOUAWKLO.js → chunk-DIIDMDZU.js} +12 -12
- package/node_modules/pi-lens/dist/{chunk-6MDM5MQT.js → chunk-DZSQXG66.js} +394 -162
- package/node_modules/pi-lens/dist/{chunk-QGITU23N.js → chunk-E3PNZDPH.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-QSCZAP24.js → chunk-E5SSUV2A.js} +4 -4
- package/node_modules/pi-lens/dist/{chunk-H65TYP6V.js → chunk-ET3DSSFZ.js} +37 -21
- package/node_modules/pi-lens/dist/chunk-F7AMFFVK.js +22 -0
- package/node_modules/pi-lens/dist/{chunk-4ITEFRDH.js → chunk-FDLGJFAE.js} +37 -145
- package/node_modules/pi-lens/dist/{chunk-XAFZJEXY.js → chunk-FVQKX5KI.js} +23 -23
- package/node_modules/pi-lens/dist/{chunk-CYUJB552.js → chunk-G3LR6V6N.js} +18 -12
- package/node_modules/pi-lens/dist/{chunk-ZOPXB2KK.js → chunk-GHATCG2A.js} +111 -107
- package/node_modules/pi-lens/dist/{chunk-XVB3Q2PG.js → chunk-HGEE5LDW.js} +3 -2
- package/node_modules/pi-lens/dist/{chunk-UNBRHPHJ.js → chunk-HJWF7CGW.js} +17 -15
- package/node_modules/pi-lens/dist/chunk-HRQTYU2T.js +355 -0
- package/node_modules/pi-lens/dist/{chunk-QUPYLQA4.js → chunk-HSTN27NR.js} +14 -9
- package/node_modules/pi-lens/dist/{chunk-YF4G5NN5.js → chunk-HWMNTQBJ.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-K6WIBVMK.js → chunk-HYDJUVOE.js} +8 -9
- package/node_modules/pi-lens/dist/{chunk-OPFNQBS5.js → chunk-HYR25MV3.js} +21 -25
- package/node_modules/pi-lens/dist/{chunk-MAD4QJTP.js → chunk-IC4L65U7.js} +21 -17
- package/node_modules/pi-lens/dist/{chunk-I32RSMH6.js → chunk-ILC2B7IJ.js} +11 -10
- package/node_modules/pi-lens/dist/{chunk-BGLS5SDN.js → chunk-IT7MFVGP.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-KDCIG23C.js → chunk-IZ36G463.js} +13 -9
- package/node_modules/pi-lens/dist/{chunk-ALIZWXHZ.js → chunk-JKAVKTMY.js} +9 -9
- package/node_modules/pi-lens/dist/{chunk-3HM4BUHR.js → chunk-JLMS7EMD.js} +16 -15
- package/node_modules/pi-lens/dist/{chunk-HSYFLOZY.js → chunk-JRSS6KM4.js} +3 -3
- package/node_modules/pi-lens/dist/{chunk-VCRVNLE7.js → chunk-K2GV34T2.js} +9 -1
- package/node_modules/pi-lens/dist/{chunk-KJ3AHOCK.js → chunk-K2LD6YNH.js} +10 -10
- package/node_modules/pi-lens/dist/chunk-KUDUKKQE.js +89 -0
- package/node_modules/pi-lens/dist/{chunk-7JX3RNG4.js → chunk-KXDQD34C.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-VGTBLTPN.js → chunk-LD7SXICE.js} +18 -66
- package/node_modules/pi-lens/dist/{chunk-UY745U35.js → chunk-ME6MF2N2.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-QHOTTC4A.js → chunk-MOEWCPMC.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-JZQGRARR.js → chunk-MV6ST2KT.js} +15 -12
- package/node_modules/pi-lens/dist/{chunk-QL37SGTS.js → chunk-NCDH2JB7.js} +18 -18
- package/node_modules/pi-lens/dist/{chunk-AON2QIJF.js → chunk-NRVWLTOY.js} +20 -17
- package/node_modules/pi-lens/dist/chunk-NZINZCHB.js +108 -0
- package/node_modules/pi-lens/dist/{chunk-A5TEJZGJ.js → chunk-O6LCSHHI.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-PTSA6QKL.js → chunk-OEPWTSUG.js} +8 -8
- package/node_modules/pi-lens/dist/{chunk-QMV2APEH.js → chunk-OF2YGDUE.js} +36 -36
- package/node_modules/pi-lens/dist/{chunk-GTTMQ6XB.js → chunk-OHEUOWYT.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-GVWIU7M7.js → chunk-ORYQGVC3.js} +41 -4
- package/node_modules/pi-lens/dist/{chunk-KSTQ4VXT.js → chunk-OVPR3GQ6.js} +10 -13
- package/node_modules/pi-lens/dist/{chunk-MN635QYA.js → chunk-OYXD2MOM.js} +3 -3
- package/node_modules/pi-lens/dist/{chunk-TN5CWX5D.js → chunk-PCREZ4HJ.js} +34 -35
- package/node_modules/pi-lens/dist/{chunk-SG2JQ2YP.js → chunk-PK3GDU4M.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-NE4EFHJX.js → chunk-PPYUBO6Y.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-DVRJBQOJ.js → chunk-PTJXMYRY.js} +19 -20
- package/node_modules/pi-lens/dist/{chunk-TYHOEX4V.js → chunk-PXGVB2CY.js} +36 -39
- package/node_modules/pi-lens/dist/{chunk-LT62P654.js → chunk-QJ4T73J5.js} +1 -1
- package/node_modules/pi-lens/dist/{chunk-2LVJQU3I.js → chunk-QY6J2FTK.js} +33 -29
- package/node_modules/pi-lens/dist/{chunk-ZZDVGCGG.js → chunk-R67WQ5RY.js} +9 -9
- package/node_modules/pi-lens/dist/{chunk-Q2VCKC3X.js → chunk-S6ZQFPOX.js} +11 -8
- package/node_modules/pi-lens/dist/{chunk-KFRDFAOE.js → chunk-SF7KSXB5.js} +7 -7
- package/node_modules/pi-lens/dist/{chunk-CZCAZVTD.js → chunk-SRXYSLMW.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-WS3UFJOU.js → chunk-SUIZOCSY.js} +3 -2
- package/node_modules/pi-lens/dist/{chunk-NUSXS6YB.js → chunk-T5EGSBM2.js} +4 -4
- package/node_modules/pi-lens/dist/{chunk-V7F7JHS5.js → chunk-T6PPK3T6.js} +563 -554
- package/node_modules/pi-lens/dist/chunk-TM3A3K7T.js +28 -0
- package/node_modules/pi-lens/dist/{chunk-RQRKIRFY.js → chunk-TOOXNL6M.js} +8 -8
- package/node_modules/pi-lens/dist/chunk-TS5EIWEF.js +25 -0
- package/node_modules/pi-lens/dist/chunk-VD7MQFEV.js +56 -0
- package/node_modules/pi-lens/dist/{chunk-2ADRLTM2.js → chunk-VU2PRGRI.js} +6 -35
- package/node_modules/pi-lens/dist/chunk-W6VLB6LL.js +145 -0
- package/node_modules/pi-lens/dist/{chunk-CB7PEVOJ.js → chunk-WLD6BGON.js} +176 -60
- package/node_modules/pi-lens/dist/{chunk-C6AODRNU.js → chunk-WTSQKJAR.js} +11 -10
- package/node_modules/pi-lens/dist/{chunk-46TQJSUE.js → chunk-X33QECRJ.js} +2 -2
- package/node_modules/pi-lens/dist/{chunk-B6HXETWY.js → chunk-Y7XMKBFP.js} +28 -26
- package/node_modules/pi-lens/dist/{chunk-TLWFZ66Y.js → chunk-YLHJWAQS.js} +4 -4
- package/node_modules/pi-lens/dist/{chunk-BRESRQBE.js → chunk-YLW26OHX.js} +8 -8
- package/node_modules/pi-lens/dist/{chunk-IL6PIV33.js → chunk-YTXFNCVN.js} +2 -2
- package/node_modules/pi-lens/dist/chunk-YULIERZW.js +27 -0
- package/node_modules/pi-lens/dist/chunk-Z2W5YJBW.js +25 -0
- package/node_modules/pi-lens/dist/{chunk-XPGH5O74.js → chunk-Z6WTLVUL.js} +30 -39
- package/node_modules/pi-lens/dist/{chunk-W7TY6HYX.js → chunk-ZRQMENT4.js} +5 -27
- package/node_modules/pi-lens/dist/{chunk-E4VXKTBR.js → chunk-ZWZD4TJ5.js} +163 -173
- package/node_modules/pi-lens/dist/index.js +6405 -4497
- package/node_modules/pi-lens/dist/mcp/analyze-cli.js +17 -13
- package/node_modules/pi-lens/dist/mcp/cli.js +42 -43
- package/node_modules/pi-lens/dist/mcp/server.js +1520 -608
- package/node_modules/pi-lens/dist/mcp/worker.js +62 -61
- package/node_modules/pi-lens/dist/probes/installer.js +19 -18
- package/node_modules/pi-lens/docs/agent-guide.md +3 -1
- package/node_modules/pi-lens/docs/agent-tools.md +57 -13
- package/node_modules/pi-lens/docs/alignment-families.md +5 -1
- package/node_modules/pi-lens/docs/ci.md +120 -0
- package/node_modules/pi-lens/docs/configuration.md +24 -6
- package/node_modules/pi-lens/docs/custom-rules.md +1 -0
- package/node_modules/pi-lens/docs/defect-shapes.md +107 -71
- package/node_modules/pi-lens/docs/durable-store-audit-1202.md +1 -1
- package/node_modules/pi-lens/docs/engineering-principles.md +46 -12
- package/node_modules/pi-lens/docs/environment-variables.md +25 -2
- package/node_modules/pi-lens/docs/features.md +1 -1
- package/node_modules/pi-lens/docs/globalconfig.md +8 -1
- package/node_modules/pi-lens/docs/invariants/dispatch-runners.md +13 -0
- package/node_modules/pi-lens/docs/invariants/lsp-trust-exec.md +7 -0
- package/node_modules/pi-lens/docs/language-coverage.md +1 -1
- package/node_modules/pi-lens/docs/lsp-capability-matrix.md +15 -16
- package/node_modules/pi-lens/docs/lsp-idle-eviction.md +1 -1
- package/node_modules/pi-lens/docs/mcp.md +2 -1
- package/node_modules/pi-lens/docs/module-report-read-symbol.md +2 -2
- package/node_modules/pi-lens/docs/pi-lens-fixer.md +3 -2
- package/node_modules/pi-lens/docs/pi-lens-merge-policy.md +1 -0
- package/node_modules/pi-lens/docs/pi-lens-monitor.md +4 -1
- package/node_modules/pi-lens/docs/pi-lens-release.md +19 -0
- package/node_modules/pi-lens/docs/pi-lens-reviewer.md +8 -2
- package/node_modules/pi-lens/docs/public-api-stability.md +41 -6
- package/node_modules/pi-lens/docs/rfcs/5138-query-surface.md +121 -0
- package/node_modules/pi-lens/docs/servercapabilities.md +1 -1
- package/node_modules/pi-lens/docs/settings.md +9 -0
- package/node_modules/pi-lens/docs/usage.md +1 -1
- package/node_modules/pi-lens/docs/word-index.md +9 -10
- package/node_modules/pi-lens/package.json +3 -3
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/README.md +2 -0
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/c/security/dont-call-system-c.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/c/security/file-access-before-action-c.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/c/security/file-stat-before-action-c.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/c/security/insecure-hash-c.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/c/security/libxml2-audit-parser-c.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/c/security/null-library-function-c.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/c/security/sizeof-this-c.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/c/security/small-key-size-c.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/c/security/world-writable-file-c.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/dont-call-system-cpp.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/file-access-before-action-cpp.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/file-stat-before-action-cpp.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/fix-format-security-error-cpp.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/insecure-hash-cpp.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/libxml2-audit-parser-cpp.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/missing-nul-cpp-string-memcpy-cpp.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/null-library-function-cpp.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/return-c-str-cpp.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/sizeof-this-cpp.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/small-key-size-cpp.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/std-return-data-cpp.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/std-vector-invalidation-cpp.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/string-view-temporary-string-cpp.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/cpp/security/world-writable-file-cpp.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/csharp/security/httponly-false-csharp.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/csharp/security/insecure-binaryformatter-deserialization-csharp.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/csharp/security/jwt-decode-without-verify-csharp.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/csharp/security/jwt-hardcoded-secret-csharp.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/csharp/security/jwt-tokenvalidationparameters-no-expiry-validation-csharp.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/csharp/security/networkcredential-hardcoded-secret-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/csharp/security/npgsqlconnectionstringbuilder-hardcoded-secret-csharp.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/csharp/security/oracleconnectionstringbuilder-hardcoded-secret-csharp.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/csharp/security/sqlconnectionstringbuilder-hardcoded-secret-csharp.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/csharp/security/stacktrace-disclosure-csharp.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/csharp/security/use-ecb-mode-csharp.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/go/security/avoid-bind-to-all-interfaces-go.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/go/security/gorilla-cookie-store-hardcoded-session-key-go.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/go/security/gorilla-csrf-hardcoded-auth-key-go.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/go/security/grpc-client-insecure-connection-go.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/go/security/jwt-go-none-algorithm-go.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/go/security/missing-ssl-minversion-go.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/go/security/openai-empty-secret-go.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/go/security/openai-hardcoded-secret-go.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/go/security/ssl-v3-is-insecure-go.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/go/security/tls-with-insecure-cipher-go.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/go/security/use-of-weak-rsa-key-go.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/html/security/plaintext-http-link-html.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/cbc-padding-oracle-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/cookie-httponly-false-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/cookie-missing-httponly-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/cookie-missing-samesite-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/cookie-missing-secure-flag-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/cookie-secure-flag-false-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/datanucleus-hardcoded-connection-password-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/des-is-deprecated-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/desede-is-deprecated-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/documentbuilderfactory-disallow-doctype-decl-false-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/documentbuilderfactory-external-general-entities-true-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/documentbuilderfactory-external-parameter-entities-true-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/drivermanager-hardcoded-secret-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/ecb-cipher-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/hardcoded-connection-password-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/hardcoded-secret-in-credentials-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/java-jwt-hardcoded-secret-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/jedis-jedisclientconfig-hardcoded-password-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/jedis-jedisfactory-hardcoded-password-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/missing-httponly-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/missing-secure-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/no-null-cipher-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/passwordauthentication-hardcoded-password-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/rsa-no-padding-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/simple-command-injection-direct-input-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/system-setproperty-hardcoded-secret-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/unencrypted-socket-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/use-of-aes-ecb-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/use-of-blowfish-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/use-of-default-aes-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/use-of-md5-digest-utils-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/use-of-md5-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/use-of-rc2-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/use-of-rc4-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/use-of-sha1-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/java/security/weak-ssl-context-java.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/javascript/security/detect-angular-sce-disabled-javascript.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/javascript/security/express-jwt-hardcoded-secret-javascript.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/javascript/security/express-session-hardcoded-secret-javascript.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/javascript/security/jwt-simple-noverify-javascript.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/javascript/security/node-rsa-weak-key-javascript.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/javascript/security/node-sequelize-empty-password-argument-javascript.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/javascript/security/node-sequelize-hardcoded-secret-argument-javascript.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/kotlin/security/des-is-deprecated-kotlin.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/kotlin/security/desede-is-deprecated-kotlin.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/kotlin/security/jwt-hardcode-kotlin.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/kotlin/security/rsa-no-padding-kotlin.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/kotlin/security/system-setproperty-hardcoded-secret-kotlin.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/php/security/openssl-cbc-static-iv-php.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/php/security/search-active-debug-php.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/avoid-mktemp-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/avoid_app_run_with_bad_host-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/debug-enabled-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/hashids-with-django-secret-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/hashids-with-flask-secret-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/insecure-cipher-algorithm-rc4-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/jwt-python-hardcoded-secret-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/openai-hardcoded-secret-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-cassandra-empty-password-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-cassandra-hardcoded-secret-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-couchbase-empty-password-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-couchbase-hardcoded-secret-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-elasticsearch-hardcoded-bearer-auth-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-ldap3-empty-password-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-ldap3-hardcoded-secret-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-mariadb-empty-password-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-mariadb-hardcoded-secret-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-mysql-empty-password-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-mysql-hardcoded-secret-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-mysqlclient-empty-password-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-mysqlclient-hardcoded-secret-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-neo4j-empty-password-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-neo4j-hardcoded-secret-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-peewee-mysql-empty-password-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-peewee-mysql-hardcoded-secret-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-peewee-pg-empty-password-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-peewee-pg-hardcoded-secret-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-pg8000-empty-password-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-pg8000-hardcoded-secret-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-psycopg2-empty-password-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-psycopg2-hardcoded-secret-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-pyjwt-hardcoded-secret-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-pymongo-empty-password-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-pymongo-hardcoded-secret-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-pymssql-empty-password-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-pymssql-hardcoded-secret-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-pymysql-empty-password-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-pymysql-hardcoded-secret-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-redis-empty-password-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-redis-hardcoded-secret-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-requests-empty-password-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-requests-hardcoded-secret-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-requests-oauth-hardcoded-secret-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-tormysql-empty-password-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-tormysql-hardcoded-secret-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-urllib3-hardcoded-secret-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-webrepl-empty-password-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/python/security/python-webrepl-hardcoded-secret-python.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/force-ssl-false-ruby.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/hardcoded-http-auth-in-controller-ruby.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/hardcoded-secret-rsa-passphrase-ruby.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/insufficient-rsa-key-size-ruby.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-aws-sdk-hardcoded-secret-ruby.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-cassandra-empty-password-ruby.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-cassandra-hardcoded-secret-ruby.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-excon-hardcoded-secret-ruby.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-faraday-hardcoded-secret-ruby.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-mongo-empty-password-ruby.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-mongo-hardcoded-secret-ruby.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-mysql2-empty-password-ruby.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-mysql2-hardcoded-secret-ruby.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-octokit-hardcoded-secret-ruby.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-pg-empty-password-ruby.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-pg-hardcoded-secret-ruby.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-redis-empty-password-ruby.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/ruby/security/ruby-redis-hardcoded-secret-ruby.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/rust/security/empty-password-rust.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/rust/security/hardcoded-password-rust.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/rust/security/postgres-empty-password-rust.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/rust/security/reqwest-accept-invalid-rust.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/rust/security/secrets-reqwest-hardcoded-auth-rust.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/rust/security/ssl-verify-none-rust.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/rust/security/tokio-postgres-empty-password-rust.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/rust/security/tokio-postgres-hardcoded-password-rust.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/scala/security/jwt-scala-hardcode-scala.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/scala/security/scala-jwt-hardcoded-secret-scala.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/swift/security/aes-hardcoded-secret-swift.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/swift/security/blowfish-hardcoded-secret-swift.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/swift/security/chacha20-hardcoded-secret-swift.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/swift/security/insecure-biometrics-swift.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/swift/security/rabbit-hardcoded-secret-swift.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/typescript/security/detect-angular-sce-disabled-typescript.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/typescript/security/express-session-hardcoded-secret-typescript.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/typescript/security/jwt-simple-noverify-typescript.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/typescript/security/node-rsa-weak-key-typescript.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/typescript/security/node-sequelize-empty-password-argument-typescript.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/coderabbit/rules/typescript/security/node-sequelize-hardcoded-secret-argument-typescript.yml +2 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/rule-schema.json +1 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/c-no-malloc-free.yml +13 -12
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/cpp-no-malloc-free.yml +11 -10
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/cpp-no-printf.yml +10 -9
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/go-defer-func-call-antipattern.yml +14 -13
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/go-no-fmt-println.yml +14 -13
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/go-no-panic-in-lib.yml +20 -19
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/go-no-underscore-func-name.yml +14 -13
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/go-prefer-errors-is.yml +14 -13
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/go-prefer-string-builder.yml +19 -18
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/go-test-functions.yml +14 -13
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/hyphenated-svg-attribute.yml +10 -9
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/kotlin-no-lateinit.yml +12 -11
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/kotlin-no-nullable-boolean.yml +11 -10
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/kotlin-no-println.yml +15 -14
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/kotlin-no-unnecessary-let.yml +10 -9
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/kotlin-no-unsafe-cast.yml +10 -9
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/kotlin-no-var.yml +11 -10
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/kotlin-prefer-data-class.yml +10 -9
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/kotlin-prefer-is-empty.yml +10 -9
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/no-aws-access-key-literal.yml +1 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/no-compile-call.yml +13 -12
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/no-flask-secret-key-literal.yml +1 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/no-hardcoded-password.yml +1 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/no-marshal-load.yml +12 -11
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/no-python-sql-string-concat.yml +12 -11
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/no-requests-verify-false.yml +13 -12
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/no-secret-in-env-var-name.yml +1 -1
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/python-optional-type.yml +9 -8
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/reducible-list-comprehension.yml +8 -7
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/ruby-detect-path-traversal.yml +14 -13
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/ruby-symbol-to-proc-candidate.yml +8 -7
- package/node_modules/pi-lens/rules/ast-grep-rules/rules/rust-no-chars-enumerate.yml +9 -8
- package/node_modules/pi-lens/rules/ast-grep-rules/rules-disabled/gorm-unbounded-preload.yml +7 -6
- package/node_modules/pi-lens/rules/ast-grep-rules/rules-disabled/shadow-err-variable.yml +6 -5
- package/node_modules/pi-lens/scripts/analyze-pi-lens-logs.mjs +262 -3
- package/node_modules/pi-lens/scripts/lib/latency-log-phases.mjs +125 -0
- package/package.json +8 -8
- package/node_modules/@narumitw/pi-btw/dist/chunks/main-tree-picker-WHRN26NJ.ts.map +0 -7
- package/node_modules/pi-lens/dist/chunk-3QWVOBZJ.js +0 -73
- package/node_modules/pi-lens/dist/chunk-7WJ55KBN.js +0 -162
- package/node_modules/pi-lens/dist/chunk-BDR5MEZY.js +0 -25
- package/node_modules/pi-lens/dist/chunk-CKEQFGLT.js +0 -32
- package/node_modules/pi-lens/dist/chunk-DBS736MA.js +0 -57
- package/node_modules/pi-lens/dist/chunk-I74RQGKA.js +0 -88
- package/node_modules/pi-lens/dist/chunk-IK4YS3KC.js +0 -25
- package/node_modules/pi-lens/dist/chunk-JKOZ2Z4U.js +0 -20
- package/node_modules/pi-lens/dist/chunk-TQHOKMVZ.js +0 -28
- package/node_modules/pi-lens/dist/chunk-VS2L7QDI.js +0 -25
- package/node_modules/pi-lens/dist/chunk-WAA63ZJV.js +0 -140
- package/node_modules/pi-lens/dist/chunk-ZPFLHB3R.js +0 -28
|
@@ -2,51 +2,35 @@ import { createRequire as __pilensCreateRequire } from "node:module"; const requ
|
|
|
2
2
|
import {
|
|
3
3
|
getLazyInstallAttempt,
|
|
4
4
|
tryLazyInstall
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-6EXGCXM5.js";
|
|
6
6
|
import {
|
|
7
7
|
computeImpactCascade
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-JRSS6KM4.js";
|
|
9
9
|
import {
|
|
10
10
|
goClient
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-MOEWCPMC.js";
|
|
12
12
|
import {
|
|
13
13
|
isTrivyEnabled,
|
|
14
14
|
resolveSeverityFloor
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-HYR25MV3.js";
|
|
16
16
|
import {
|
|
17
|
-
IN_FLIGHT_REASON,
|
|
18
|
-
NO_ANALYZER_REASON,
|
|
19
|
-
checkedVerdict,
|
|
20
|
-
emptyDispatchResult,
|
|
21
17
|
faultIfCutShort,
|
|
22
|
-
faultResult,
|
|
23
|
-
faultSkip,
|
|
24
|
-
findingsResult,
|
|
25
18
|
finishParsedRun,
|
|
26
19
|
formatToolFailure,
|
|
27
|
-
isNotApplicableSkipReason,
|
|
28
|
-
isRunnerClaimSource,
|
|
29
|
-
isRunnerSkipReason,
|
|
30
|
-
noPrimaryCheckerReason,
|
|
31
20
|
parseToolRun,
|
|
32
21
|
processCutShort,
|
|
33
|
-
reachedNoVerdict,
|
|
34
22
|
skipUnlessToolRan,
|
|
35
|
-
spanOverlapsModifiedRanges,
|
|
36
23
|
spawnFailedWithNoOutput,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
} from "./chunk-4ITEFRDH.js";
|
|
24
|
+
spawnTimedOut
|
|
25
|
+
} from "./chunk-FDLGJFAE.js";
|
|
40
26
|
import {
|
|
41
27
|
rustClient
|
|
42
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-2HWVG3IM.js";
|
|
43
29
|
import {
|
|
44
30
|
coveringLaneAvailable,
|
|
45
31
|
createAvailabilityChecker,
|
|
46
32
|
createCwdCachedProbe,
|
|
47
|
-
getDispatchAvailabilityGeneration,
|
|
48
33
|
lspPrimaryCoversFile,
|
|
49
|
-
recordAvailabilityProbeOverrun,
|
|
50
34
|
resolveAdoptedRootCommand,
|
|
51
35
|
resolveAvailableOrInstall,
|
|
52
36
|
resolveCommandArgsWithInstallFallback,
|
|
@@ -55,10 +39,11 @@ import {
|
|
|
55
39
|
resolveToolCommand,
|
|
56
40
|
resolveToolCommandWithInstallFallback,
|
|
57
41
|
resolveVendorToolCommand
|
|
58
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-BEIPWPVR.js";
|
|
59
43
|
import {
|
|
60
44
|
biomeConfigArgs,
|
|
61
45
|
findCompiledClassesDir,
|
|
46
|
+
findToolConfig,
|
|
62
47
|
getAutofixCapability,
|
|
63
48
|
getJstsLintPolicyForCwd,
|
|
64
49
|
getLinterPolicyForCwd,
|
|
@@ -70,25 +55,27 @@ import {
|
|
|
70
55
|
hasPhpstanConfig,
|
|
71
56
|
hasSqlfluffConfig,
|
|
72
57
|
hasStylelintConfig,
|
|
58
|
+
hasToolConfig,
|
|
73
59
|
hasVitePlusConfig,
|
|
74
60
|
hasYamllintConfig,
|
|
75
61
|
markdownlintConfigArgs,
|
|
62
|
+
readFileContent,
|
|
76
63
|
ruffConfigArgs
|
|
77
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-D7OEGXDX.js";
|
|
78
65
|
import {
|
|
79
66
|
importFactProvider
|
|
80
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-3MHY4BQY.js";
|
|
81
68
|
import {
|
|
82
69
|
functionFactProvider
|
|
83
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-VU2PRGRI.js";
|
|
84
71
|
import {
|
|
85
72
|
extractFactsFromTree
|
|
86
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-OHEUOWYT.js";
|
|
87
74
|
import {
|
|
88
75
|
buildOrUpdateGraph,
|
|
89
76
|
clearReviewGraphWorkspaceCache,
|
|
90
77
|
fileContentProvider
|
|
91
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-QY6J2FTK.js";
|
|
92
79
|
import {
|
|
93
80
|
MAX_BLOCKING_RULE_COMPLEXITY,
|
|
94
81
|
PRIMARY_UNAVAILABLE_CAUSE,
|
|
@@ -121,14 +108,17 @@ import {
|
|
|
121
108
|
retagAuxiliaryDiagnostics,
|
|
122
109
|
touchCompletedConfirmationPolicy,
|
|
123
110
|
touchCoverageGap,
|
|
111
|
+
trustedCitedOwnerContent,
|
|
124
112
|
tryWarmAttachedCodeActions,
|
|
125
113
|
tryWarmAttachedDiagnostics,
|
|
126
114
|
warmAnswerBinding
|
|
127
|
-
} from "./chunk-
|
|
115
|
+
} from "./chunk-DZSQXG66.js";
|
|
128
116
|
import {
|
|
129
117
|
ANY_POSITION,
|
|
118
|
+
displayedMessage,
|
|
119
|
+
hashText,
|
|
130
120
|
retainRecordedFindings
|
|
131
|
-
} from "./chunk-
|
|
121
|
+
} from "./chunk-DFAY7JUN.js";
|
|
132
122
|
import {
|
|
133
123
|
mapWithConcurrency
|
|
134
124
|
} from "./chunk-XIMYZ3JA.js";
|
|
@@ -144,7 +134,7 @@ import {
|
|
|
144
134
|
resolveSessionConfigRoot,
|
|
145
135
|
resolveShellFileDialect,
|
|
146
136
|
runnerIdentityPopulated
|
|
147
|
-
} from "./chunk-
|
|
137
|
+
} from "./chunk-Z6WTLVUL.js";
|
|
148
138
|
import {
|
|
149
139
|
augmentPythonEnvironment,
|
|
150
140
|
describePythonCompileWithheld,
|
|
@@ -153,25 +143,25 @@ import {
|
|
|
153
143
|
emitBounded,
|
|
154
144
|
partitionOutrankedPythonCompileVerdicts,
|
|
155
145
|
recordPythonCompileVerdictDrop
|
|
156
|
-
} from "./chunk-
|
|
146
|
+
} from "./chunk-5EEWCJG7.js";
|
|
157
147
|
import {
|
|
158
148
|
scannerReportParentDir
|
|
159
|
-
} from "./chunk-
|
|
149
|
+
} from "./chunk-QJ4T73J5.js";
|
|
160
150
|
import {
|
|
161
151
|
loadProjectSnapshot,
|
|
162
152
|
readJsonCache,
|
|
163
153
|
readJsonCacheAsync
|
|
164
|
-
} from "./chunk-
|
|
154
|
+
} from "./chunk-YLW26OHX.js";
|
|
165
155
|
import {
|
|
166
156
|
RUNTIME_CONFIG,
|
|
167
157
|
exceedsLspSyncLimits,
|
|
168
158
|
getRunnerTimeoutFloorMs,
|
|
169
159
|
loadAstGrepNapi
|
|
170
|
-
} from "./chunk-
|
|
160
|
+
} from "./chunk-NCDH2JB7.js";
|
|
171
161
|
import {
|
|
172
162
|
buildModuleGraph,
|
|
173
163
|
clearModuleGraphCache
|
|
174
|
-
} from "./chunk-
|
|
164
|
+
} from "./chunk-HYDJUVOE.js";
|
|
175
165
|
import {
|
|
176
166
|
BUNDLED_QUERIES_ROOT,
|
|
177
167
|
classifyTreeSitterWasmError,
|
|
@@ -191,13 +181,10 @@ import {
|
|
|
191
181
|
ruleFilesForLanguage,
|
|
192
182
|
ruleSourceLanguages,
|
|
193
183
|
walk
|
|
194
|
-
} from "./chunk-
|
|
184
|
+
} from "./chunk-6GWCYEP7.js";
|
|
195
185
|
import {
|
|
196
186
|
resolvePackagePath
|
|
197
|
-
} from "./chunk-
|
|
198
|
-
import {
|
|
199
|
-
isTypeScriptFile
|
|
200
|
-
} from "./chunk-OTSTS7L2.js";
|
|
187
|
+
} from "./chunk-E3PNZDPH.js";
|
|
201
188
|
import {
|
|
202
189
|
stripAnsi
|
|
203
190
|
} from "./chunk-6HWVI6MI.js";
|
|
@@ -209,36 +196,54 @@ import {
|
|
|
209
196
|
scheduleWordIndexPersist,
|
|
210
197
|
setWordIndexPublishedListener,
|
|
211
198
|
updateWordIndexDocumentForEdit
|
|
212
|
-
} from "./chunk-
|
|
199
|
+
} from "./chunk-6JLNZ6DP.js";
|
|
200
|
+
import {
|
|
201
|
+
isTypeScriptFile
|
|
202
|
+
} from "./chunk-AYDE7RFV.js";
|
|
203
|
+
import {
|
|
204
|
+
IN_FLIGHT_REASON,
|
|
205
|
+
NO_ANALYZER_REASON,
|
|
206
|
+
NO_SERVER_REASON,
|
|
207
|
+
checkedVerdict,
|
|
208
|
+
emptyDispatchResult,
|
|
209
|
+
faultResult,
|
|
210
|
+
faultSkip,
|
|
211
|
+
findingsResult,
|
|
212
|
+
isNotApplicableSkipReason,
|
|
213
|
+
isRunnerClaimSource,
|
|
214
|
+
isRunnerSkipReason,
|
|
215
|
+
noPrimaryCheckerReason,
|
|
216
|
+
reachedNoVerdict,
|
|
217
|
+
recordedUnchecked,
|
|
218
|
+
semanticFor,
|
|
219
|
+
spanOverlapsModifiedRanges,
|
|
220
|
+
unchecked
|
|
221
|
+
} from "./chunk-W6VLB6LL.js";
|
|
213
222
|
import {
|
|
214
223
|
WARM_CODE_ACTION_LOOKUP_LIMIT,
|
|
215
224
|
contentHash
|
|
216
|
-
} from "./chunk-
|
|
225
|
+
} from "./chunk-HWMNTQBJ.js";
|
|
217
226
|
import {
|
|
218
227
|
resolveRunnerPath,
|
|
219
228
|
toRunnerDisplayPath
|
|
220
|
-
} from "./chunk-
|
|
221
|
-
import {
|
|
222
|
-
withBudget
|
|
223
|
-
} from "./chunk-WAA63ZJV.js";
|
|
229
|
+
} from "./chunk-ZRQMENT4.js";
|
|
224
230
|
import {
|
|
225
231
|
findCommandOnPath,
|
|
226
232
|
isSpawnableCommand
|
|
227
|
-
} from "./chunk-
|
|
233
|
+
} from "./chunk-NRVWLTOY.js";
|
|
228
234
|
import {
|
|
229
235
|
logRunnerAdvisoryOnce,
|
|
230
236
|
resolveRunnerCwd,
|
|
231
237
|
resolveRunnerCwdWithReason
|
|
232
|
-
} from "./chunk-
|
|
238
|
+
} from "./chunk-YLHJWAQS.js";
|
|
233
239
|
import {
|
|
234
240
|
findLocalBinUpwards,
|
|
235
241
|
localBinPath
|
|
236
|
-
} from "./chunk-
|
|
242
|
+
} from "./chunk-OVPR3GQ6.js";
|
|
237
243
|
import {
|
|
238
|
-
createAvailabilityProbeFlight,
|
|
239
244
|
getIsolatedNpxSpawnOptions,
|
|
240
245
|
probeToolAsync
|
|
241
|
-
} from "./chunk-
|
|
246
|
+
} from "./chunk-3QMLB4TI.js";
|
|
242
247
|
import {
|
|
243
248
|
classifyProbeFailure,
|
|
244
249
|
createAvailabilityLatch,
|
|
@@ -246,14 +251,13 @@ import {
|
|
|
246
251
|
describeUnavailability,
|
|
247
252
|
isLatchingOutcome,
|
|
248
253
|
logAvailabilityDecision,
|
|
249
|
-
startHostStallSampler
|
|
250
|
-
|
|
251
|
-
} from "./chunk-NPNFGYLV.js";
|
|
254
|
+
startHostStallSampler
|
|
255
|
+
} from "./chunk-AVBEPUCD.js";
|
|
252
256
|
import {
|
|
253
257
|
getLspCapableKinds,
|
|
254
258
|
getPrimaryDispatchGroup,
|
|
255
259
|
resolveLanguageRootForFile
|
|
256
|
-
} from "./chunk-
|
|
260
|
+
} from "./chunk-75TVYCQW.js";
|
|
257
261
|
import {
|
|
258
262
|
getGlobalPiLensDir,
|
|
259
263
|
getProjectDataDir,
|
|
@@ -261,17 +265,16 @@ import {
|
|
|
261
265
|
isInSpawnTimeoutCooldown,
|
|
262
266
|
isTestFile,
|
|
263
267
|
loadPiLensGlobalConfig,
|
|
264
|
-
noteSpawnTimeout,
|
|
265
268
|
realIsPidAlive,
|
|
266
269
|
resolvePiLensFlag,
|
|
267
270
|
safeSpawnAsync
|
|
268
|
-
} from "./chunk-
|
|
271
|
+
} from "./chunk-ET3DSSFZ.js";
|
|
269
272
|
import {
|
|
270
273
|
DOTNET_CSHARP_PROJECT_MARKERS,
|
|
271
274
|
DOTNET_CSHARP_SOLUTION_MARKERS,
|
|
272
275
|
detectFileKind,
|
|
273
276
|
isJstsFactFile
|
|
274
|
-
} from "./chunk-
|
|
277
|
+
} from "./chunk-SRXYSLMW.js";
|
|
275
278
|
import {
|
|
276
279
|
PathKeyedMap,
|
|
277
280
|
boundedKeyLabel,
|
|
@@ -282,45 +285,46 @@ import {
|
|
|
282
285
|
migrationSubject,
|
|
283
286
|
reportPiLensConfigRecords,
|
|
284
287
|
resolveOnePiLensConfigDocument,
|
|
285
|
-
resolvePiLensConfig
|
|
286
|
-
|
|
288
|
+
resolvePiLensConfig,
|
|
289
|
+
spawnCooldownScope
|
|
290
|
+
} from "./chunk-6EIV3H7O.js";
|
|
287
291
|
import {
|
|
288
|
-
findNearestDirWithAnyBasename,
|
|
289
292
|
findNearestDirWithMarker,
|
|
290
293
|
getPiLensGlobalConfigPath
|
|
291
|
-
} from "./chunk-
|
|
294
|
+
} from "./chunk-3R3Z54J7.js";
|
|
292
295
|
import {
|
|
293
296
|
getProjectTrustState,
|
|
294
297
|
killedForOutputCap,
|
|
295
298
|
projectTrustDenialReason,
|
|
296
299
|
truncatedByOutputCap,
|
|
300
|
+
withBudget,
|
|
297
301
|
writeFileAtomic
|
|
298
|
-
} from "./chunk-
|
|
302
|
+
} from "./chunk-HRQTYU2T.js";
|
|
299
303
|
import {
|
|
300
304
|
createSubsystemLogger,
|
|
301
305
|
incrementDegradationCount,
|
|
302
306
|
logExtension,
|
|
303
307
|
recordDegradationOnce
|
|
304
|
-
} from "./chunk-
|
|
308
|
+
} from "./chunk-AGEQRJ5A.js";
|
|
305
309
|
import {
|
|
306
310
|
createNdjsonLogger,
|
|
307
311
|
getGlobalPiLensLogDir,
|
|
308
312
|
getMaxLogSizeMB,
|
|
309
313
|
isTestMode,
|
|
310
314
|
logLatency,
|
|
315
|
+
nonNegativeIntEnv,
|
|
311
316
|
phaseFinished,
|
|
312
317
|
phaseStarted
|
|
313
|
-
} from "./chunk-
|
|
318
|
+
} from "./chunk-K2GV34T2.js";
|
|
314
319
|
import {
|
|
315
320
|
FactStore,
|
|
316
321
|
setFactStoreEvictionReporter
|
|
317
|
-
} from "./chunk-
|
|
322
|
+
} from "./chunk-O6LCSHHI.js";
|
|
318
323
|
import {
|
|
319
324
|
BoundedFifoMap,
|
|
320
325
|
BoundedLruCache,
|
|
321
326
|
direntsHaveMarkerGlobMatch,
|
|
322
327
|
findLocalToolConfig,
|
|
323
|
-
findNearestContaining,
|
|
324
328
|
isAbsoluteFilePath,
|
|
325
329
|
isUnderDir,
|
|
326
330
|
isWindowsPath,
|
|
@@ -333,15 +337,16 @@ import {
|
|
|
333
337
|
relativeInside,
|
|
334
338
|
toPosix,
|
|
335
339
|
toProjectRelativePath
|
|
336
|
-
} from "./chunk-
|
|
340
|
+
} from "./chunk-WLD6BGON.js";
|
|
337
341
|
|
|
338
342
|
// dist/clients/mcp/analyze.js
|
|
339
|
-
import * as
|
|
343
|
+
import * as fs15 from "node:fs";
|
|
340
344
|
import * as path50 from "node:path";
|
|
341
345
|
|
|
342
346
|
// dist/clients/cache-manager.js
|
|
343
347
|
import * as fs from "node:fs";
|
|
344
348
|
import * as path from "node:path";
|
|
349
|
+
var JSCPD_RESCAN_OTHER_EXTENSIONS = /\.(py|go|rs|rb|java|cs|php|cpp|c|h|hpp|swift|kt)$/;
|
|
345
350
|
var DEFAULT_MAX_AGE_MS = 30 * 60 * 1e3;
|
|
346
351
|
var DEFAULT_TURN_STATE = {
|
|
347
352
|
files: {},
|
|
@@ -882,7 +887,7 @@ var CacheManager = class {
|
|
|
882
887
|
*/
|
|
883
888
|
getFilesForJscpd(cwd, sessionId) {
|
|
884
889
|
const state = this.readTurnState(cwd, sessionId);
|
|
885
|
-
return Object.keys(state.files).filter((f) =>
|
|
890
|
+
return Object.keys(state.files).filter((f) => isJstsFactFile(f) || JSCPD_RESCAN_OTHER_EXTENSIONS.test(f));
|
|
886
891
|
}
|
|
887
892
|
/**
|
|
888
893
|
* Get files that need madge re-scan (imports changed).
|
|
@@ -977,7 +982,7 @@ function createDiagnosticLogger() {
|
|
|
977
982
|
}
|
|
978
983
|
|
|
979
984
|
// dist/clients/dispatch/dispatcher.js
|
|
980
|
-
import * as
|
|
985
|
+
import * as fs3 from "node:fs";
|
|
981
986
|
import * as path4 from "node:path";
|
|
982
987
|
|
|
983
988
|
// dist/clients/line-alignment.js
|
|
@@ -1090,6 +1095,73 @@ function normalizeRuleId(ruleId) {
|
|
|
1090
1095
|
}
|
|
1091
1096
|
return normalized;
|
|
1092
1097
|
}
|
|
1098
|
+
var FINDING_CLASS_RULES = /* @__PURE__ */ new Map([
|
|
1099
|
+
[
|
|
1100
|
+
"eslint",
|
|
1101
|
+
/* @__PURE__ */ new Map([
|
|
1102
|
+
["no-unused-vars", "unused-variable"],
|
|
1103
|
+
["@typescript-eslint/no-unused-vars", "unused-variable"],
|
|
1104
|
+
["no-undef", "undefined-name"]
|
|
1105
|
+
])
|
|
1106
|
+
],
|
|
1107
|
+
[
|
|
1108
|
+
"oxlint",
|
|
1109
|
+
/* @__PURE__ */ new Map([
|
|
1110
|
+
["no-unused-vars", "unused-variable"],
|
|
1111
|
+
["no-undef", "undefined-name"]
|
|
1112
|
+
])
|
|
1113
|
+
],
|
|
1114
|
+
[
|
|
1115
|
+
"biome",
|
|
1116
|
+
/* @__PURE__ */ new Map([
|
|
1117
|
+
["lint/correctness/noUnusedVariables", "unused-variable"],
|
|
1118
|
+
["lint/correctness/noUnusedImports", "unused-import"],
|
|
1119
|
+
["lint/correctness/noUndeclaredVariables", "undefined-name"]
|
|
1120
|
+
])
|
|
1121
|
+
],
|
|
1122
|
+
[
|
|
1123
|
+
"ruff",
|
|
1124
|
+
/* @__PURE__ */ new Map([
|
|
1125
|
+
["F841", "unused-variable"],
|
|
1126
|
+
["F401", "unused-import"],
|
|
1127
|
+
["F821", "undefined-name"]
|
|
1128
|
+
])
|
|
1129
|
+
],
|
|
1130
|
+
[
|
|
1131
|
+
"pyright",
|
|
1132
|
+
/* @__PURE__ */ new Map([
|
|
1133
|
+
["reportUnusedVariable", "unused-variable"],
|
|
1134
|
+
["reportUnusedImport", "unused-import"],
|
|
1135
|
+
["reportUndefinedVariable", "undefined-name"]
|
|
1136
|
+
])
|
|
1137
|
+
],
|
|
1138
|
+
["mypy", /* @__PURE__ */ new Map([["name-defined", "undefined-name"]])]
|
|
1139
|
+
]);
|
|
1140
|
+
var PYRIGHT_LSP_SOURCE = /^(?:Pyright|basedpyright):(.+)$/;
|
|
1141
|
+
function findingClassOf(d) {
|
|
1142
|
+
const rule = d.rule;
|
|
1143
|
+
if (!rule)
|
|
1144
|
+
return void 0;
|
|
1145
|
+
const tool = d.tool;
|
|
1146
|
+
if (tool === "lsp") {
|
|
1147
|
+
const code = PYRIGHT_LSP_SOURCE.exec(rule)?.[1];
|
|
1148
|
+
return code === void 0 ? void 0 : FINDING_CLASS_RULES.get("pyright")?.get(code);
|
|
1149
|
+
}
|
|
1150
|
+
return FINDING_CLASS_RULES.get(tool)?.get(rule);
|
|
1151
|
+
}
|
|
1152
|
+
function findingClassKey(d) {
|
|
1153
|
+
const cls = findingClassOf(d);
|
|
1154
|
+
return cls === void 0 ? void 0 : `${d.filePath}:${d.line ?? 1}:${d.column ?? 1}:class:${cls}`;
|
|
1155
|
+
}
|
|
1156
|
+
function withClassSeverity(d) {
|
|
1157
|
+
if (d.runnerFault === true)
|
|
1158
|
+
return d;
|
|
1159
|
+
if (d.semantic !== "warning" && d.semantic !== "none")
|
|
1160
|
+
return d;
|
|
1161
|
+
if (findingClassOf(d) === void 0)
|
|
1162
|
+
return d;
|
|
1163
|
+
return { ...d, severity: "error", semantic: "blocking" };
|
|
1164
|
+
}
|
|
1093
1165
|
|
|
1094
1166
|
// dist/clients/dispatch/inline-suppressions.js
|
|
1095
1167
|
var SUPPRESS_RE = /(?:\/\/|#)\s*pi-lens-ignore:\s*(.+)/;
|
|
@@ -1143,16 +1215,6 @@ function applyInlineSuppressions(diagnostics, content) {
|
|
|
1143
1215
|
});
|
|
1144
1216
|
}
|
|
1145
1217
|
|
|
1146
|
-
// dist/clients/dispatch/runners/utils.js
|
|
1147
|
-
import * as fs3 from "node:fs";
|
|
1148
|
-
function readFileContent(filePath) {
|
|
1149
|
-
try {
|
|
1150
|
-
return fs3.readFileSync(filePath, "utf-8");
|
|
1151
|
-
} catch {
|
|
1152
|
-
return void 0;
|
|
1153
|
-
}
|
|
1154
|
-
}
|
|
1155
|
-
|
|
1156
1218
|
// dist/clients/dispatch/rule-policy.js
|
|
1157
1219
|
import * as nodePath from "node:path";
|
|
1158
1220
|
function resolveDispatchPolicyConfig(root) {
|
|
@@ -1375,7 +1437,7 @@ function convertLspDiagnostics(diags, filePath, options = {}) {
|
|
|
1375
1437
|
4: "hint"
|
|
1376
1438
|
};
|
|
1377
1439
|
const severity = severityMap[d.severity] ?? "info";
|
|
1378
|
-
const semantic = d.severity === 1
|
|
1440
|
+
const semantic = d.severity === 1 || d.severity === 2 || d.severity === 3 ? semanticFor(severity) : "none";
|
|
1379
1441
|
const code = String(d.code ?? "unknown");
|
|
1380
1442
|
const source = d.source ?? tool;
|
|
1381
1443
|
const hasSuggestion = options.fixSuggestionByIndex?.has(idx) ?? false;
|
|
@@ -1450,7 +1512,7 @@ function applyFindingPolicyByOwner(diagnostics, options) {
|
|
|
1450
1512
|
};
|
|
1451
1513
|
collect(applyFindingPolicy(own, options));
|
|
1452
1514
|
for (const [owner, group] of byOwner) {
|
|
1453
|
-
const content =
|
|
1515
|
+
const content = trustedCitedOwnerContent(owner, options.cwd, () => readFileContent(owner));
|
|
1454
1516
|
if (content === void 0) {
|
|
1455
1517
|
collect({
|
|
1456
1518
|
kept: applyRulePolicy(group, options.policyMap, {
|
|
@@ -1957,8 +2019,52 @@ function observeRunnerLatency(options) {
|
|
|
1957
2019
|
slowRunners.delete(runnerKey);
|
|
1958
2020
|
return "inline";
|
|
1959
2021
|
}
|
|
2022
|
+
var flights = /* @__PURE__ */ new Map();
|
|
2023
|
+
var DROPPED_BY_RESET = {
|
|
2024
|
+
status: "skipped",
|
|
2025
|
+
diagnostics: [],
|
|
2026
|
+
semantic: "none"
|
|
2027
|
+
};
|
|
2028
|
+
function runCollectLater(options) {
|
|
2029
|
+
const flightKey = key(options.projectRoot, options.runnerId);
|
|
2030
|
+
const flight = flights.get(flightKey);
|
|
2031
|
+
if (flight) {
|
|
2032
|
+
const fileKey = normalizeMapKey(options.filePath);
|
|
2033
|
+
const queued = flight.queued.get(fileKey);
|
|
2034
|
+
if (queued) {
|
|
2035
|
+
queued.start = options.start;
|
|
2036
|
+
return { promise: queued.promise, coalesced: true };
|
|
2037
|
+
}
|
|
2038
|
+
const slot = {
|
|
2039
|
+
start: options.start,
|
|
2040
|
+
promise: Promise.allSettled([flight.tail]).then(() => startQueued(flightKey, flight, fileKey, slot))
|
|
2041
|
+
};
|
|
2042
|
+
flight.queued.set(fileKey, slot);
|
|
2043
|
+
chain(flightKey, flight, slot.promise);
|
|
2044
|
+
return { promise: slot.promise, coalesced: true };
|
|
2045
|
+
}
|
|
2046
|
+
const promise = options.start();
|
|
2047
|
+
const started = { tail: promise, queued: /* @__PURE__ */ new Map() };
|
|
2048
|
+
flights.set(flightKey, started);
|
|
2049
|
+
chain(flightKey, started, promise);
|
|
2050
|
+
return { promise, coalesced: false };
|
|
2051
|
+
}
|
|
2052
|
+
function startQueued(flightKey, flight, fileKey, slot) {
|
|
2053
|
+
if (flights.get(flightKey) !== flight)
|
|
2054
|
+
return DROPPED_BY_RESET;
|
|
2055
|
+
flight.queued.delete(fileKey);
|
|
2056
|
+
return slot.start();
|
|
2057
|
+
}
|
|
2058
|
+
function chain(flightKey, flight, run) {
|
|
2059
|
+
flight.tail = run;
|
|
2060
|
+
void Promise.allSettled([run]).then(() => {
|
|
2061
|
+
if (flight.tail === run && flights.get(flightKey) === flight)
|
|
2062
|
+
flights.delete(flightKey);
|
|
2063
|
+
});
|
|
2064
|
+
}
|
|
1960
2065
|
function resetObservedRunnerLatency() {
|
|
1961
2066
|
slowRunners.clear();
|
|
2067
|
+
flights.clear();
|
|
1962
2068
|
}
|
|
1963
2069
|
|
|
1964
2070
|
// dist/clients/dispatch/pending-runner-findings.js
|
|
@@ -2088,6 +2194,7 @@ function pendingRunnerFindingsSize() {
|
|
|
2088
2194
|
|
|
2089
2195
|
// dist/clients/dispatch/adopted-root-runners.js
|
|
2090
2196
|
var ADOPTED_ROOT_RUNNER_ALLOWLIST = [
|
|
2197
|
+
"lsp",
|
|
2091
2198
|
"fish-indent",
|
|
2092
2199
|
"php-lint"
|
|
2093
2200
|
];
|
|
@@ -2333,7 +2440,6 @@ ${emoji} Auto-fixed ${diagnostics.length} issue(s):
|
|
|
2333
2440
|
}
|
|
2334
2441
|
|
|
2335
2442
|
// dist/clients/dispatch/dispatcher.js
|
|
2336
|
-
var dispatcherProbeFlights = createAvailabilityProbeFlight({ generation: () => getDispatchAvailabilityGeneration() });
|
|
2337
2443
|
var RunnerRegistry = class {
|
|
2338
2444
|
runners = /* @__PURE__ */ new Map();
|
|
2339
2445
|
register(runner) {
|
|
@@ -2372,105 +2478,37 @@ function normalizeCacheKey(cmd) {
|
|
|
2372
2478
|
return `session.toolCache.${normalized}`;
|
|
2373
2479
|
}
|
|
2374
2480
|
var TOOL_PROBE_TIMEOUT_MS = 5e3;
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
function transientAttemptsKey(command) {
|
|
2379
|
-
return `${normalizeCacheKey(command)}.transientAttempts`;
|
|
2380
|
-
}
|
|
2381
|
-
async function checkToolAvailability(command, facts) {
|
|
2382
|
-
const key2 = normalizeCacheKey(command);
|
|
2383
|
-
const cached = facts.getSessionFact(key2);
|
|
2384
|
-
if (cached !== void 0) {
|
|
2385
|
-
return cached;
|
|
2386
|
-
}
|
|
2387
|
-
const retryAt = facts.getSessionFact(transientRetryKey(command));
|
|
2388
|
-
if (retryAt !== void 0 && Date.now() < retryAt)
|
|
2481
|
+
var commandCheckers = /* @__PURE__ */ new Map();
|
|
2482
|
+
async function checkToolAvailability(command) {
|
|
2483
|
+
if (!await isSpawnableCommand(command))
|
|
2389
2484
|
return false;
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
let hostStallMs;
|
|
2399
|
-
let probeJoined = false;
|
|
2400
|
-
try {
|
|
2401
|
-
const shared = dispatcherProbeFlights.run(`dispatcher:${key2}`, () => probeToolAsync(command, ["--version"], {
|
|
2402
|
-
timeout: TOOL_PROBE_TIMEOUT_MS
|
|
2403
|
-
}));
|
|
2404
|
-
probeJoined = shared.joined;
|
|
2405
|
-
result = await shared.promise;
|
|
2406
|
-
} finally {
|
|
2407
|
-
hostStallMs = sampler.stop();
|
|
2408
|
-
}
|
|
2409
|
-
const elapsedMs = Date.now() - startedAt;
|
|
2410
|
-
recordAvailabilityProbeOverrun(command, key2, elapsedMs, TOOL_PROBE_TIMEOUT_MS, result.failure);
|
|
2411
|
-
if (result.status === 0) {
|
|
2412
|
-
facts.setSessionFact(key2, true);
|
|
2413
|
-
facts.setSessionFact(transientRetryKey(command), 0);
|
|
2414
|
-
facts.setSessionFact(transientAttemptsKey(command), 0);
|
|
2415
|
-
logAvailabilityDecision({
|
|
2416
|
-
tool: command,
|
|
2417
|
-
verdict: "available",
|
|
2418
|
-
outcome: "success",
|
|
2419
|
-
cause: "ok",
|
|
2420
|
-
elapsedMs,
|
|
2421
|
-
latched: true,
|
|
2422
|
-
classifiedBy: probeJoined ? "joined" : "probe",
|
|
2423
|
-
hostStallMs,
|
|
2424
|
-
budgetMs: TOOL_PROBE_TIMEOUT_MS
|
|
2425
|
-
});
|
|
2426
|
-
return true;
|
|
2427
|
-
}
|
|
2428
|
-
const { outcome, cause, evidence } = classifyProbeFailure(result, {
|
|
2429
|
-
hostStallMs,
|
|
2485
|
+
const key2 = normalizeCacheKey(command);
|
|
2486
|
+
let checker = commandCheckers.get(key2);
|
|
2487
|
+
if (!checker) {
|
|
2488
|
+
checker = createAvailabilityChecker(command, "", ["--version"], {
|
|
2489
|
+
pathOnly: true,
|
|
2490
|
+
probeTimeout: TOOL_PROBE_TIMEOUT_MS,
|
|
2491
|
+
// A non-zero exit with no typed failure keeps its pre-#1476 meaning:
|
|
2492
|
+
// durable, cached for the session.
|
|
2430
2493
|
unclassifiedFailureOutcome: "missing"
|
|
2431
2494
|
});
|
|
2432
|
-
|
|
2433
|
-
if (outcome === "transient") {
|
|
2434
|
-
const attempts = (facts.getSessionFact(transientAttemptsKey(command)) ?? 0) + 1;
|
|
2435
|
-
facts.setSessionFact(transientAttemptsKey(command), attempts);
|
|
2436
|
-
retryAfterMs = transientRetryDelayMs(attempts, cause);
|
|
2437
|
-
facts.setSessionFact(transientRetryKey(command), Date.now() + retryAfterMs);
|
|
2438
|
-
} else {
|
|
2439
|
-
facts.setSessionFact(key2, false);
|
|
2440
|
-
facts.setSessionFact(transientAttemptsKey(command), 0);
|
|
2441
|
-
}
|
|
2442
|
-
logAvailabilityDecision({
|
|
2443
|
-
tool: command,
|
|
2444
|
-
verdict: "unavailable",
|
|
2445
|
-
outcome,
|
|
2446
|
-
cause,
|
|
2447
|
-
elapsedMs,
|
|
2448
|
-
latched: outcome !== "transient",
|
|
2449
|
-
hostStallMs,
|
|
2450
|
-
...retryAfterMs !== void 0 && { retryAfterMs },
|
|
2451
|
-
budgetMs: TOOL_PROBE_TIMEOUT_MS,
|
|
2452
|
-
classifiedBy: probeJoined ? "joined" : "probe",
|
|
2453
|
-
evidence
|
|
2454
|
-
});
|
|
2455
|
-
return false;
|
|
2456
|
-
} catch {
|
|
2457
|
-
facts.setSessionFact(key2, false);
|
|
2458
|
-
return false;
|
|
2495
|
+
commandCheckers.set(key2, checker);
|
|
2459
2496
|
}
|
|
2497
|
+
return checker.isAvailableAsync();
|
|
2460
2498
|
}
|
|
2461
2499
|
function readFilePrefix(filePath, maxBytes = 4096) {
|
|
2462
2500
|
let fd;
|
|
2463
2501
|
try {
|
|
2464
|
-
fd =
|
|
2502
|
+
fd = fs3.openSync(filePath, "r");
|
|
2465
2503
|
const buffer = Buffer.alloc(maxBytes);
|
|
2466
|
-
const bytesRead =
|
|
2504
|
+
const bytesRead = fs3.readSync(fd, buffer, 0, maxBytes, 0);
|
|
2467
2505
|
return buffer.subarray(0, bytesRead).toString("utf8");
|
|
2468
2506
|
} catch {
|
|
2469
2507
|
return void 0;
|
|
2470
2508
|
} finally {
|
|
2471
2509
|
if (fd !== void 0) {
|
|
2472
2510
|
try {
|
|
2473
|
-
|
|
2511
|
+
fs3.closeSync(fd);
|
|
2474
2512
|
} catch {
|
|
2475
2513
|
}
|
|
2476
2514
|
}
|
|
@@ -2521,7 +2559,7 @@ function createDispatchContext(filePath, cwd, pi, facts, blockingOnly, modifiedR
|
|
|
2521
2559
|
telemetryProvider,
|
|
2522
2560
|
toolCwdMemo: {},
|
|
2523
2561
|
async hasTool(command) {
|
|
2524
|
-
return checkToolAvailability(command
|
|
2562
|
+
return checkToolAvailability(command);
|
|
2525
2563
|
},
|
|
2526
2564
|
log(message, level) {
|
|
2527
2565
|
logExtension({
|
|
@@ -2591,6 +2629,30 @@ function dedupeOverlappingDiagnostics(diagnostics) {
|
|
|
2591
2629
|
}
|
|
2592
2630
|
return [...byKey.values()];
|
|
2593
2631
|
}
|
|
2632
|
+
function blocksAsClassMember(d) {
|
|
2633
|
+
return d.semantic !== "blocking" && withClassSeverity(d) !== d;
|
|
2634
|
+
}
|
|
2635
|
+
function mergeFindingClasses(visible, held) {
|
|
2636
|
+
const heldKeys = new Set(held.map(findingClassKey));
|
|
2637
|
+
const score = (d) => semanticRank(d.semantic) * 100 + toolPriority(d.tool, d.defectClass ?? classifyDiagnostic(d));
|
|
2638
|
+
const slotByKey = /* @__PURE__ */ new Map();
|
|
2639
|
+
const merged = [];
|
|
2640
|
+
for (const d of visible) {
|
|
2641
|
+
const key2 = findingClassKey(d);
|
|
2642
|
+
if (key2 === void 0 || heldKeys.has(key2)) {
|
|
2643
|
+
merged.push(d);
|
|
2644
|
+
continue;
|
|
2645
|
+
}
|
|
2646
|
+
const raised = withClassSeverity(d);
|
|
2647
|
+
const slot = slotByKey.get(key2);
|
|
2648
|
+
if (slot === void 0) {
|
|
2649
|
+
slotByKey.set(key2, merged.push(raised) - 1);
|
|
2650
|
+
} else if (score(raised) > score(merged[slot])) {
|
|
2651
|
+
merged[slot] = raised;
|
|
2652
|
+
}
|
|
2653
|
+
}
|
|
2654
|
+
return merged;
|
|
2655
|
+
}
|
|
2594
2656
|
function suppressLintOverlapsWithLsp(diagnostics) {
|
|
2595
2657
|
const lspBySpanClass = /* @__PURE__ */ new Set();
|
|
2596
2658
|
const lspByLine = /* @__PURE__ */ new Set();
|
|
@@ -2753,13 +2815,17 @@ function buildCoverageNotice(ctx, runnerLatencies, dedupe) {
|
|
|
2753
2815
|
return { verdict: fallbackChecked, coverage: "fallback" };
|
|
2754
2816
|
if (relevant.every((r) => r.runnerId === "lsp" && r.skipReason === "no-files-matched"))
|
|
2755
2817
|
return {
|
|
2756
|
-
verdict: unchecked(
|
|
2818
|
+
verdict: unchecked(`not analyzed (${NO_SERVER_REASON})`)
|
|
2757
2819
|
};
|
|
2758
2820
|
const cause = combinePrimaryUnavailableCauses(relevant.flatMap((r) => r.primaryUnavailableCause ?? []));
|
|
2759
2821
|
const deniedRunnerIds = relevant.filter((r) => r.skipReason === DISABLED_BY_CONFIG_SKIP_REASON).map((r) => r.runnerId);
|
|
2760
2822
|
const deniedNote = `${deniedRunnerIds.join(", ")} disabled in config by dispatch.disabledRunners`;
|
|
2761
2823
|
const onlySwitchedOff = relevant.every((r) => r.skipReason === DISABLED_BY_CONFIG_SKIP_REASON || isNotApplicableSkipReason(r.skipReason) || r.primaryUnavailableCause === "disabled" || r.primaryUnavailableCause === "disabledFallback");
|
|
2762
|
-
const
|
|
2824
|
+
const unavailableReason = cause ? `no primary language server answered (${PRIMARY_UNAVAILABLE_CAUSE[cause]})${deniedRunnerIds.length > 0 ? `; ${deniedNote}` : ""}` : deniedRunnerIds.length > 0 ? onlySwitchedOff ? `not checked (${deniedNote})` : `not fully checked (a language tool is missing, timed out, or failed to run; ${deniedNote})` : "not fully checked (a language tool is missing, timed out, or failed to run)";
|
|
2825
|
+
const verdict = unchecked(unavailableReason);
|
|
2826
|
+
if (ctx.analysisRootMode === "adopted") {
|
|
2827
|
+
return { verdict: unchecked(`not analyzed (${unavailableReason})`) };
|
|
2828
|
+
}
|
|
2763
2829
|
if (onlySwitchedOff && (cause === "disabled" || cause === "disabledFallback" || cause === void 0 && deniedRunnerIds.length > 0)) {
|
|
2764
2830
|
const disabledIds = [
|
|
2765
2831
|
...new Set(relevant.flatMap((r) => r.disabledPrimaryServerIds ?? []))
|
|
@@ -2971,40 +3037,23 @@ async function runGroup(ctx, group, registry, onRunnerResult) {
|
|
|
2971
3037
|
const observedTier = ctx.writeIndex === void 0 ? "inline" : classifyObservedRunner(projectRoot, runner.id);
|
|
2972
3038
|
if (observedTier === "collect-later") {
|
|
2973
3039
|
const markedAtMs = Date.now();
|
|
2974
|
-
const
|
|
2975
|
-
const
|
|
2976
|
-
const
|
|
3040
|
+
const run = async () => {
|
|
3041
|
+
const startedAtMs = Date.now();
|
|
3042
|
+
const result2 = await runRunner(runnerCtx, runner, semantic);
|
|
3043
|
+
const durationMs = Date.now() - startedAtMs;
|
|
3044
|
+
observeRunnerTier({
|
|
3045
|
+
filePath: ctx.filePath,
|
|
2977
3046
|
projectRoot,
|
|
2978
3047
|
runnerId: runner.id,
|
|
3048
|
+
observedTier,
|
|
2979
3049
|
durationMs,
|
|
2980
|
-
|
|
3050
|
+
result: result2
|
|
2981
3051
|
});
|
|
2982
|
-
if (tier2 !== observedTier) {
|
|
2983
|
-
logLatency({
|
|
2984
|
-
type: "phase",
|
|
2985
|
-
filePath: ctx.filePath,
|
|
2986
|
-
phase: "runner_collect_later_tier_flip",
|
|
2987
|
-
durationMs: 0,
|
|
2988
|
-
metadata: {
|
|
2989
|
-
runnerId: runner.id,
|
|
2990
|
-
from: observedTier,
|
|
2991
|
-
to: tier2,
|
|
2992
|
-
projectRoot
|
|
2993
|
-
}
|
|
2994
|
-
});
|
|
2995
|
-
}
|
|
2996
|
-
if (tier2 === "collect-later") {
|
|
2997
|
-
incrementDegradationCount({
|
|
2998
|
-
kind: "runner-collect-later",
|
|
2999
|
-
subject: `${projectRoot}:${runner.id}`,
|
|
3000
|
-
reason: `observed ${durationMs}ms, threshold ${COLLECT_LATER_THRESHOLD_MS}ms`
|
|
3001
|
-
});
|
|
3002
|
-
}
|
|
3003
3052
|
logLatency({
|
|
3004
3053
|
type: "runner",
|
|
3005
3054
|
filePath: ctx.filePath,
|
|
3006
3055
|
runnerId: runner.id,
|
|
3007
|
-
startedAt: new Date(
|
|
3056
|
+
startedAt: new Date(startedAtMs).toISOString(),
|
|
3008
3057
|
durationMs,
|
|
3009
3058
|
status: result2.status,
|
|
3010
3059
|
diagnosticCount: result2.diagnostics.length,
|
|
@@ -3016,6 +3065,12 @@ async function runGroup(ctx, group, registry, onRunnerResult) {
|
|
|
3016
3065
|
}
|
|
3017
3066
|
});
|
|
3018
3067
|
return result2;
|
|
3068
|
+
};
|
|
3069
|
+
const { promise: deferred, coalesced } = runCollectLater({
|
|
3070
|
+
projectRoot,
|
|
3071
|
+
runnerId: runner.id,
|
|
3072
|
+
filePath: ctx.filePath,
|
|
3073
|
+
start: run
|
|
3019
3074
|
});
|
|
3020
3075
|
deferRunnerFindings({
|
|
3021
3076
|
filePath: ctx.filePath,
|
|
@@ -3048,7 +3103,11 @@ async function runGroup(ctx, group, registry, onRunnerResult) {
|
|
|
3048
3103
|
status: "pending",
|
|
3049
3104
|
diagnosticCount: 0,
|
|
3050
3105
|
semantic,
|
|
3051
|
-
metadata: {
|
|
3106
|
+
metadata: {
|
|
3107
|
+
tier: "collect-later",
|
|
3108
|
+
delivered: "turn_end",
|
|
3109
|
+
...coalesced && { coalesced: true }
|
|
3110
|
+
}
|
|
3052
3111
|
});
|
|
3053
3112
|
continue;
|
|
3054
3113
|
}
|
|
@@ -3056,31 +3115,14 @@ async function runGroup(ctx, group, registry, onRunnerResult) {
|
|
|
3056
3115
|
onRunnerResult?.(runnerId, result);
|
|
3057
3116
|
const runnerEnd = Date.now();
|
|
3058
3117
|
const duration = runnerEnd - runnerStart;
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
runnerId: runner.id,
|
|
3062
|
-
durationMs: duration,
|
|
3063
|
-
timedOut: result.failureKind === "timeout"
|
|
3064
|
-
});
|
|
3065
|
-
if (tier !== observedTier) {
|
|
3066
|
-
logLatency({
|
|
3067
|
-
type: "phase",
|
|
3118
|
+
if (ctx.writeIndex !== void 0) {
|
|
3119
|
+
observeRunnerTier({
|
|
3068
3120
|
filePath: ctx.filePath,
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
to: tier,
|
|
3075
|
-
projectRoot
|
|
3076
|
-
}
|
|
3077
|
-
});
|
|
3078
|
-
}
|
|
3079
|
-
if (tier === "collect-later") {
|
|
3080
|
-
incrementDegradationCount({
|
|
3081
|
-
kind: "runner-collect-later",
|
|
3082
|
-
subject: `${projectRoot}:${runner.id}`,
|
|
3083
|
-
reason: `observed ${duration}ms, threshold ${COLLECT_LATER_THRESHOLD_MS}ms`
|
|
3121
|
+
projectRoot,
|
|
3122
|
+
runnerId: runner.id,
|
|
3123
|
+
observedTier,
|
|
3124
|
+
durationMs: duration,
|
|
3125
|
+
result
|
|
3084
3126
|
});
|
|
3085
3127
|
}
|
|
3086
3128
|
const skipReason = result.status === "skipped" && isRunnerSkipReason(result.skipReason) ? result.skipReason : void 0;
|
|
@@ -3320,7 +3362,7 @@ async function dispatchForFile(ctx, groups, registry, onRunnerResult, options) {
|
|
|
3320
3362
|
const filtered = filterDelta(visibleDiagnostics, applyOutputFilters(previousBaseline), { key: (d) => findingKey(d), lane: (d) => d.tool });
|
|
3321
3363
|
const isNew = new Set(filtered.new);
|
|
3322
3364
|
heldBackBlockers = visibleDiagnostics.filter((d) => d.semantic === "blocking" && !isNew.has(d));
|
|
3323
|
-
stillObserved.push(...promoteDeltaUnusedToBlockers(visibleDiagnostics.flatMap((d) => !isNew.has(d) && d.semantic !== "blocking" && isUnusedValueDiagnostic(d) ? [d] : [])));
|
|
3365
|
+
stillObserved.push(...promoteDeltaUnusedToBlockers(visibleDiagnostics.flatMap((d) => !isNew.has(d) && d.semantic !== "blocking" && (isUnusedValueDiagnostic(d) || blocksAsClassMember(d)) ? [d] : [])).map(withClassSeverity));
|
|
3324
3366
|
visibleDiagnostics = promoteDeltaUnusedToBlockers(filtered.new);
|
|
3325
3367
|
resolvedCount = filtered.fixed.length;
|
|
3326
3368
|
}
|
|
@@ -3330,7 +3372,9 @@ async function dispatchForFile(ctx, groups, registry, onRunnerResult, options) {
|
|
|
3330
3372
|
let preExisting = [];
|
|
3331
3373
|
if (preEditSeed && seedContent !== void 0) {
|
|
3332
3374
|
const classified = classifyPreExisting(preEditSeed, [
|
|
3333
|
-
|
|
3375
|
+
// #5416: and a class member the merge below would raise, so the
|
|
3376
|
+
// seed holds it before the raise can block on it.
|
|
3377
|
+
...visibleDiagnostics.filter((d) => d.semantic === "blocking" || blocksAsClassMember(d)),
|
|
3334
3378
|
...heldBackBlockers
|
|
3335
3379
|
], seedContent, new Set([...answeredRunnerIds].filter((id) => !inconclusiveRunnerIds.has(id))));
|
|
3336
3380
|
if (classified.preExisting.length > 0) {
|
|
@@ -3341,6 +3385,7 @@ async function dispatchForFile(ctx, groups, registry, onRunnerResult, options) {
|
|
|
3341
3385
|
}
|
|
3342
3386
|
ctx.facts.setBoundedSessionFact(seedKey, classified.nextSeed);
|
|
3343
3387
|
}
|
|
3388
|
+
visibleDiagnostics = mergeFindingClasses(visibleDiagnostics, preExisting);
|
|
3344
3389
|
if (ctx.deltaMode && baselinePathSafe) {
|
|
3345
3390
|
ctx.facts.setBoundedSessionFact(baselineAbsKey, [...dedupedDiagnostics]);
|
|
3346
3391
|
}
|
|
@@ -3352,14 +3397,14 @@ async function dispatchForFile(ctx, groups, registry, onRunnerResult, options) {
|
|
|
3352
3397
|
provider: ctx.telemetryProvider
|
|
3353
3398
|
};
|
|
3354
3399
|
if (fixedItems.length > 0) {
|
|
3355
|
-
import("./chunk-
|
|
3400
|
+
import("./chunk-SF7KSXB5.js").then(({ appendToWorklog }) => {
|
|
3356
3401
|
appendToWorklog(ctx.cwd, fixedItems, true, worklogIdentity);
|
|
3357
3402
|
}).catch(() => {
|
|
3358
3403
|
});
|
|
3359
3404
|
}
|
|
3360
3405
|
const fixableWarnings = warnings.filter((d) => d.fixable);
|
|
3361
3406
|
if (fixableWarnings.length > 0) {
|
|
3362
|
-
import("./chunk-
|
|
3407
|
+
import("./chunk-SF7KSXB5.js").then(({ appendToWorklog }) => {
|
|
3363
3408
|
appendToWorklog(ctx.cwd, fixableWarnings, false, worklogIdentity);
|
|
3364
3409
|
}).catch(() => {
|
|
3365
3410
|
});
|
|
@@ -3517,11 +3562,44 @@ function failureRowMetadata(result) {
|
|
|
3517
3562
|
}
|
|
3518
3563
|
return result.inconclusive === true ? inconclusive : void 0;
|
|
3519
3564
|
}
|
|
3565
|
+
function observeRunnerTier(options) {
|
|
3566
|
+
const { filePath, projectRoot, runnerId, observedTier, durationMs } = options;
|
|
3567
|
+
const tier = observeRunnerLatency({
|
|
3568
|
+
projectRoot,
|
|
3569
|
+
runnerId,
|
|
3570
|
+
durationMs,
|
|
3571
|
+
timedOut: options.result.failureKind === "timeout"
|
|
3572
|
+
});
|
|
3573
|
+
if (tier !== observedTier) {
|
|
3574
|
+
logLatency({
|
|
3575
|
+
type: "phase",
|
|
3576
|
+
filePath,
|
|
3577
|
+
phase: "runner_collect_later_tier_flip",
|
|
3578
|
+
durationMs: 0,
|
|
3579
|
+
metadata: { runnerId, from: observedTier, to: tier, projectRoot }
|
|
3580
|
+
});
|
|
3581
|
+
}
|
|
3582
|
+
if (tier === "collect-later") {
|
|
3583
|
+
incrementDegradationCount({
|
|
3584
|
+
kind: "runner-collect-later",
|
|
3585
|
+
subject: `${projectRoot}:${runnerId}`,
|
|
3586
|
+
reason: `observed ${durationMs}ms, threshold ${COLLECT_LATER_THRESHOLD_MS}ms`
|
|
3587
|
+
});
|
|
3588
|
+
}
|
|
3589
|
+
}
|
|
3520
3590
|
async function runRunner(ctx, runner, defaultSemantic) {
|
|
3591
|
+
if (isInSpawnTimeoutCooldown(runner.id)) {
|
|
3592
|
+
recordDegradationOnce({
|
|
3593
|
+
kind: "runner-spawn-timeout-cooldown",
|
|
3594
|
+
subject: runner.id,
|
|
3595
|
+
reason: "skipped: its spawn timed out earlier this session"
|
|
3596
|
+
});
|
|
3597
|
+
return { status: "skipped", diagnostics: [], semantic: "none" };
|
|
3598
|
+
}
|
|
3521
3599
|
const timeoutMs = Math.max(runner.timeoutMs ?? RUNNER_TIMEOUT_MS, getRunnerTimeoutFloorMs());
|
|
3522
3600
|
const phaseToken = phaseStarted(runner.id);
|
|
3523
3601
|
try {
|
|
3524
|
-
const outcome = await withBudget(runner.run(ctx).then((value) => ({ value })), timeoutMs);
|
|
3602
|
+
const outcome = await withBudget(spawnCooldownScope.run({ tool: runner.id, subject: runner.id, phase: "lint" }, () => runner.run(ctx)).then((value) => ({ value })), timeoutMs);
|
|
3525
3603
|
if (outcome === void 0) {
|
|
3526
3604
|
throw new Error(`Runner ${runner.id} timed out after ${timeoutMs}ms`);
|
|
3527
3605
|
}
|
|
@@ -3552,8 +3630,7 @@ async function runRunner(ctx, runner, defaultSemantic) {
|
|
|
3552
3630
|
|
|
3553
3631
|
// dist/clients/cascade-budget.js
|
|
3554
3632
|
function cascadeSettleWaitMs() {
|
|
3555
|
-
|
|
3556
|
-
return Number.isFinite(raw) && raw >= 0 ? raw : 5e3;
|
|
3633
|
+
return nonNegativeIntEnv("PI_LENS_CASCADE_SETTLE_WAIT_MS", 5e3);
|
|
3557
3634
|
}
|
|
3558
3635
|
var MIN_NEIGHBOUR_BUDGET = RUNTIME_CONFIG.pipeline.cascadeMaxFiles;
|
|
3559
3636
|
var DEFAULT_NEIGHBOUR_BUDGET = 40;
|
|
@@ -3852,7 +3929,7 @@ function formatCascadeNeighborDiagnostics(cwd, neighbors, options = {}) {
|
|
|
3852
3929
|
const since = options.stillPresentSince?.(neighbor, d);
|
|
3853
3930
|
const label = since === void 0 ? "" : ` (still present since turn ${since})`;
|
|
3854
3931
|
out += `
|
|
3855
|
-
line ${line}, col ${col}${rule}: ${d.message
|
|
3932
|
+
line ${line}, col ${col}${rule}: ${displayedMessage(d.message)}${label}`;
|
|
3856
3933
|
}
|
|
3857
3934
|
out += "\n</diagnostics>";
|
|
3858
3935
|
}
|
|
@@ -3939,7 +4016,7 @@ function cascadeErrorKey(diagnostic) {
|
|
|
3939
4016
|
}
|
|
3940
4017
|
function cascadeStillPresentSince(filePath, diagnostic, turn) {
|
|
3941
4018
|
const first = pendingNeighbors.get(normalizeMapKey(filePath))?.errors.get(cascadeErrorKey(diagnostic));
|
|
3942
|
-
return first !== void 0 && first < turn ? first : void 0;
|
|
4019
|
+
return first !== void 0 && first.turn < turn ? first.turn : void 0;
|
|
3943
4020
|
}
|
|
3944
4021
|
function recordDeliveredCascadeNeighbor(filePath, diagnostics, turn, checkedAt) {
|
|
3945
4022
|
const key2 = normalizeMapKey(filePath);
|
|
@@ -3947,7 +4024,17 @@ function recordDeliveredCascadeNeighbor(filePath, diagnostics, turn, checkedAt)
|
|
|
3947
4024
|
const errors = /* @__PURE__ */ new Map();
|
|
3948
4025
|
for (const d of diagnostics) {
|
|
3949
4026
|
const k = cascadeErrorKey(d);
|
|
3950
|
-
errors.set(k,
|
|
4027
|
+
errors.set(k, {
|
|
4028
|
+
turn: previous?.errors.get(k)?.turn ?? turn,
|
|
4029
|
+
identity: {
|
|
4030
|
+
filePath: d.filePath,
|
|
4031
|
+
message: d.message,
|
|
4032
|
+
...d.line !== void 0 && { line: d.line },
|
|
4033
|
+
tool: d.tool,
|
|
4034
|
+
...d.rule !== void 0 && { rule: d.rule },
|
|
4035
|
+
...d.semantic !== void 0 && { semantic: d.semantic }
|
|
4036
|
+
}
|
|
4037
|
+
});
|
|
3951
4038
|
}
|
|
3952
4039
|
pendingNeighbors.delete(key2);
|
|
3953
4040
|
if (errors.size === 0)
|
|
@@ -3973,7 +4060,8 @@ function listCascadePendingNeighbors() {
|
|
|
3973
4060
|
return [...pendingNeighbors.values()].map((entry) => ({
|
|
3974
4061
|
filePath: entry.filePath,
|
|
3975
4062
|
errorCount: entry.errors.size,
|
|
3976
|
-
checkedAt: entry.checkedAt
|
|
4063
|
+
checkedAt: entry.checkedAt,
|
|
4064
|
+
errors: [...entry.errors.values()].map((stored) => stored.identity)
|
|
3977
4065
|
}));
|
|
3978
4066
|
}
|
|
3979
4067
|
function resetCascadePendingNeighbors() {
|
|
@@ -4234,7 +4322,7 @@ function peekOutstandingCascadeTouches(guard) {
|
|
|
4234
4322
|
var _reconcileOptions = {};
|
|
4235
4323
|
|
|
4236
4324
|
// dist/clients/dispatch/runners/ast-grep-napi.js
|
|
4237
|
-
import * as
|
|
4325
|
+
import * as fs4 from "node:fs";
|
|
4238
4326
|
import * as path6 from "node:path";
|
|
4239
4327
|
|
|
4240
4328
|
// dist/clients/dispatch/priorities.js
|
|
@@ -4892,7 +4980,7 @@ function evaluateAstGrepRules(filePath, rootNode, cwd, kind, options = {}) {
|
|
|
4892
4980
|
}
|
|
4893
4981
|
const toDiagnostic3 = (position) => {
|
|
4894
4982
|
const severity = normalizeRuleSeverity(rule.severity);
|
|
4895
|
-
const semantic = severity
|
|
4983
|
+
const semantic = semanticFor(severity);
|
|
4896
4984
|
const defectClass = classifyDefect(rule.id, "ast-grep-napi", rule.message || rule.id);
|
|
4897
4985
|
const ruleFix = explicitRuleFixSuggestion(rule);
|
|
4898
4986
|
return {
|
|
@@ -4968,7 +5056,7 @@ var astGrepNapiRunner = {
|
|
|
4968
5056
|
if (!sgModule) {
|
|
4969
5057
|
return { status: "skipped", diagnostics: [], semantic: "none" };
|
|
4970
5058
|
}
|
|
4971
|
-
if (!
|
|
5059
|
+
if (!fs4.existsSync(ctx.filePath)) {
|
|
4972
5060
|
return { status: "skipped", diagnostics: [], semantic: "none" };
|
|
4973
5061
|
}
|
|
4974
5062
|
const lang = getLang(ctx.filePath, sgModule);
|
|
@@ -4977,7 +5065,7 @@ var astGrepNapiRunner = {
|
|
|
4977
5065
|
}
|
|
4978
5066
|
let stats;
|
|
4979
5067
|
try {
|
|
4980
|
-
stats =
|
|
5068
|
+
stats = fs4.statSync(ctx.filePath);
|
|
4981
5069
|
} catch {
|
|
4982
5070
|
return { status: "skipped", diagnostics: [], semantic: "none" };
|
|
4983
5071
|
}
|
|
@@ -4990,7 +5078,7 @@ var astGrepNapiRunner = {
|
|
|
4990
5078
|
content = contentFromFacts;
|
|
4991
5079
|
} else {
|
|
4992
5080
|
try {
|
|
4993
|
-
content =
|
|
5081
|
+
content = fs4.readFileSync(ctx.filePath, "utf-8");
|
|
4994
5082
|
} catch {
|
|
4995
5083
|
return { status: "skipped", diagnostics: [], semantic: "none" };
|
|
4996
5084
|
}
|
|
@@ -5307,7 +5395,6 @@ var tryCatchFactProvider = {
|
|
|
5307
5395
|
|
|
5308
5396
|
// dist/clients/dispatch/runners/actionlint.js
|
|
5309
5397
|
import path7 from "node:path";
|
|
5310
|
-
var actionlint = createAvailabilityChecker("actionlint", ".exe");
|
|
5311
5398
|
function isGitHubWorkflowFile(filePath) {
|
|
5312
5399
|
const normalized = toPosix(filePath);
|
|
5313
5400
|
return /(^|\/)\.github\/workflows\/[^/]+\.ya?ml$/i.test(normalized);
|
|
@@ -5369,11 +5456,7 @@ var actionlintRunner = {
|
|
|
5369
5456
|
async run(ctx) {
|
|
5370
5457
|
const cwd = resolveRunnerCwd(ctx, "actionlint");
|
|
5371
5458
|
let cmd = null;
|
|
5372
|
-
|
|
5373
|
-
cmd = actionlint.getCommand(cwd);
|
|
5374
|
-
} else {
|
|
5375
|
-
cmd = await resolveToolCommandWithInstallFallback(cwd, "actionlint");
|
|
5376
|
-
}
|
|
5459
|
+
cmd = await resolveToolCommandWithInstallFallback(cwd, "actionlint");
|
|
5377
5460
|
if (!cmd)
|
|
5378
5461
|
return { status: "skipped", diagnostics: [], semantic: "none" };
|
|
5379
5462
|
const relativeFilePath = path7.relative(cwd, ctx.filePath) || ctx.filePath;
|
|
@@ -5446,7 +5529,7 @@ function parseBiomeJson(raw, filePath, cwd, fixKindByRule) {
|
|
|
5446
5529
|
line: d.location.start.line,
|
|
5447
5530
|
column: d.location.start.column,
|
|
5448
5531
|
severity: normalizeBiomeSeverity(d.severity),
|
|
5449
|
-
semantic: d.severity
|
|
5532
|
+
semantic: semanticFor(normalizeBiomeSeverity(d.severity)),
|
|
5450
5533
|
tool: "biome",
|
|
5451
5534
|
rule: d.category,
|
|
5452
5535
|
fixable: isFixable,
|
|
@@ -5592,7 +5675,7 @@ var biomeCheckJsonRunner = {
|
|
|
5592
5675
|
var biome_check_default = biomeCheckJsonRunner;
|
|
5593
5676
|
|
|
5594
5677
|
// dist/clients/dispatch/runners/cpp-check.js
|
|
5595
|
-
import * as
|
|
5678
|
+
import * as fs5 from "node:fs";
|
|
5596
5679
|
import * as path9 from "node:path";
|
|
5597
5680
|
var compilerCheckers = {
|
|
5598
5681
|
clang: createAvailabilityChecker("clang", ".exe"),
|
|
@@ -5631,7 +5714,7 @@ var CPP_HEADER_EXTENSIONS = /* @__PURE__ */ new Set([
|
|
|
5631
5714
|
]);
|
|
5632
5715
|
function headerLooksLikeCpp(absPath) {
|
|
5633
5716
|
try {
|
|
5634
|
-
const content =
|
|
5717
|
+
const content = fs5.readFileSync(absPath, "utf-8");
|
|
5635
5718
|
return /\b(namespace|template|class|constexpr|concept|using)\b|std::|\b(public|private|protected)\s*:/.test(content);
|
|
5636
5719
|
} catch {
|
|
5637
5720
|
return false;
|
|
@@ -5782,7 +5865,6 @@ var cpp_check_default = cppCheckRunner;
|
|
|
5782
5865
|
|
|
5783
5866
|
// dist/clients/dispatch/runners/credo.js
|
|
5784
5867
|
import * as path10 from "node:path";
|
|
5785
|
-
import * as fs7 from "node:fs";
|
|
5786
5868
|
var CREDO_PROBE_BUDGET_MS = 1e4;
|
|
5787
5869
|
var probeCredo = createCwdCachedProbe((cwd) => safeSpawnAsync("mix", ["credo", "--version"], {
|
|
5788
5870
|
timeout: CREDO_PROBE_BUDGET_MS,
|
|
@@ -5807,17 +5889,16 @@ function parseCredoJson(raw, fallbackPath, cwd) {
|
|
|
5807
5889
|
return [];
|
|
5808
5890
|
}
|
|
5809
5891
|
}
|
|
5810
|
-
function hasMixExs(cwd) {
|
|
5811
|
-
return fs7.existsSync(path10.join(cwd, "mix.exs"));
|
|
5812
|
-
}
|
|
5813
5892
|
var credoRunner = {
|
|
5814
5893
|
id: "credo",
|
|
5815
5894
|
appliesTo: ["elixir"],
|
|
5816
5895
|
priority: PRIORITY.GENERAL_ANALYSIS,
|
|
5817
5896
|
skipTestFiles: false,
|
|
5897
|
+
// mix never walks up, so the seam answers for `cwd` alone.
|
|
5898
|
+
requiresConfig: (cwd) => hasToolConfig("mix", cwd),
|
|
5818
5899
|
async run(ctx) {
|
|
5819
5900
|
const cwd = resolveRunnerCwd(ctx, "credo");
|
|
5820
|
-
if (!
|
|
5901
|
+
if (!credoRunner.requiresConfig?.(cwd)) {
|
|
5821
5902
|
return { status: "skipped", diagnostics: [], semantic: "none" };
|
|
5822
5903
|
}
|
|
5823
5904
|
if (!await probeCredo(cwd)) {
|
|
@@ -5825,13 +5906,11 @@ var credoRunner = {
|
|
|
5825
5906
|
}
|
|
5826
5907
|
const absPath = path10.resolve(cwd, ctx.filePath);
|
|
5827
5908
|
const result = await safeSpawnAsync("mix", ["credo", "--format", "json", "--strict", absPath], { timeout: 3e4, cwd });
|
|
5828
|
-
const output = `${result.stdout ?? ""}${result.stderr ?? ""}`;
|
|
5829
5909
|
const parsed = parseToolRun("credo", {
|
|
5830
5910
|
result,
|
|
5831
|
-
output,
|
|
5832
5911
|
// EXIT TABLE (Credo 1.7 measured fixture): 0 clean; 1 findings; 2 error; other nonzero rejected.
|
|
5833
5912
|
exitCodes: { ran: [1, 2] }
|
|
5834
|
-
}, (raw) => parseCredoJson(raw, ctx.filePath, cwd));
|
|
5913
|
+
}, (raw) => parseCredoJson(raw, ctx.filePath, cwd), { parseStreams: "stdout-else-stderr" });
|
|
5835
5914
|
if (parsed.skipped)
|
|
5836
5915
|
return parsed.skipped;
|
|
5837
5916
|
return finishParsedRun({
|
|
@@ -5845,7 +5924,7 @@ var credoRunner = {
|
|
|
5845
5924
|
var credo_default = credoRunner;
|
|
5846
5925
|
|
|
5847
5926
|
// dist/clients/dispatch/runners/cue-vet.js
|
|
5848
|
-
import * as
|
|
5927
|
+
import * as fs6 from "node:fs";
|
|
5849
5928
|
import * as path11 from "node:path";
|
|
5850
5929
|
var cue = createAvailabilityChecker("cue", ".exe", ["version"]);
|
|
5851
5930
|
function parseCueVetOutput(raw) {
|
|
@@ -5950,7 +6029,7 @@ var cueVetRunner = {
|
|
|
5950
6029
|
const singleFileArgs = ["vet", "-c=false", `./${fileName}`];
|
|
5951
6030
|
let touchedContent = null;
|
|
5952
6031
|
try {
|
|
5953
|
-
touchedContent =
|
|
6032
|
+
touchedContent = fs6.readFileSync(absPath, "utf8");
|
|
5954
6033
|
} catch {
|
|
5955
6034
|
touchedContent = null;
|
|
5956
6035
|
}
|
|
@@ -6118,7 +6197,7 @@ function parseDartMachineOutput(raw, filePath, cwd) {
|
|
|
6118
6197
|
line: lineNum || 1,
|
|
6119
6198
|
column: colNum || 1,
|
|
6120
6199
|
severity,
|
|
6121
|
-
semantic: severity
|
|
6200
|
+
semantic: semanticFor(severity),
|
|
6122
6201
|
tool: "dart",
|
|
6123
6202
|
rule: ruleId,
|
|
6124
6203
|
defectClass: "style",
|
|
@@ -6167,15 +6246,8 @@ var dartAnalyzeRunner = {
|
|
|
6167
6246
|
var dart_analyze_default = dartAnalyzeRunner;
|
|
6168
6247
|
|
|
6169
6248
|
// dist/clients/dispatch/runners/detekt.js
|
|
6170
|
-
import * as fs9 from "node:fs";
|
|
6171
6249
|
import * as path13 from "node:path";
|
|
6172
6250
|
var detekt = createAvailabilityChecker("detekt", ".bat");
|
|
6173
|
-
var DETEKT_CONFIG_CANDIDATES = [
|
|
6174
|
-
"detekt.yml",
|
|
6175
|
-
".detekt.yml",
|
|
6176
|
-
path13.join("config", "detekt", "detekt.yml"),
|
|
6177
|
-
path13.join("detekt", "detekt.yml")
|
|
6178
|
-
];
|
|
6179
6251
|
var DETEKT_FIXABLE_RULES = /* @__PURE__ */ new Set([
|
|
6180
6252
|
// formatting (ktlint wrapper) — every rule supports autocorrect
|
|
6181
6253
|
"AnnotationOnSeparateLine",
|
|
@@ -6238,20 +6310,16 @@ var DETEKT_FIXABLE_RULES = /* @__PURE__ */ new Set([
|
|
|
6238
6310
|
"UnusedPrivateClass",
|
|
6239
6311
|
"RedundantVisibilityModifierRule"
|
|
6240
6312
|
]);
|
|
6241
|
-
function findDetektConfig(cwd) {
|
|
6242
|
-
for (const candidate of DETEKT_CONFIG_CANDIDATES) {
|
|
6243
|
-
const full = path13.join(cwd, candidate);
|
|
6244
|
-
if (fs9.existsSync(full))
|
|
6245
|
-
return full;
|
|
6246
|
-
}
|
|
6247
|
-
return void 0;
|
|
6248
|
-
}
|
|
6249
6313
|
function parseDetektOutput(raw, filePath, cwd) {
|
|
6250
6314
|
const diagnostics = [];
|
|
6315
|
+
if (!raw.trim())
|
|
6316
|
+
return diagnostics;
|
|
6317
|
+
let located = 0;
|
|
6251
6318
|
const pattern = /^(.+?):(\d+):(\d+): (?:(error|warning): )?(.+?)(?:\s+\[([^\]]+)\])?$/gm;
|
|
6252
6319
|
const absTarget = path13.resolve(cwd, filePath);
|
|
6253
6320
|
for (const match of raw.matchAll(pattern)) {
|
|
6254
6321
|
const [, file, lineStr, colStr, level, message, rule] = match;
|
|
6322
|
+
located += 1;
|
|
6255
6323
|
if (!pathsEqual(path13.resolve(cwd, file.trim()), absTarget))
|
|
6256
6324
|
continue;
|
|
6257
6325
|
const severity = level === "error" ? "error" : "warning";
|
|
@@ -6266,7 +6334,7 @@ function parseDetektOutput(raw, filePath, cwd) {
|
|
|
6266
6334
|
line: lineNum,
|
|
6267
6335
|
column: colNum,
|
|
6268
6336
|
severity,
|
|
6269
|
-
semantic: severity
|
|
6337
|
+
semantic: semanticFor(severity),
|
|
6270
6338
|
tool: "detekt",
|
|
6271
6339
|
rule: ruleId,
|
|
6272
6340
|
defectClass: "style",
|
|
@@ -6274,7 +6342,7 @@ function parseDetektOutput(raw, filePath, cwd) {
|
|
|
6274
6342
|
fixSuggestion: fixable ? "Run `detekt --auto-correct` to apply the deterministic auto-correction for this rule." : void 0
|
|
6275
6343
|
});
|
|
6276
6344
|
}
|
|
6277
|
-
return diagnostics;
|
|
6345
|
+
return located > 0 ? diagnostics : null;
|
|
6278
6346
|
}
|
|
6279
6347
|
var detektRunner = {
|
|
6280
6348
|
id: "detekt",
|
|
@@ -6282,13 +6350,14 @@ var detektRunner = {
|
|
|
6282
6350
|
priority: PRIORITY.GENERAL_ANALYSIS,
|
|
6283
6351
|
timeoutMs: 9e4,
|
|
6284
6352
|
skipTestFiles: false,
|
|
6353
|
+
requiresConfig: (cwd) => hasToolConfig("detekt", cwd),
|
|
6285
6354
|
async run(ctx) {
|
|
6286
6355
|
const cwd = resolveRunnerCwd(ctx, "detekt");
|
|
6287
6356
|
const policy = getLinterPolicyForCwd(ctx.filePath, cwd);
|
|
6288
6357
|
if (policy && !policy.preferredRunners.includes("detekt")) {
|
|
6289
6358
|
return { status: "skipped", diagnostics: [], semantic: "none" };
|
|
6290
6359
|
}
|
|
6291
|
-
const configPath =
|
|
6360
|
+
const configPath = findToolConfig("detekt", cwd)?.file;
|
|
6292
6361
|
if (!configPath) {
|
|
6293
6362
|
return { status: "skipped", diagnostics: [], semantic: "none" };
|
|
6294
6363
|
}
|
|
@@ -6305,32 +6374,40 @@ var detektRunner = {
|
|
|
6305
6374
|
// Exit 1 is a tool error with NO findings (captured broken-config run: an invalid detekt.yml
|
|
6306
6375
|
// prints InvalidConfigurationError on stderr), and also can follow printed findings (captured
|
|
6307
6376
|
// findings-then-exit1 run: a non-numeric build.weights value fails after the report). Exit 1 is
|
|
6308
|
-
// therefore admitted, and
|
|
6309
|
-
// so a printed finding is kept. Any other nonzero
|
|
6377
|
+
// therefore admitted, and `finishParsedRun` reports it as failed/parser_error only when the
|
|
6378
|
+
// parser read no finding (#5411, was a skip), so a printed finding is kept. Any other nonzero
|
|
6379
|
+
// exit is rejected.
|
|
6310
6380
|
exitCodes: { ran: [1, 2] }
|
|
6311
|
-
}, (out) => parseDetektOutput(out, ctx.filePath, cwd)
|
|
6381
|
+
}, (out) => parseDetektOutput(out, ctx.filePath, cwd));
|
|
6312
6382
|
if (run.skipped)
|
|
6313
6383
|
return run.skipped;
|
|
6314
|
-
const
|
|
6315
|
-
|
|
6316
|
-
|
|
6317
|
-
|
|
6318
|
-
|
|
6319
|
-
|
|
6320
|
-
|
|
6321
|
-
|
|
6384
|
+
const verdict = finishParsedRun({
|
|
6385
|
+
tool: "detekt",
|
|
6386
|
+
ctx,
|
|
6387
|
+
result,
|
|
6388
|
+
diagnostics: run.diagnostics,
|
|
6389
|
+
unreadable: run.unreadable,
|
|
6390
|
+
classify: (diagnostics) => {
|
|
6391
|
+
const hasErrors = diagnostics.some((d) => d.severity === "error");
|
|
6392
|
+
return {
|
|
6393
|
+
status: hasErrors ? "failed" : "succeeded",
|
|
6394
|
+
semantic: hasErrors ? "blocking" : "warning"
|
|
6395
|
+
};
|
|
6396
|
+
}
|
|
6322
6397
|
});
|
|
6398
|
+
if (run.diagnostics.length === 0)
|
|
6399
|
+
return verdict;
|
|
6323
6400
|
return result.status === 1 ? { ...verdict, inconclusive: true } : verdict;
|
|
6324
6401
|
}
|
|
6325
6402
|
};
|
|
6326
6403
|
var detekt_default = detektRunner;
|
|
6327
6404
|
|
|
6328
6405
|
// dist/clients/dispatch/runners/dotnet-build.js
|
|
6329
|
-
import * as
|
|
6406
|
+
import * as fs7 from "node:fs";
|
|
6330
6407
|
import * as path14 from "node:path";
|
|
6331
6408
|
var dotnet = createAvailabilityChecker("dotnet", ".exe");
|
|
6332
6409
|
function findProjectTarget(cwd) {
|
|
6333
|
-
const entries =
|
|
6410
|
+
const entries = fs7.readdirSync(cwd, { withFileTypes: true });
|
|
6334
6411
|
for (const patterns of [
|
|
6335
6412
|
DOTNET_CSHARP_SOLUTION_MARKERS,
|
|
6336
6413
|
DOTNET_CSHARP_PROJECT_MARKERS
|
|
@@ -6426,7 +6503,7 @@ function parseDotnetBuildOutput(raw, filePath, cwd) {
|
|
|
6426
6503
|
line: lineNum,
|
|
6427
6504
|
column: colNum,
|
|
6428
6505
|
severity,
|
|
6429
|
-
semantic: severity
|
|
6506
|
+
semantic: semanticFor(severity),
|
|
6430
6507
|
tool: "dotnet-build",
|
|
6431
6508
|
rule,
|
|
6432
6509
|
fixable: false
|
|
@@ -6485,13 +6562,10 @@ ${result.stderr ?? ""}`.trim();
|
|
|
6485
6562
|
var dotnet_build_default = dotnetBuildRunner;
|
|
6486
6563
|
|
|
6487
6564
|
// dist/clients/dispatch/runners/elixir-check.js
|
|
6488
|
-
import * as
|
|
6565
|
+
import * as fs8 from "node:fs";
|
|
6489
6566
|
import * as path15 from "node:path";
|
|
6490
6567
|
var mix = createAvailabilityChecker("mix", ".bat");
|
|
6491
6568
|
var elixirc = createAvailabilityChecker("elixirc", ".bat");
|
|
6492
|
-
function hasMixExs2(cwd) {
|
|
6493
|
-
return fs11.existsSync(path15.join(cwd, "mix.exs"));
|
|
6494
|
-
}
|
|
6495
6569
|
var ELIXIR_SNIPPET_LOCATION = /└─\s+(.+?):(\d+)(?::(\d+))?(?::|$)/;
|
|
6496
6570
|
function parseElixirOutput(raw, filePath, cwd = process.cwd()) {
|
|
6497
6571
|
const diagnostics = [];
|
|
@@ -6542,7 +6616,7 @@ function parseElixirOutput(raw, filePath, cwd = process.cwd()) {
|
|
|
6542
6616
|
line: Number.parseInt(lineStr2, 10) || 1,
|
|
6543
6617
|
column: Number.parseInt(colStr2 || "1", 10) || 1,
|
|
6544
6618
|
severity,
|
|
6545
|
-
semantic: severity
|
|
6619
|
+
semantic: semanticFor(severity),
|
|
6546
6620
|
tool: "elixir-check",
|
|
6547
6621
|
rule: severity === "error" ? "error" : "warning",
|
|
6548
6622
|
fixable: false
|
|
@@ -6567,7 +6641,7 @@ function parseElixirOutput(raw, filePath, cwd = process.cwd()) {
|
|
|
6567
6641
|
line: Number.parseInt(lineStr, 10) || 1,
|
|
6568
6642
|
column: Number.parseInt(colStr || "1", 10) || 1,
|
|
6569
6643
|
severity,
|
|
6570
|
-
semantic: severity
|
|
6644
|
+
semantic: semanticFor(severity),
|
|
6571
6645
|
tool: "elixir-check",
|
|
6572
6646
|
rule: severity === "error" ? "error" : "warning",
|
|
6573
6647
|
fixable: false
|
|
@@ -6585,12 +6659,12 @@ var elixirCheckRunner = {
|
|
|
6585
6659
|
const absPath = path15.resolve(cwd, ctx.filePath);
|
|
6586
6660
|
let command;
|
|
6587
6661
|
let args = [];
|
|
6588
|
-
if (
|
|
6662
|
+
if (hasToolConfig("mix", cwd) && await mix.isAvailableAsync(cwd)) {
|
|
6589
6663
|
command = "mix";
|
|
6590
6664
|
args = ["compile", "--warnings-as-errors"];
|
|
6591
6665
|
} else if (await elixirc.isAvailableAsync(cwd)) {
|
|
6592
6666
|
const outDir = path15.join(getProjectDataDir(cwd), "elixir-check");
|
|
6593
|
-
|
|
6667
|
+
fs8.mkdirSync(outDir, { recursive: true });
|
|
6594
6668
|
command = "elixirc";
|
|
6595
6669
|
args = ["-o", outDir, absPath];
|
|
6596
6670
|
}
|
|
@@ -6674,7 +6748,7 @@ function parseEslintJson(raw, filePath, cwd) {
|
|
|
6674
6748
|
line: msg.line ?? 1,
|
|
6675
6749
|
column: msg.column ?? 1,
|
|
6676
6750
|
severity,
|
|
6677
|
-
semantic: severity
|
|
6751
|
+
semantic: semanticFor(severity),
|
|
6678
6752
|
tool: "eslint",
|
|
6679
6753
|
rule: msg.ruleId ?? void 0,
|
|
6680
6754
|
fixable: !!msg.fix,
|
|
@@ -6695,10 +6769,10 @@ var eslintRunner = {
|
|
|
6695
6769
|
id: "eslint",
|
|
6696
6770
|
appliesTo: ["jsts"],
|
|
6697
6771
|
priority: PRIORITY.LINT_SECONDARY,
|
|
6772
|
+
requiresConfig: (cwd) => hasEslintConfig(cwd),
|
|
6698
6773
|
async run(ctx) {
|
|
6699
6774
|
const cwd = resolveRunnerCwd(ctx, "eslint");
|
|
6700
|
-
|
|
6701
|
-
if (!userHasConfig) {
|
|
6775
|
+
if (!eslintRunner.requiresConfig?.(cwd)) {
|
|
6702
6776
|
return { status: "skipped", diagnostics: [], semantic: "none" };
|
|
6703
6777
|
}
|
|
6704
6778
|
const cmd = resolveToolCommand(cwd, "eslint") ?? "eslint";
|
|
@@ -6706,17 +6780,11 @@ var eslintRunner = {
|
|
|
6706
6780
|
return { status: "skipped", diagnostics: [], semantic: "none" };
|
|
6707
6781
|
}
|
|
6708
6782
|
const result = await safeSpawnAsync(cmd, ["--format", "json", "--no-error-on-unmatched-pattern", ctx.filePath], { timeout: 3e4, cwd });
|
|
6709
|
-
const stdout = result.stdout ?? "";
|
|
6710
|
-
let raw = stdout;
|
|
6711
|
-
if (raw.length === 0 && result.status !== 0) {
|
|
6712
|
-
raw = result.stderr || "";
|
|
6713
|
-
}
|
|
6714
6783
|
const parsed = parseToolRun("eslint", {
|
|
6715
6784
|
result,
|
|
6716
|
-
output: raw,
|
|
6717
6785
|
// EXIT TABLE (ESLint 9.10 docs https://eslint.org/docs/latest/use/command-line-interface): 0 clean; 1 findings; 2 fatal findings/error; other nonzero rejected.
|
|
6718
6786
|
exitCodes: { ran: [1, 2] }
|
|
6719
|
-
}, (rawOutput) => parseEslintJson(rawOutput, ctx.filePath, cwd).diagnostics);
|
|
6787
|
+
}, (rawOutput) => parseEslintJson(rawOutput, ctx.filePath, cwd).diagnostics, { parseStreams: "stdout-else-stderr" });
|
|
6720
6788
|
if (parsed.skipped)
|
|
6721
6789
|
return parsed.skipped;
|
|
6722
6790
|
return finishParsedRun({
|
|
@@ -6805,7 +6873,7 @@ function parseGleamOutput(raw, filePath, cwd) {
|
|
|
6805
6873
|
line: Number.parseInt(lineStr, 10) || 1,
|
|
6806
6874
|
column: Number.parseInt(colStr, 10) || 1,
|
|
6807
6875
|
severity,
|
|
6808
|
-
semantic: severity
|
|
6876
|
+
semantic: semanticFor(severity),
|
|
6809
6877
|
tool: "gleam",
|
|
6810
6878
|
rule: "gleam-check",
|
|
6811
6879
|
fixable: false
|
|
@@ -6883,16 +6951,21 @@ function createLineParser(config) {
|
|
|
6883
6951
|
const fixable = typeof config.fixable === "function" ? config.fixable(match) : config.fixable ?? false;
|
|
6884
6952
|
const autoFixAvailable = typeof config.autoFixAvailable === "function" ? config.autoFixAvailable(match) : config.autoFixAvailable ?? false;
|
|
6885
6953
|
const fixKind = typeof config.fixKind === "function" ? config.fixKind(match) : config.fixKind;
|
|
6954
|
+
const rule = config.extractRule?.(match);
|
|
6955
|
+
const message = config.extractMessage(match);
|
|
6886
6956
|
diagnostics.push({
|
|
6887
|
-
|
|
6888
|
-
|
|
6957
|
+
// #5412: a finding with no rule keys its id on its message too. The
|
|
6958
|
+
// line alone gave two go vet findings at one position one id, and the
|
|
6959
|
+
// dispatcher's `findingKey` (rule || id) kept only one of them.
|
|
6960
|
+
id: rule ? config.generateId(match) : `${config.generateId(match)}-${hashText(message)}`,
|
|
6961
|
+
message,
|
|
6889
6962
|
filePath,
|
|
6890
6963
|
line: lineNum,
|
|
6891
6964
|
column: colNum,
|
|
6892
6965
|
severity,
|
|
6893
|
-
semantic: severity
|
|
6966
|
+
semantic: semanticFor(severity),
|
|
6894
6967
|
tool: config.tool,
|
|
6895
|
-
rule
|
|
6968
|
+
rule,
|
|
6896
6969
|
defectClass: config.defectClass,
|
|
6897
6970
|
fixable,
|
|
6898
6971
|
autoFixAvailable,
|
|
@@ -7013,7 +7086,7 @@ function parseGolangciJson(raw, filePath, cwd) {
|
|
|
7013
7086
|
line: issue.Pos.Line,
|
|
7014
7087
|
column: issue.Pos.Column,
|
|
7015
7088
|
severity,
|
|
7016
|
-
semantic: severity
|
|
7089
|
+
semantic: semanticFor(severity),
|
|
7017
7090
|
tool: "golangci-lint",
|
|
7018
7091
|
rule: issue.FromLinter,
|
|
7019
7092
|
defectClass: "correctness",
|
|
@@ -7030,13 +7103,14 @@ var golangciRunner = {
|
|
|
7030
7103
|
appliesTo: ["go"],
|
|
7031
7104
|
priority: PRIORITY.GENERAL_ANALYSIS,
|
|
7032
7105
|
timeoutMs: 9e4,
|
|
7106
|
+
requiresConfig: (cwd) => hasGolangciConfig(cwd),
|
|
7033
7107
|
async run(ctx) {
|
|
7034
7108
|
const cwd = resolveRunnerCwd(ctx, "golangci-lint");
|
|
7035
7109
|
const policy = getLinterPolicyForCwd(ctx.filePath, cwd);
|
|
7036
7110
|
if (policy && !policy.preferredRunners.includes("golangci-lint")) {
|
|
7037
7111
|
return { status: "skipped", diagnostics: [], semantic: "none" };
|
|
7038
7112
|
}
|
|
7039
|
-
if (!
|
|
7113
|
+
if (!golangciRunner.requiresConfig?.(cwd)) {
|
|
7040
7114
|
return { status: "skipped", diagnostics: [], semantic: "none" };
|
|
7041
7115
|
}
|
|
7042
7116
|
const cmd = await resolveAvailableOrInstall(golangci, "golangci-lint", cwd);
|
|
@@ -7050,13 +7124,11 @@ var golangciRunner = {
|
|
|
7050
7124
|
"--show-stats=false",
|
|
7051
7125
|
ctx.filePath
|
|
7052
7126
|
], { timeout: 6e4, cwd });
|
|
7053
|
-
const raw = (result.stdout ?? "").length > 0 ? result.stdout ?? "" : result.status !== 0 ? result.stderr || "" : "";
|
|
7054
7127
|
const parsed = parseToolRun("golangci-lint", {
|
|
7055
7128
|
result,
|
|
7056
|
-
output: raw,
|
|
7057
7129
|
// EXIT TABLE (golangci-lint v2 docs https://golangci-lint.run/docs/welcome/quick-start/; 2.14.0 exits 1 on findings and 3 on an unknown flag): 0 clean; 1 findings; 2 error; 3 error; 4 error; 5 error; other nonzero rejected.
|
|
7058
7130
|
exitCodes: { ran: [1, 2, 3, 4, 5] }
|
|
7059
|
-
}, (
|
|
7131
|
+
}, (raw) => parseGolangciJson(raw, ctx.filePath, cwd), { parseStreams: "stdout-else-stderr" });
|
|
7060
7132
|
if (parsed.skipped)
|
|
7061
7133
|
return parsed.skipped;
|
|
7062
7134
|
return finishParsedRun({
|
|
@@ -7071,7 +7143,6 @@ var golangci_lint_default = golangciRunner;
|
|
|
7071
7143
|
|
|
7072
7144
|
// dist/clients/dispatch/runners/hadolint.js
|
|
7073
7145
|
import * as path20 from "node:path";
|
|
7074
|
-
var hadolint = createAvailabilityChecker("hadolint", ".exe");
|
|
7075
7146
|
function parseHadolintOutput(raw, filePath, cwd) {
|
|
7076
7147
|
try {
|
|
7077
7148
|
const parsed = JSON.parse(raw);
|
|
@@ -7090,7 +7161,7 @@ function parseHadolintOutput(raw, filePath, cwd) {
|
|
|
7090
7161
|
line: item.line,
|
|
7091
7162
|
column: item.column ?? 1,
|
|
7092
7163
|
severity,
|
|
7093
|
-
semantic: severity
|
|
7164
|
+
semantic: semanticFor(severity),
|
|
7094
7165
|
tool: "hadolint",
|
|
7095
7166
|
rule: item.code,
|
|
7096
7167
|
fixable: false
|
|
@@ -7112,12 +7183,7 @@ var hadolintRunner = {
|
|
|
7112
7183
|
if (policy && !policy.preferredRunners.includes("hadolint")) {
|
|
7113
7184
|
return { status: "skipped", diagnostics: [], semantic: "none" };
|
|
7114
7185
|
}
|
|
7115
|
-
|
|
7116
|
-
if (await hadolint.isAvailableAsync(cwd)) {
|
|
7117
|
-
cmd = hadolint.getCommand(cwd);
|
|
7118
|
-
} else {
|
|
7119
|
-
cmd = await resolveToolCommandWithInstallFallback(cwd, "hadolint");
|
|
7120
|
-
}
|
|
7186
|
+
const cmd = await resolveToolCommandWithInstallFallback(cwd, "hadolint");
|
|
7121
7187
|
if (!cmd) {
|
|
7122
7188
|
return { status: "skipped", diagnostics: [], semantic: "none" };
|
|
7123
7189
|
}
|
|
@@ -7195,7 +7261,7 @@ ${line.trim()}`;
|
|
|
7195
7261
|
line: location.line,
|
|
7196
7262
|
column: 1,
|
|
7197
7263
|
severity,
|
|
7198
|
-
semantic: severity
|
|
7264
|
+
semantic: semanticFor(severity),
|
|
7199
7265
|
tool: "helm-lint",
|
|
7200
7266
|
rule: level.toLowerCase(),
|
|
7201
7267
|
fixable: false
|
|
@@ -7234,15 +7300,18 @@ async function lintChart(chartRoot, cwd) {
|
|
|
7234
7300
|
if (truncatedByOutputCap(result)) {
|
|
7235
7301
|
return failedResult("parser_error", "helm lint output was truncated before parsing completed");
|
|
7236
7302
|
}
|
|
7303
|
+
const timedOut = spawnTimedOut(result) ? skipUnlessToolRan("helm-lint", { result }) : null;
|
|
7304
|
+
if (timedOut)
|
|
7305
|
+
return timedOut;
|
|
7237
7306
|
const output = [result.stdout, result.stderr].filter(Boolean).join("\n");
|
|
7238
7307
|
const diagnostics = parseHelmLintOutput(output, chartRoot);
|
|
7239
7308
|
const typedFailure = result.spawnFailure?.kind;
|
|
7240
7309
|
if (typedFailure) {
|
|
7241
|
-
const failureKind = typedFailure === "tool-not-found" ? "unavailable" : typedFailure === "
|
|
7310
|
+
const failureKind = typedFailure === "tool-not-found" ? "unavailable" : typedFailure === "killed" && result.failure === "aborted" ? "aborted" : "server_error";
|
|
7242
7311
|
return failedResult(failureKind, result.error?.message || `helm lint ${typedFailure}`);
|
|
7243
7312
|
}
|
|
7244
7313
|
if (result.failure) {
|
|
7245
|
-
return failedResult(result.failure
|
|
7314
|
+
return failedResult(result.failure, result.error?.message || `helm lint ${result.failure}`);
|
|
7246
7315
|
}
|
|
7247
7316
|
const hasErrorDiagnostic = diagnostics.some((diagnostic) => diagnostic.severity === "error");
|
|
7248
7317
|
if (result.status !== 0 && !hasErrorDiagnostic) {
|
|
@@ -7284,7 +7353,7 @@ var helmLintRunner = {
|
|
|
7284
7353
|
var helm_lint_default = helmLintRunner;
|
|
7285
7354
|
|
|
7286
7355
|
// dist/clients/dispatch/runners/helm-render.js
|
|
7287
|
-
import * as
|
|
7356
|
+
import * as fs9 from "node:fs";
|
|
7288
7357
|
import * as path22 from "node:path";
|
|
7289
7358
|
var helm2 = createAvailabilityChecker("helm", ".exe", ["version", "--short"]);
|
|
7290
7359
|
var trivy = createAvailabilityChecker("trivy", ".exe");
|
|
@@ -7317,10 +7386,10 @@ function resolveTemplateSource(sourceRef, chartRoot, realChartRoot) {
|
|
|
7317
7386
|
if (!isWithinIdentity(candidate, chartRoot))
|
|
7318
7387
|
return null;
|
|
7319
7388
|
try {
|
|
7320
|
-
if (!
|
|
7389
|
+
if (!fs9.lstatSync(candidate).isFile())
|
|
7321
7390
|
return null;
|
|
7322
|
-
const root = realChartRoot ??
|
|
7323
|
-
if (!isWithinIdentity(
|
|
7391
|
+
const root = realChartRoot ?? fs9.realpathSync(chartRoot);
|
|
7392
|
+
if (!isWithinIdentity(fs9.realpathSync(candidate), root))
|
|
7324
7393
|
return null;
|
|
7325
7394
|
} catch {
|
|
7326
7395
|
return null;
|
|
@@ -7329,7 +7398,7 @@ function resolveTemplateSource(sourceRef, chartRoot, realChartRoot) {
|
|
|
7329
7398
|
}
|
|
7330
7399
|
function canonicalChartRoot(chartRoot) {
|
|
7331
7400
|
try {
|
|
7332
|
-
return
|
|
7401
|
+
return fs9.realpathSync(chartRoot);
|
|
7333
7402
|
} catch {
|
|
7334
7403
|
return chartRoot;
|
|
7335
7404
|
}
|
|
@@ -7531,6 +7600,10 @@ function failedResult2(kind, message) {
|
|
|
7531
7600
|
failureMessage: message.slice(0, 200)
|
|
7532
7601
|
};
|
|
7533
7602
|
}
|
|
7603
|
+
function startupFailureResult(kind, render) {
|
|
7604
|
+
const timedOut = kind === "timeout" ? skipUnlessToolRan("helm-render", { result: render }) : null;
|
|
7605
|
+
return timedOut ?? failedResult2(kind, render.error?.message || `helm template ${kind}`);
|
|
7606
|
+
}
|
|
7534
7607
|
var OUR_RENDER_FLAGS = ["--output-dir"];
|
|
7535
7608
|
function rejectedOurInvocation(output) {
|
|
7536
7609
|
if (!output)
|
|
@@ -7548,7 +7621,7 @@ function spawnFailureKind(result) {
|
|
|
7548
7621
|
const typed = result.spawnFailure?.kind;
|
|
7549
7622
|
if (typed === "tool-not-found")
|
|
7550
7623
|
return "unavailable";
|
|
7551
|
-
if (
|
|
7624
|
+
if (spawnTimedOut(result))
|
|
7552
7625
|
return "timeout";
|
|
7553
7626
|
if (typed === "killed" || result.failure === "aborted")
|
|
7554
7627
|
return "aborted";
|
|
@@ -7564,7 +7637,7 @@ function collectRenderedFiles(root) {
|
|
|
7564
7637
|
const dir = stack.pop();
|
|
7565
7638
|
let entries;
|
|
7566
7639
|
try {
|
|
7567
|
-
entries =
|
|
7640
|
+
entries = fs9.readdirSync(dir, { withFileTypes: true });
|
|
7568
7641
|
} catch {
|
|
7569
7642
|
continue;
|
|
7570
7643
|
}
|
|
@@ -7603,7 +7676,7 @@ function readRenderedTree(outputDir, chartRoot) {
|
|
|
7603
7676
|
for (const renderedPath of walk2.files) {
|
|
7604
7677
|
let content;
|
|
7605
7678
|
try {
|
|
7606
|
-
content =
|
|
7679
|
+
content = fs9.readFileSync(renderedPath, "utf-8");
|
|
7607
7680
|
} catch {
|
|
7608
7681
|
unreadable += 1;
|
|
7609
7682
|
continue;
|
|
@@ -7722,7 +7795,7 @@ function logRenderPass(filePath, chartRoot, startedAt, metadata) {
|
|
|
7722
7795
|
metadata: { chartRoot, ...metadata }
|
|
7723
7796
|
});
|
|
7724
7797
|
}
|
|
7725
|
-
function discardScratchDir(outputDir, filePath, remove = (target) =>
|
|
7798
|
+
function discardScratchDir(outputDir, filePath, remove = (target) => fs9.rmSync(target, { recursive: true, force: true })) {
|
|
7726
7799
|
try {
|
|
7727
7800
|
remove(outputDir);
|
|
7728
7801
|
} catch (error) {
|
|
@@ -7743,7 +7816,7 @@ async function renderAndValidate(chartRoot, cwd, filePath) {
|
|
|
7743
7816
|
const helmCmd = await resolveAvailableOrInstall(helm2, "helm", cwd);
|
|
7744
7817
|
if (!helmCmd)
|
|
7745
7818
|
return helmUnavailableResult(cwd);
|
|
7746
|
-
const outputDir =
|
|
7819
|
+
const outputDir = fs9.mkdtempSync(path22.join(scannerReportParentDir(), "pi-lens-helm-render-"));
|
|
7747
7820
|
try {
|
|
7748
7821
|
const render = await safeSpawnAsync(helmCmd, ["template", "pi-lens-render", chartRoot, "--output-dir", outputDir], {
|
|
7749
7822
|
cwd,
|
|
@@ -7769,7 +7842,7 @@ async function renderAndValidate(chartRoot, cwd, filePath) {
|
|
|
7769
7842
|
outcome: "runner-failed",
|
|
7770
7843
|
failureKind: startupFailure
|
|
7771
7844
|
});
|
|
7772
|
-
return
|
|
7845
|
+
return startupFailureResult(startupFailure, render);
|
|
7773
7846
|
}
|
|
7774
7847
|
if (render.status !== 0) {
|
|
7775
7848
|
const ourFlag = rejectedOurInvocation(renderOutput);
|
|
@@ -7876,7 +7949,6 @@ var helm_render_default = helmRenderRunner;
|
|
|
7876
7949
|
|
|
7877
7950
|
// dist/clients/dispatch/runners/htmlhint.js
|
|
7878
7951
|
import * as path23 from "node:path";
|
|
7879
|
-
var htmlhint = createAvailabilityChecker("htmlhint");
|
|
7880
7952
|
var HTMLHINT_RULES = {
|
|
7881
7953
|
"tag-pair": true,
|
|
7882
7954
|
"attr-no-duplication": true,
|
|
@@ -7908,7 +7980,7 @@ function parseHtmlhintOutput(raw, filePath, cwd) {
|
|
|
7908
7980
|
line: lineNum,
|
|
7909
7981
|
column: col,
|
|
7910
7982
|
severity,
|
|
7911
|
-
semantic: severity
|
|
7983
|
+
semantic: semanticFor(severity),
|
|
7912
7984
|
tool: "htmlhint",
|
|
7913
7985
|
rule,
|
|
7914
7986
|
fixable: false
|
|
@@ -7927,12 +7999,7 @@ var htmlhintRunner = {
|
|
|
7927
7999
|
if (policy && !policy.preferredRunners.includes("htmlhint")) {
|
|
7928
8000
|
return { status: "skipped", diagnostics: [], semantic: "none" };
|
|
7929
8001
|
}
|
|
7930
|
-
|
|
7931
|
-
if (await htmlhint.isAvailableAsync(cwd)) {
|
|
7932
|
-
cmd = htmlhint.getCommand(cwd);
|
|
7933
|
-
} else {
|
|
7934
|
-
cmd = await resolveToolCommandWithInstallFallback(cwd, "htmlhint");
|
|
7935
|
-
}
|
|
8002
|
+
const cmd = await resolveToolCommandWithInstallFallback(cwd, "htmlhint");
|
|
7936
8003
|
if (!cmd) {
|
|
7937
8004
|
return { status: "skipped", diagnostics: [], semantic: "none" };
|
|
7938
8005
|
}
|
|
@@ -8053,7 +8120,6 @@ var javac_default = javacRunner;
|
|
|
8053
8120
|
|
|
8054
8121
|
// dist/clients/dispatch/runners/ktlint.js
|
|
8055
8122
|
import * as path25 from "node:path";
|
|
8056
|
-
var ktlint = createAvailabilityChecker("ktlint", ".exe");
|
|
8057
8123
|
var KTLINT_EXIT_CODES = { ran: [1, 2, 3] };
|
|
8058
8124
|
function normalizeKtlintResults(parsed) {
|
|
8059
8125
|
if (Array.isArray(parsed)) {
|
|
@@ -8129,12 +8195,7 @@ var ktlintRunner = {
|
|
|
8129
8195
|
if (policy && !policy.preferredRunners.includes("ktlint")) {
|
|
8130
8196
|
return { status: "skipped", diagnostics: [], semantic: "none" };
|
|
8131
8197
|
}
|
|
8132
|
-
|
|
8133
|
-
if (await ktlint.isAvailableAsync(cwd)) {
|
|
8134
|
-
cmd = ktlint.getCommand(cwd);
|
|
8135
|
-
} else {
|
|
8136
|
-
cmd = await resolveToolCommandWithInstallFallback(cwd, "ktlint");
|
|
8137
|
-
}
|
|
8198
|
+
const cmd = await resolveToolCommandWithInstallFallback(cwd, "ktlint");
|
|
8138
8199
|
if (!cmd)
|
|
8139
8200
|
return { status: "skipped", diagnostics: [], semantic: "none" };
|
|
8140
8201
|
const absPath = path25.resolve(cwd, ctx.filePath);
|
|
@@ -8465,7 +8526,7 @@ var lsp_default = lspRunner;
|
|
|
8465
8526
|
import * as path27 from "node:path";
|
|
8466
8527
|
|
|
8467
8528
|
// dist/clients/dispatch/runners/utils/markdownlint-api.js
|
|
8468
|
-
import * as
|
|
8529
|
+
import * as fs10 from "node:fs";
|
|
8469
8530
|
import * as path26 from "node:path";
|
|
8470
8531
|
var PACKAGE_NAME = "markdownlint-cli2";
|
|
8471
8532
|
function locateCli2Entry(command) {
|
|
@@ -8480,14 +8541,14 @@ function locateCli2Entry(command) {
|
|
|
8480
8541
|
candidates.push(path26.dirname(realpathOrResolve(shim)));
|
|
8481
8542
|
for (const dir of candidates) {
|
|
8482
8543
|
try {
|
|
8483
|
-
const manifest = JSON.parse(
|
|
8544
|
+
const manifest = JSON.parse(fs10.readFileSync(path26.join(dir, "package.json"), "utf8"));
|
|
8484
8545
|
if (manifest.name !== PACKAGE_NAME)
|
|
8485
8546
|
continue;
|
|
8486
8547
|
const root = manifest.exports && typeof manifest.exports === "object" ? manifest.exports["."] : manifest.exports;
|
|
8487
8548
|
if (typeof root !== "string")
|
|
8488
8549
|
continue;
|
|
8489
8550
|
const entry = path26.resolve(dir, root);
|
|
8490
|
-
if (
|
|
8551
|
+
if (fs10.statSync(entry).isFile())
|
|
8491
8552
|
return entry;
|
|
8492
8553
|
} catch {
|
|
8493
8554
|
}
|
|
@@ -8516,10 +8577,6 @@ function markdownlintNoFixInvocation(options) {
|
|
|
8516
8577
|
}
|
|
8517
8578
|
|
|
8518
8579
|
// dist/clients/dispatch/runners/markdownlint.js
|
|
8519
|
-
var markdownlint = createAvailabilityChecker("markdownlint-cli2", ".cmd", [
|
|
8520
|
-
"--no-globs",
|
|
8521
|
-
"-"
|
|
8522
|
-
]);
|
|
8523
8580
|
var MARKDOWNLINT_EXIT_CODES = { ran: [1] };
|
|
8524
8581
|
var MARKDOWNLINT_FIXABLE_RULES = /* @__PURE__ */ new Set([
|
|
8525
8582
|
"MD001",
|
|
@@ -8594,18 +8651,9 @@ var markdownlintRunner = {
|
|
|
8594
8651
|
if (policy && !policy.preferredRunners.includes("markdownlint")) {
|
|
8595
8652
|
return { status: "skipped", diagnostics: [], semantic: "none" };
|
|
8596
8653
|
}
|
|
8597
|
-
|
|
8598
|
-
if (await markdownlint.isAvailableAsync(cwd)) {
|
|
8599
|
-
cmd = markdownlint.getCommand(cwd);
|
|
8600
|
-
} else {
|
|
8601
|
-
cmd = await resolveToolCommandWithInstallFallback(cwd, "markdownlint");
|
|
8602
|
-
}
|
|
8654
|
+
const cmd = await resolveToolCommandWithInstallFallback(cwd, "markdownlint");
|
|
8603
8655
|
if (!cmd)
|
|
8604
8656
|
return { status: "skipped", diagnostics: [], semantic: "none" };
|
|
8605
|
-
if (isInSpawnTimeoutCooldown(cmd)) {
|
|
8606
|
-
logRunnerAdvisoryOnce(ctx, "markdownlint", cwd, `markdownlint: ${cmd} is cooling down after a spawn timeout \u2014 skipping (one bounded failure budget per edit)`);
|
|
8607
|
-
return { status: "skipped", diagnostics: [], semantic: "none" };
|
|
8608
|
-
}
|
|
8609
8657
|
const configArgs = markdownlintConfigArgs(cwd);
|
|
8610
8658
|
const args = [...configArgs, ctx.filePath];
|
|
8611
8659
|
const invocation = markdownlintNoFixInvocation({ command: cmd, cwd, args });
|
|
@@ -8613,15 +8661,6 @@ var markdownlintRunner = {
|
|
|
8613
8661
|
timeout: 15e3,
|
|
8614
8662
|
cwd
|
|
8615
8663
|
});
|
|
8616
|
-
if (result.failure === "timeout") {
|
|
8617
|
-
noteSpawnTimeout({
|
|
8618
|
-
tool: "markdownlint",
|
|
8619
|
-
command: cmd,
|
|
8620
|
-
phase: "lint",
|
|
8621
|
-
durationMs: 15e3,
|
|
8622
|
-
teardown: result.timeoutTeardown
|
|
8623
|
-
});
|
|
8624
|
-
}
|
|
8625
8664
|
const raw = `${result.stdout ?? ""}${result.stderr ?? ""}`;
|
|
8626
8665
|
const run = parseToolRun("markdownlint", { result, output: raw, exitCodes: MARKDOWNLINT_EXIT_CODES }, (out) => parseMarkdownlintOutput(out, ctx.filePath, cwd));
|
|
8627
8666
|
if (run.skipped)
|
|
@@ -8640,7 +8679,6 @@ var markdownlint_default = markdownlintRunner;
|
|
|
8640
8679
|
|
|
8641
8680
|
// dist/clients/dispatch/runners/mypy.js
|
|
8642
8681
|
import * as path28 from "node:path";
|
|
8643
|
-
var mypy = createAvailabilityChecker("mypy", "");
|
|
8644
8682
|
var MYPY_EXIT_CODES = { ran: [1, 2] };
|
|
8645
8683
|
function parseMypyOutput(raw, fallbackPath, cwd) {
|
|
8646
8684
|
const diagnostics = [];
|
|
@@ -8661,7 +8699,7 @@ function parseMypyOutput(raw, fallbackPath, cwd) {
|
|
|
8661
8699
|
line: Number(lineNum),
|
|
8662
8700
|
column: col ? Number(col) : 1,
|
|
8663
8701
|
severity,
|
|
8664
|
-
semantic: severity
|
|
8702
|
+
semantic: semanticFor(severity),
|
|
8665
8703
|
tool: "mypy",
|
|
8666
8704
|
rule,
|
|
8667
8705
|
defectClass: "correctness"
|
|
@@ -8674,17 +8712,13 @@ var mypyRunner = {
|
|
|
8674
8712
|
appliesTo: ["python"],
|
|
8675
8713
|
priority: PRIORITY.GENERAL_ANALYSIS,
|
|
8676
8714
|
skipTestFiles: false,
|
|
8715
|
+
requiresConfig: (cwd) => hasMypyConfig(cwd),
|
|
8677
8716
|
async run(ctx) {
|
|
8678
8717
|
const cwd = resolveRunnerCwd(ctx, "mypy");
|
|
8679
|
-
if (!
|
|
8718
|
+
if (!mypyRunner.requiresConfig?.(cwd)) {
|
|
8680
8719
|
return { status: "skipped", diagnostics: [], semantic: "none" };
|
|
8681
8720
|
}
|
|
8682
|
-
|
|
8683
|
-
if (await mypy.isAvailableAsync(cwd)) {
|
|
8684
|
-
cmd = mypy.getCommand(cwd);
|
|
8685
|
-
} else {
|
|
8686
|
-
cmd = await resolveToolCommandWithInstallFallback(cwd, "mypy");
|
|
8687
|
-
}
|
|
8721
|
+
const cmd = await resolveToolCommandWithInstallFallback(cwd, "mypy");
|
|
8688
8722
|
if (!cmd)
|
|
8689
8723
|
return { status: "skipped", diagnostics: [], semantic: "none" };
|
|
8690
8724
|
const result = await safeSpawnAsync(cmd, ["--no-error-summary", "--show-column-numbers", ctx.filePath], { timeout: 3e4, cwd });
|
|
@@ -8748,8 +8782,7 @@ var oxlintRunner = {
|
|
|
8748
8782
|
if (cmd) {
|
|
8749
8783
|
args = ["lint", "--format", "json", ctx.filePath];
|
|
8750
8784
|
} else {
|
|
8751
|
-
|
|
8752
|
-
cmd = await ctx.hasTool(oxlintCmd) ? oxlintCmd : await resolveToolCommandWithInstallFallback(cwd, "oxlint");
|
|
8785
|
+
cmd = await resolveToolCommandWithInstallFallback(cwd, "oxlint");
|
|
8753
8786
|
args = ["--format", "json", ctx.filePath];
|
|
8754
8787
|
}
|
|
8755
8788
|
if (!cmd) {
|
|
@@ -8823,7 +8856,7 @@ function oxlintProcessState(result) {
|
|
|
8823
8856
|
const failureKind = result.spawnFailure?.kind;
|
|
8824
8857
|
if (truncatedByOutputCap(result))
|
|
8825
8858
|
return "truncated";
|
|
8826
|
-
if (result
|
|
8859
|
+
if (spawnTimedOut(result))
|
|
8827
8860
|
return "timeout";
|
|
8828
8861
|
if (result.failure === "aborted" || failureKind === "killed")
|
|
8829
8862
|
return "killed";
|
|
@@ -8956,7 +8989,7 @@ function parseOxlintJson(raw, filePath, cwd) {
|
|
|
8956
8989
|
line: lineNum,
|
|
8957
8990
|
column: colNum,
|
|
8958
8991
|
severity,
|
|
8959
|
-
semantic: severity
|
|
8992
|
+
semantic: semanticFor(severity),
|
|
8960
8993
|
tool: "oxlint",
|
|
8961
8994
|
rule,
|
|
8962
8995
|
// Oxlint's help text is rule-specific guidance ("Remove the debugger
|
|
@@ -9113,13 +9146,14 @@ var phpstanRunner = {
|
|
|
9113
9146
|
appliesTo: ["php"],
|
|
9114
9147
|
priority: PRIORITY.GENERAL_ANALYSIS,
|
|
9115
9148
|
skipTestFiles: false,
|
|
9149
|
+
requiresConfig: (cwd) => hasPhpstanConfig(cwd),
|
|
9116
9150
|
async run(ctx) {
|
|
9117
9151
|
const cwd = resolveRunnerCwd(ctx, "phpstan");
|
|
9118
9152
|
const policy = getLinterPolicyForCwd(ctx.filePath, cwd);
|
|
9119
9153
|
if (policy && !policy.preferredRunners.includes("phpstan")) {
|
|
9120
9154
|
return { status: "skipped", diagnostics: [], semantic: "none" };
|
|
9121
9155
|
}
|
|
9122
|
-
if (!
|
|
9156
|
+
if (!phpstanRunner.requiresConfig?.(cwd)) {
|
|
9123
9157
|
return { status: "skipped", diagnostics: [], semantic: "none" };
|
|
9124
9158
|
}
|
|
9125
9159
|
const cmd = await resolvePhpstan(cwd);
|
|
@@ -9189,12 +9223,14 @@ var prismaValidateRunner = {
|
|
|
9189
9223
|
${result.stderr ?? ""}`;
|
|
9190
9224
|
const diagnostics = parsePrismaValidateOutput(output, ctx.filePath);
|
|
9191
9225
|
const findings = PRISMA_VALIDATION_REPORT.test(output) ? diagnostics : [];
|
|
9226
|
+
if (findings.length === 0) {
|
|
9227
|
+
const skipped = skipUnlessToolRan("prisma-validate", { result, output });
|
|
9228
|
+
if (skipped)
|
|
9229
|
+
return skipped;
|
|
9230
|
+
}
|
|
9192
9231
|
const cutShort = faultIfCutShort(result, findings);
|
|
9193
9232
|
if (cutShort)
|
|
9194
9233
|
return cutShort;
|
|
9195
|
-
if (diagnostics.length === 0) {
|
|
9196
|
-
return { status: "skipped", diagnostics: [], semantic: "none" };
|
|
9197
|
-
}
|
|
9198
9234
|
return finishParsedRun({
|
|
9199
9235
|
tool: "prisma-validate",
|
|
9200
9236
|
ctx,
|
|
@@ -9211,7 +9247,7 @@ ${result.stderr ?? ""}`;
|
|
|
9211
9247
|
var prisma_validate_default = prismaValidateRunner;
|
|
9212
9248
|
|
|
9213
9249
|
// dist/clients/dispatch/runners/psscriptanalyzer.js
|
|
9214
|
-
import * as
|
|
9250
|
+
import * as fs11 from "node:fs/promises";
|
|
9215
9251
|
import * as path33 from "node:path";
|
|
9216
9252
|
var PS_SCRIPT = `
|
|
9217
9253
|
param([string]$FilePath)
|
|
@@ -9376,7 +9412,7 @@ function parsePSAnalyzerOutput(raw, filePath) {
|
|
|
9376
9412
|
line: item.Line,
|
|
9377
9413
|
column: item.Column ?? 1,
|
|
9378
9414
|
severity,
|
|
9379
|
-
semantic: severity
|
|
9415
|
+
semantic: semanticFor(severity),
|
|
9380
9416
|
tool: "psscriptanalyzer",
|
|
9381
9417
|
rule,
|
|
9382
9418
|
fixable: false
|
|
@@ -9406,7 +9442,7 @@ var psScriptAnalyzerRunner = {
|
|
|
9406
9442
|
const cwd = resolveRunnerCwd(ctx, "psscriptanalyzer");
|
|
9407
9443
|
const absPath = path33.resolve(cwd, ctx.filePath);
|
|
9408
9444
|
const tmpScript = path33.join(scannerReportParentDir(), `pi-lens-psa-${process.pid}.ps1`);
|
|
9409
|
-
await
|
|
9445
|
+
await fs11.writeFile(tmpScript, PS_SCRIPT, "utf-8");
|
|
9410
9446
|
try {
|
|
9411
9447
|
const sampler = startHostStallSampler();
|
|
9412
9448
|
const startedAt = Date.now();
|
|
@@ -9435,7 +9471,7 @@ var psScriptAnalyzerRunner = {
|
|
|
9435
9471
|
hostStallMs
|
|
9436
9472
|
});
|
|
9437
9473
|
incrementDegradationCount({
|
|
9438
|
-
kind: "
|
|
9474
|
+
kind: "powershell-run-failed",
|
|
9439
9475
|
subject: "psscriptanalyzer",
|
|
9440
9476
|
reason: `PowerShell (${cmd}) -File analysis exited with no status -- crash or signal-killed process`
|
|
9441
9477
|
});
|
|
@@ -9461,7 +9497,7 @@ var psScriptAnalyzerRunner = {
|
|
|
9461
9497
|
hostStallMs
|
|
9462
9498
|
});
|
|
9463
9499
|
incrementDegradationCount({
|
|
9464
|
-
kind: "
|
|
9500
|
+
kind: "powershell-run-failed",
|
|
9465
9501
|
subject: "psscriptanalyzer",
|
|
9466
9502
|
reason: policyDenied ? `PowerShell execution policy blocked -File analysis for ${cmd}: ${stderrText.trim().split("\n")[0] || "SecurityError"}` : `PowerShell -File analysis for ${cmd} exited ${result.status}: ${stderrText.trim().slice(0, 200) || "no stderr"}`
|
|
9467
9503
|
});
|
|
@@ -9491,7 +9527,7 @@ var psScriptAnalyzerRunner = {
|
|
|
9491
9527
|
classifiedBy: "caller"
|
|
9492
9528
|
});
|
|
9493
9529
|
incrementDegradationCount({
|
|
9494
|
-
kind: "
|
|
9530
|
+
kind: "powershell-run-failed",
|
|
9495
9531
|
subject: "psscriptanalyzer",
|
|
9496
9532
|
reason: `PowerShell -File analysis for ${cmd} exited 0 but stdout was ${unreadableReason}`
|
|
9497
9533
|
});
|
|
@@ -9506,7 +9542,7 @@ var psScriptAnalyzerRunner = {
|
|
|
9506
9542
|
semantic: hasErrors ? "blocking" : "warning"
|
|
9507
9543
|
});
|
|
9508
9544
|
} finally {
|
|
9509
|
-
await
|
|
9545
|
+
await fs11.unlink(tmpScript).catch(() => {
|
|
9510
9546
|
});
|
|
9511
9547
|
}
|
|
9512
9548
|
}
|
|
@@ -9536,7 +9572,7 @@ var pyrightRunner = {
|
|
|
9536
9572
|
cmd = installedPath;
|
|
9537
9573
|
}
|
|
9538
9574
|
if (!cmd) {
|
|
9539
|
-
const { findCommandAsync } = await import("./chunk-
|
|
9575
|
+
const { findCommandAsync } = await import("./chunk-5KLRCUDT.js");
|
|
9540
9576
|
const foundCmd = await findCommandAsync("pyright");
|
|
9541
9577
|
if (foundCmd)
|
|
9542
9578
|
cmd = foundCmd;
|
|
@@ -9614,16 +9650,24 @@ function parsePyrightOutput(data, _filePath) {
|
|
|
9614
9650
|
const generalDiags = data.generalDiagnostics || [];
|
|
9615
9651
|
for (const diag of generalDiags) {
|
|
9616
9652
|
const start = diag.range?.start;
|
|
9653
|
+
const message = diag.message || "Type error";
|
|
9654
|
+
const severity = normalizePyrightSeverity(diag.severity);
|
|
9655
|
+
const line = (start?.line ?? 0) + 1;
|
|
9617
9656
|
diagnostics.push({
|
|
9618
|
-
|
|
9619
|
-
|
|
9657
|
+
// #5412: a rule-less finding (a syntax error, say) keys its id on its
|
|
9658
|
+
// line and its message, as go vet's id does (`go-vet-<line>-<hash>`).
|
|
9659
|
+
// A message-only id gave two identical messages on different lines one
|
|
9660
|
+
// id, and the delta reads `Diagnostic.id` alone, so the second line was
|
|
9661
|
+
// held back as already seen.
|
|
9662
|
+
id: diag.rule ? `pyright-${diag.rule}` : `pyright-${line}-${hashText(message)}`,
|
|
9663
|
+
message,
|
|
9620
9664
|
filePath: diag.file || _filePath,
|
|
9621
|
-
line
|
|
9665
|
+
line,
|
|
9622
9666
|
column: (start?.character ?? 0) + 1,
|
|
9623
|
-
severity
|
|
9667
|
+
severity,
|
|
9624
9668
|
// Blocking classification stays error-only — reviving the info tier
|
|
9625
|
-
// must never widen what fails a turn.
|
|
9626
|
-
semantic:
|
|
9669
|
+
// must never widen what fails a turn (`semanticFor`).
|
|
9670
|
+
semantic: semanticFor(severity),
|
|
9627
9671
|
tool: "pyright",
|
|
9628
9672
|
rule: diag.rule
|
|
9629
9673
|
});
|
|
@@ -9659,7 +9703,7 @@ function parseRubocopJson(raw, filePath, cwd) {
|
|
|
9659
9703
|
line: offense.location.line,
|
|
9660
9704
|
column: offense.location.column,
|
|
9661
9705
|
severity,
|
|
9662
|
-
semantic: severity
|
|
9706
|
+
semantic: semanticFor(severity),
|
|
9663
9707
|
tool: "rubocop",
|
|
9664
9708
|
rule: offense.cop_name,
|
|
9665
9709
|
fixable: offense.correctable,
|
|
@@ -9689,13 +9733,7 @@ var rubocopRunner = {
|
|
|
9689
9733
|
}
|
|
9690
9734
|
const { cmd, args } = resolved;
|
|
9691
9735
|
const result = await safeSpawnAsync(cmd, [...args, "--format", "json", "--no-color", ctx.filePath], { timeout: 3e4, cwd });
|
|
9692
|
-
const run = parseToolRun("rubocop", {
|
|
9693
|
-
result,
|
|
9694
|
-
// Classify both streams so stderr-only failures reach the parse-error
|
|
9695
|
-
// path, while parseOutput keeps RuboCop's native JSON parser on stdout.
|
|
9696
|
-
output: `${result.stdout}${result.stderr}`,
|
|
9697
|
-
exitCodes: { ran: [1, 2] }
|
|
9698
|
-
}, (output) => parseRubocopJson(output, ctx.filePath, cwd), { parseOutput: result.stdout });
|
|
9736
|
+
const run = parseToolRun("rubocop", { result, exitCodes: { ran: [1, 2] } }, (output) => parseRubocopJson(output, ctx.filePath, cwd), { parseStreams: "stdout-else-stderr" });
|
|
9699
9737
|
if (run.skipped)
|
|
9700
9738
|
return run.skipped;
|
|
9701
9739
|
return finishParsedRun({
|
|
@@ -9727,7 +9765,7 @@ function parseRuffJson(raw, filePath) {
|
|
|
9727
9765
|
line: item.location?.row ?? 1,
|
|
9728
9766
|
column: item.location?.column ?? 1,
|
|
9729
9767
|
severity,
|
|
9730
|
-
semantic: severity
|
|
9768
|
+
semantic: semanticFor(severity),
|
|
9731
9769
|
tool: "ruff",
|
|
9732
9770
|
rule: code,
|
|
9733
9771
|
fixable: toolFixable,
|
|
@@ -9763,11 +9801,11 @@ var ruffRunner = {
|
|
|
9763
9801
|
...configArgs,
|
|
9764
9802
|
ctx.filePath
|
|
9765
9803
|
], { cwd, timeout: 3e4 });
|
|
9766
|
-
const
|
|
9767
|
-
|
|
9804
|
+
const run = parseToolRun("ruff", { result: checkResult, exitCodes: { ran: [1, 2] } }, (rawOutput) => {
|
|
9805
|
+
const output = stripAnsi(rawOutput);
|
|
9768
9806
|
const diagnostics = parseRuffJson(output, ctx.filePath);
|
|
9769
9807
|
return diagnostics.length > 0 ? diagnostics : parseRuffOutput(output, ctx.filePath, cwd);
|
|
9770
|
-
});
|
|
9808
|
+
}, { parseStreams: "stdout-else-stderr" });
|
|
9771
9809
|
if (run.skipped)
|
|
9772
9810
|
return run.skipped;
|
|
9773
9811
|
return finishParsedRun({
|
|
@@ -9859,12 +9897,18 @@ var rustClippyRunner = {
|
|
|
9859
9897
|
const diagnostics = allDiagnostics.filter((d) => pathsEqual(resolve32(cargoDir, d.filePath), absEdited));
|
|
9860
9898
|
const hasBlocking = diagnostics.some((d) => d.semantic === "blocking");
|
|
9861
9899
|
const semantic = hasBlocking ? "blocking" : diagnostics.length > 0 ? "warning" : "none";
|
|
9900
|
+
if (spawnTimedOut(result)) {
|
|
9901
|
+
const skipped = diagnostics.length === 0 ? skipUnlessToolRan("rust-clippy", { result }) : null;
|
|
9902
|
+
const cut = skipped ?? faultIfCutShort(result, diagnostics);
|
|
9903
|
+
if (cut)
|
|
9904
|
+
return cut;
|
|
9905
|
+
}
|
|
9862
9906
|
if (result.error || result.failure) {
|
|
9863
9907
|
return {
|
|
9864
9908
|
status: "failed",
|
|
9865
9909
|
diagnostics,
|
|
9866
9910
|
semantic,
|
|
9867
|
-
failureKind:
|
|
9911
|
+
failureKind: "server_error",
|
|
9868
9912
|
rawOutput: raw.substring(0, 500)
|
|
9869
9913
|
};
|
|
9870
9914
|
}
|
|
@@ -9924,7 +9968,7 @@ function parseClippyOutput(raw, fallbackPath, cargoDir) {
|
|
|
9924
9968
|
line: span.line_start || 0,
|
|
9925
9969
|
column: span.column_start || 0,
|
|
9926
9970
|
severity: normalizedSeverity,
|
|
9927
|
-
semantic: normalizedSeverity
|
|
9971
|
+
semantic: semanticFor(normalizedSeverity),
|
|
9928
9972
|
tool: "rust-clippy",
|
|
9929
9973
|
rule: message.code?.code,
|
|
9930
9974
|
defectClass: "correctness",
|
|
@@ -9940,7 +9984,7 @@ var rust_clippy_default = rustClippyRunner;
|
|
|
9940
9984
|
|
|
9941
9985
|
// dist/clients/dispatch/runners/spotbugs.js
|
|
9942
9986
|
import { randomUUID } from "node:crypto";
|
|
9943
|
-
import * as
|
|
9987
|
+
import * as fs12 from "node:fs";
|
|
9944
9988
|
import * as path35 from "node:path";
|
|
9945
9989
|
var java = createAvailabilityChecker("java", ".exe", ["-version"]);
|
|
9946
9990
|
var spotbugs = createAvailabilityChecker("spotbugs", ".bat", ["-version"]);
|
|
@@ -9957,7 +10001,7 @@ function classesSignature(classesDir) {
|
|
|
9957
10001
|
break;
|
|
9958
10002
|
let entries;
|
|
9959
10003
|
try {
|
|
9960
|
-
entries =
|
|
10004
|
+
entries = fs12.readdirSync(dir, { withFileTypes: true });
|
|
9961
10005
|
} catch {
|
|
9962
10006
|
continue;
|
|
9963
10007
|
}
|
|
@@ -9968,7 +10012,7 @@ function classesSignature(classesDir) {
|
|
|
9968
10012
|
} else if (entry.isFile() && entry.name.endsWith(".class")) {
|
|
9969
10013
|
count++;
|
|
9970
10014
|
try {
|
|
9971
|
-
const m =
|
|
10015
|
+
const m = fs12.statSync(full).mtimeMs;
|
|
9972
10016
|
if (m > newest)
|
|
9973
10017
|
newest = m;
|
|
9974
10018
|
} catch {
|
|
@@ -10115,7 +10159,7 @@ var spotbugsRunner = {
|
|
|
10115
10159
|
], { cwd, timeout: 12e4 });
|
|
10116
10160
|
let xml = "";
|
|
10117
10161
|
try {
|
|
10118
|
-
xml =
|
|
10162
|
+
xml = fs12.readFileSync(tmpXml, "utf8");
|
|
10119
10163
|
} catch {
|
|
10120
10164
|
if (result.error || (result.status ?? 0) > 1) {
|
|
10121
10165
|
return {
|
|
@@ -10128,7 +10172,7 @@ var spotbugsRunner = {
|
|
|
10128
10172
|
return { status: "succeeded", diagnostics: [], semantic: "none" };
|
|
10129
10173
|
} finally {
|
|
10130
10174
|
try {
|
|
10131
|
-
|
|
10175
|
+
fs12.rmSync(tmpXml, { force: true });
|
|
10132
10176
|
} catch {
|
|
10133
10177
|
}
|
|
10134
10178
|
}
|
|
@@ -10181,7 +10225,7 @@ function parseShellcheckOutput(raw, filePath, cwd) {
|
|
|
10181
10225
|
line: item.line,
|
|
10182
10226
|
column: item.column || 1,
|
|
10183
10227
|
severity,
|
|
10184
|
-
semantic: severity
|
|
10228
|
+
semantic: semanticFor(severity),
|
|
10185
10229
|
tool: "shellcheck",
|
|
10186
10230
|
rule: ruleCode,
|
|
10187
10231
|
fixable: !!item.fix,
|
|
@@ -10249,8 +10293,7 @@ var shellcheckRunner = {
|
|
|
10249
10293
|
if (result.status === 0 && !result.stdout?.trim()) {
|
|
10250
10294
|
return { status: "succeeded", diagnostics: [], semantic: "none" };
|
|
10251
10295
|
}
|
|
10252
|
-
const
|
|
10253
|
-
const parsed = parseToolRun("shellcheck", { result, output: raw, exitCodes: SHELLCHECK_EXIT_CODES }, (output) => parseShellcheckOutput(output, ctx.filePath, cwd));
|
|
10296
|
+
const parsed = parseToolRun("shellcheck", { result, exitCodes: SHELLCHECK_EXIT_CODES }, (output) => parseShellcheckOutput(output, ctx.filePath, cwd), { parseStreams: "stdout-else-stderr" });
|
|
10254
10297
|
if (parsed.skipped)
|
|
10255
10298
|
return parsed.skipped;
|
|
10256
10299
|
return finishParsedRun({
|
|
@@ -10377,9 +10420,6 @@ var fish_indent_default = fishIndentRunner;
|
|
|
10377
10420
|
|
|
10378
10421
|
// dist/clients/dispatch/runners/shfmt.js
|
|
10379
10422
|
var shfmt = createAvailabilityChecker("shfmt", ".exe");
|
|
10380
|
-
function hasEditorConfig(cwd) {
|
|
10381
|
-
return findNearestContaining(cwd, [".editorconfig"]) !== void 0;
|
|
10382
|
-
}
|
|
10383
10423
|
var shfmtRunner = {
|
|
10384
10424
|
id: "shfmt",
|
|
10385
10425
|
appliesTo: ["shell"],
|
|
@@ -10432,7 +10472,7 @@ var shfmtRunner = {
|
|
|
10432
10472
|
semantic: "blocking"
|
|
10433
10473
|
});
|
|
10434
10474
|
}
|
|
10435
|
-
if (!
|
|
10475
|
+
if (!hasToolConfig("editorconfig", cwd)) {
|
|
10436
10476
|
return { status: "skipped", diagnostics: [], semantic: "none" };
|
|
10437
10477
|
}
|
|
10438
10478
|
const diffOutput = result.stdout ?? result.stderr ?? "";
|
|
@@ -10467,6 +10507,7 @@ var typos = createAvailabilityChecker("typos", ".exe");
|
|
|
10467
10507
|
var TYPOS_EXIT_CODES = { ran: [2] };
|
|
10468
10508
|
function parseTyposOutput(raw, filePath, cwd) {
|
|
10469
10509
|
const diagnostics = [];
|
|
10510
|
+
let readRecords = 0;
|
|
10470
10511
|
const absTarget = path37.resolve(cwd, filePath);
|
|
10471
10512
|
if (!raw.trim()) {
|
|
10472
10513
|
return diagnostics;
|
|
@@ -10475,6 +10516,8 @@ function parseTyposOutput(raw, filePath, cwd) {
|
|
|
10475
10516
|
for (const line of lines) {
|
|
10476
10517
|
try {
|
|
10477
10518
|
const parsed = JSON.parse(line);
|
|
10519
|
+
if (parsed && typeof parsed === "object")
|
|
10520
|
+
readRecords += 1;
|
|
10478
10521
|
if (!parsed.typo || !parsed.line_num)
|
|
10479
10522
|
continue;
|
|
10480
10523
|
if (parsed.path && !pathsEqual(path37.resolve(cwd, parsed.path), absTarget))
|
|
@@ -10501,7 +10544,7 @@ function parseTyposOutput(raw, filePath, cwd) {
|
|
|
10501
10544
|
void err;
|
|
10502
10545
|
}
|
|
10503
10546
|
}
|
|
10504
|
-
return diagnostics;
|
|
10547
|
+
return diagnostics.length > 0 || readRecords > 0 ? diagnostics : null;
|
|
10505
10548
|
}
|
|
10506
10549
|
var spellcheckRunner = {
|
|
10507
10550
|
id: "spellcheck",
|
|
@@ -10522,13 +10565,13 @@ var spellcheckRunner = {
|
|
|
10522
10565
|
const run = parseToolRun("spellcheck", { result, exitCodes: TYPOS_EXIT_CODES }, (out) => parseTyposOutput(out, ctx.filePath, cwd), { parseOutput: `${result.stdout ?? ""}${result.stderr ?? ""}` });
|
|
10523
10566
|
if (run.skipped)
|
|
10524
10567
|
return run.skipped;
|
|
10525
|
-
|
|
10526
|
-
|
|
10527
|
-
|
|
10528
|
-
|
|
10529
|
-
|
|
10530
|
-
|
|
10531
|
-
semantic: "warning"
|
|
10568
|
+
return finishParsedRun({
|
|
10569
|
+
tool: "spellcheck",
|
|
10570
|
+
ctx,
|
|
10571
|
+
result,
|
|
10572
|
+
diagnostics: run.diagnostics,
|
|
10573
|
+
unreadable: run.unreadable,
|
|
10574
|
+
classify: () => ({ status: "failed", semantic: "warning" })
|
|
10532
10575
|
});
|
|
10533
10576
|
}
|
|
10534
10577
|
};
|
|
@@ -10536,7 +10579,6 @@ var spellcheck_default = spellcheckRunner;
|
|
|
10536
10579
|
|
|
10537
10580
|
// dist/clients/dispatch/runners/sqlfluff.js
|
|
10538
10581
|
import * as path38 from "node:path";
|
|
10539
|
-
var sqlfluff = createAvailabilityChecker("sqlfluff", ".exe");
|
|
10540
10582
|
var SQLFLUFF_EXIT_CODES = { ran: [1] };
|
|
10541
10583
|
var SQLFLUFF_FIXABLE_RULES = /* @__PURE__ */ new Set([
|
|
10542
10584
|
// Layout — pure formatting
|
|
@@ -10634,12 +10676,7 @@ var sqlfluffRunner = {
|
|
|
10634
10676
|
if (!hasConfig) {
|
|
10635
10677
|
logRunnerAdvisoryOnce(ctx, "sqlfluff", cwd, "sqlfluff: no config detected, using ANSI dialect defaults");
|
|
10636
10678
|
}
|
|
10637
|
-
|
|
10638
|
-
if (await sqlfluff.isAvailableAsync(cwd)) {
|
|
10639
|
-
cmd = sqlfluff.getCommand(cwd);
|
|
10640
|
-
} else {
|
|
10641
|
-
cmd = await resolveToolCommandWithInstallFallback(cwd, "sqlfluff");
|
|
10642
|
-
}
|
|
10679
|
+
const cmd = await resolveToolCommandWithInstallFallback(cwd, "sqlfluff");
|
|
10643
10680
|
if (!cmd)
|
|
10644
10681
|
return { status: "skipped", diagnostics: [], semantic: "none" };
|
|
10645
10682
|
const args = ["lint", "--format", "json"];
|
|
@@ -10668,7 +10705,6 @@ var sqlfluff_default = sqlfluffRunner;
|
|
|
10668
10705
|
|
|
10669
10706
|
// dist/clients/dispatch/runners/stylelint.js
|
|
10670
10707
|
import * as path39 from "node:path";
|
|
10671
|
-
var stylelint = createAvailabilityChecker("stylelint", ".cmd");
|
|
10672
10708
|
var STYLELINT_EXIT_CODES = { ran: [1, 2] };
|
|
10673
10709
|
function stylelintReport(stdout, stderr) {
|
|
10674
10710
|
for (const stream of [stdout, stderr]) {
|
|
@@ -10726,7 +10762,7 @@ function parseStylelintJson(raw, filePath, cwd) {
|
|
|
10726
10762
|
line: w.line,
|
|
10727
10763
|
column: w.column,
|
|
10728
10764
|
severity,
|
|
10729
|
-
semantic: severity
|
|
10765
|
+
semantic: semanticFor(severity),
|
|
10730
10766
|
tool: "stylelint",
|
|
10731
10767
|
rule: w.rule,
|
|
10732
10768
|
fixable,
|
|
@@ -10755,12 +10791,7 @@ var stylelintRunner = {
|
|
|
10755
10791
|
if (!hasConfig) {
|
|
10756
10792
|
logRunnerAdvisoryOnce(ctx, "stylelint", cwd, "stylelint: no config detected, running with default rules");
|
|
10757
10793
|
}
|
|
10758
|
-
|
|
10759
|
-
if (await stylelint.isAvailableAsync(cwd)) {
|
|
10760
|
-
cmd = stylelint.getCommand(cwd);
|
|
10761
|
-
} else {
|
|
10762
|
-
cmd = await resolveToolCommandWithInstallFallback(cwd, "stylelint");
|
|
10763
|
-
}
|
|
10794
|
+
const cmd = await resolveToolCommandWithInstallFallback(cwd, "stylelint");
|
|
10764
10795
|
if (!cmd)
|
|
10765
10796
|
return { status: "skipped", diagnostics: [], semantic: "none" };
|
|
10766
10797
|
const result = await safeSpawnAsync(cmd, ["--formatter", "json", ctx.filePath], { timeout: 2e4, cwd });
|
|
@@ -10781,7 +10812,6 @@ var stylelint_default = stylelintRunner;
|
|
|
10781
10812
|
|
|
10782
10813
|
// dist/clients/dispatch/runners/swiftlint.js
|
|
10783
10814
|
import * as path40 from "node:path";
|
|
10784
|
-
var swiftlint = createAvailabilityChecker("swiftlint", ".exe");
|
|
10785
10815
|
var SWIFTLINT_FIXABLE_RULES = /* @__PURE__ */ new Set([
|
|
10786
10816
|
"closing_brace",
|
|
10787
10817
|
"colon",
|
|
@@ -10847,7 +10877,7 @@ function parseSwiftLintOutput(raw, filePath, cwd) {
|
|
|
10847
10877
|
try {
|
|
10848
10878
|
const parsed = JSON.parse(raw);
|
|
10849
10879
|
if (!Array.isArray(parsed))
|
|
10850
|
-
return
|
|
10880
|
+
return null;
|
|
10851
10881
|
for (const item of parsed) {
|
|
10852
10882
|
if (!item.reason)
|
|
10853
10883
|
continue;
|
|
@@ -10868,7 +10898,7 @@ function parseSwiftLintOutput(raw, filePath, cwd) {
|
|
|
10868
10898
|
line: item.line ?? 1,
|
|
10869
10899
|
column: item.character ?? 1,
|
|
10870
10900
|
severity,
|
|
10871
|
-
semantic: severity
|
|
10901
|
+
semantic: semanticFor(severity),
|
|
10872
10902
|
tool: "swiftlint",
|
|
10873
10903
|
rule: ruleId,
|
|
10874
10904
|
defectClass: "style",
|
|
@@ -10877,7 +10907,7 @@ function parseSwiftLintOutput(raw, filePath, cwd) {
|
|
|
10877
10907
|
});
|
|
10878
10908
|
}
|
|
10879
10909
|
} catch {
|
|
10880
|
-
return
|
|
10910
|
+
return null;
|
|
10881
10911
|
}
|
|
10882
10912
|
return diagnostics;
|
|
10883
10913
|
}
|
|
@@ -10888,30 +10918,26 @@ var swiftlintRunner = {
|
|
|
10888
10918
|
skipTestFiles: false,
|
|
10889
10919
|
async run(ctx) {
|
|
10890
10920
|
const cwd = resolveRunnerCwd(ctx, "swiftlint");
|
|
10891
|
-
|
|
10892
|
-
if (await swiftlint.isAvailableAsync(cwd)) {
|
|
10893
|
-
cmd = swiftlint.getCommand(cwd);
|
|
10894
|
-
} else {
|
|
10895
|
-
cmd = await resolveToolCommandWithInstallFallback(cwd, "swiftlint");
|
|
10896
|
-
}
|
|
10921
|
+
const cmd = await resolveToolCommandWithInstallFallback(cwd, "swiftlint");
|
|
10897
10922
|
if (!cmd)
|
|
10898
10923
|
return { status: "skipped", diagnostics: [], semantic: "none" };
|
|
10899
10924
|
const result = await safeSpawnAsync(cmd, ["--reporter", "json", path40.resolve(cwd, ctx.filePath)], { cwd, timeout: 15e3 });
|
|
10900
10925
|
const run = parseToolRun("swiftlint", {
|
|
10901
10926
|
result,
|
|
10902
10927
|
// EXIT TABLE (SwiftLint 0.56 measured fixture): 0 clean; 1 findings; 2 error; other nonzero rejected.
|
|
10928
|
+
// 2 is admitted although it is an error: its output is then read by
|
|
10929
|
+
// the parser, and a run that printed nothing parseable is a parse
|
|
10930
|
+
// error (failed/parser_error), never a clean file (#5411).
|
|
10903
10931
|
exitCodes: { ran: [1, 2] }
|
|
10904
10932
|
}, (out) => parseSwiftLintOutput(out, ctx.filePath, cwd));
|
|
10905
10933
|
if (run.skipped)
|
|
10906
10934
|
return run.skipped;
|
|
10907
|
-
|
|
10908
|
-
|
|
10909
|
-
|
|
10910
|
-
|
|
10911
|
-
|
|
10912
|
-
|
|
10913
|
-
status: hasBlocking ? "failed" : "succeeded",
|
|
10914
|
-
semantic: hasBlocking ? "blocking" : "warning"
|
|
10935
|
+
return finishParsedRun({
|
|
10936
|
+
tool: "swiftlint",
|
|
10937
|
+
ctx,
|
|
10938
|
+
result,
|
|
10939
|
+
diagnostics: run.diagnostics,
|
|
10940
|
+
unreadable: run.unreadable
|
|
10915
10941
|
});
|
|
10916
10942
|
}
|
|
10917
10943
|
};
|
|
@@ -10919,13 +10945,15 @@ var swiftlint_default = swiftlintRunner;
|
|
|
10919
10945
|
|
|
10920
10946
|
// dist/clients/dispatch/runners/taplo.js
|
|
10921
10947
|
import * as path41 from "node:path";
|
|
10922
|
-
var taplo = createAvailabilityChecker("taplo", ".exe");
|
|
10923
10948
|
var TAPLO_EXIT_CODES = { ran: [1] };
|
|
10924
10949
|
var HEADER_PATTERN = /^\s*(error|warning):(.*)$/;
|
|
10925
10950
|
var LOCATION_LEAD = "\u250C\u2500";
|
|
10926
10951
|
var LOCATION_PATTERN = /^\s*┌─\s+(.+?):(\d+):(\d+)$/;
|
|
10927
10952
|
function parseTaploOutput(raw, filePath, cwd) {
|
|
10928
10953
|
const diagnostics = [];
|
|
10954
|
+
let located = 0;
|
|
10955
|
+
if (!raw.trim())
|
|
10956
|
+
return diagnostics;
|
|
10929
10957
|
const absTarget = path41.resolve(cwd, filePath);
|
|
10930
10958
|
const lines = stripAnsi(raw ?? "").split(/\r?\n/);
|
|
10931
10959
|
for (let i = 0; i < lines.length; i++) {
|
|
@@ -10944,6 +10972,7 @@ function parseTaploOutput(raw, filePath, cwd) {
|
|
|
10944
10972
|
const location = LOCATION_PATTERN.exec(lines[j].trimEnd());
|
|
10945
10973
|
if (!location)
|
|
10946
10974
|
continue;
|
|
10975
|
+
located += 1;
|
|
10947
10976
|
if (!pathsEqual(path41.resolve(cwd, location[1].trim()), absTarget))
|
|
10948
10977
|
continue;
|
|
10949
10978
|
line = Number.parseInt(location[2], 10) || 1;
|
|
@@ -10960,13 +10989,13 @@ function parseTaploOutput(raw, filePath, cwd) {
|
|
|
10960
10989
|
line,
|
|
10961
10990
|
column,
|
|
10962
10991
|
severity,
|
|
10963
|
-
semantic: severity
|
|
10992
|
+
semantic: semanticFor(severity),
|
|
10964
10993
|
tool: "taplo",
|
|
10965
10994
|
rule: `taplo/${severity}`,
|
|
10966
10995
|
fixable: false
|
|
10967
10996
|
});
|
|
10968
10997
|
}
|
|
10969
|
-
return diagnostics;
|
|
10998
|
+
return located > 0 ? diagnostics : null;
|
|
10970
10999
|
}
|
|
10971
11000
|
var taploRunner = {
|
|
10972
11001
|
id: "taplo",
|
|
@@ -10998,27 +11027,23 @@ var taploRunner = {
|
|
|
10998
11027
|
}
|
|
10999
11028
|
let cmd = localBinPath(findLocalBinUpwards("taplo", cwd)) ?? null;
|
|
11000
11029
|
if (!cmd) {
|
|
11001
|
-
|
|
11002
|
-
cmd = taplo.getCommand(cwd);
|
|
11003
|
-
} else {
|
|
11004
|
-
cmd = await resolveToolCommandWithInstallFallback(cwd, "taplo");
|
|
11005
|
-
}
|
|
11030
|
+
cmd = await resolveToolCommandWithInstallFallback(cwd, "taplo");
|
|
11006
11031
|
}
|
|
11007
11032
|
if (!cmd)
|
|
11008
11033
|
return { status: "skipped", diagnostics: [], semantic: "none" };
|
|
11009
11034
|
const absPath = path41.resolve(cwd, ctx.filePath);
|
|
11010
11035
|
const result = await safeSpawnAsync(cmd, ["check", "--colors", "never", absPath], { cwd, timeout: 15e3 });
|
|
11011
11036
|
const raw = result.stderr?.trim() ? result.stderr : result.stdout ?? "";
|
|
11012
|
-
const run = parseToolRun("taplo", { result, output: raw, exitCodes: TAPLO_EXIT_CODES }, (out) => parseTaploOutput(out, ctx.filePath, cwd)
|
|
11037
|
+
const run = parseToolRun("taplo", { result, output: raw, exitCodes: TAPLO_EXIT_CODES }, (out) => parseTaploOutput(out, ctx.filePath, cwd));
|
|
11013
11038
|
if (run.skipped)
|
|
11014
11039
|
return run.skipped;
|
|
11015
|
-
|
|
11016
|
-
|
|
11017
|
-
|
|
11018
|
-
|
|
11019
|
-
|
|
11020
|
-
|
|
11021
|
-
semantic: "blocking"
|
|
11040
|
+
return finishParsedRun({
|
|
11041
|
+
tool: "taplo",
|
|
11042
|
+
ctx,
|
|
11043
|
+
result,
|
|
11044
|
+
diagnostics: run.diagnostics,
|
|
11045
|
+
unreadable: run.unreadable,
|
|
11046
|
+
classify: () => ({ status: "failed", semantic: "blocking" })
|
|
11022
11047
|
});
|
|
11023
11048
|
}
|
|
11024
11049
|
};
|
|
@@ -11073,7 +11098,7 @@ function parseTerragruntOutput(raw, filePath, absPath = path42.resolve(filePath)
|
|
|
11073
11098
|
line,
|
|
11074
11099
|
column,
|
|
11075
11100
|
severity,
|
|
11076
|
-
semantic: severity
|
|
11101
|
+
semantic: semanticFor(severity),
|
|
11077
11102
|
tool: "terragrunt",
|
|
11078
11103
|
fixable: false
|
|
11079
11104
|
});
|
|
@@ -11134,13 +11159,6 @@ var terragrunt_default = terragruntRunner;
|
|
|
11134
11159
|
// dist/clients/dispatch/runners/tflint.js
|
|
11135
11160
|
import * as path43 from "node:path";
|
|
11136
11161
|
var tflint = createAvailabilityChecker("tflint", ".exe");
|
|
11137
|
-
var TFLINT_CONFIG = ".tflint.hcl";
|
|
11138
|
-
function findTflintConfig(fileDir) {
|
|
11139
|
-
if (process.env.TFLINT_CONFIG_FILE)
|
|
11140
|
-
return null;
|
|
11141
|
-
const dir = findNearestDirWithAnyBasename(fileDir, [TFLINT_CONFIG]);
|
|
11142
|
-
return dir ? path43.join(dir, TFLINT_CONFIG) : null;
|
|
11143
|
-
}
|
|
11144
11162
|
function parseTflintOutput(raw, filePath, toolCwd) {
|
|
11145
11163
|
try {
|
|
11146
11164
|
const parsed = JSON.parse(raw);
|
|
@@ -11158,7 +11176,7 @@ function parseTflintOutput(raw, filePath, toolCwd) {
|
|
|
11158
11176
|
line: issue.range.start.line,
|
|
11159
11177
|
column: issue.range.start.column,
|
|
11160
11178
|
severity,
|
|
11161
|
-
semantic: severity
|
|
11179
|
+
semantic: semanticFor(severity),
|
|
11162
11180
|
tool: "tflint",
|
|
11163
11181
|
rule: issue.rule.name,
|
|
11164
11182
|
fixable: false
|
|
@@ -11197,7 +11215,7 @@ var tflintRunner = {
|
|
|
11197
11215
|
"--no-color",
|
|
11198
11216
|
`--filter=${path43.basename(absPath)}`
|
|
11199
11217
|
];
|
|
11200
|
-
const configPath =
|
|
11218
|
+
const configPath = process.env.TFLINT_CONFIG_FILE ? void 0 : findToolConfig("tflint", fileDir)?.file;
|
|
11201
11219
|
if (configPath)
|
|
11202
11220
|
args.push(`--config=${configPath}`);
|
|
11203
11221
|
const result = await safeSpawnAsync(cmd, args, {
|
|
@@ -11230,7 +11248,7 @@ var tflintRunner = {
|
|
|
11230
11248
|
var tflint_default = tflintRunner;
|
|
11231
11249
|
|
|
11232
11250
|
// dist/clients/dispatch/runners/trivy-config.js
|
|
11233
|
-
import * as
|
|
11251
|
+
import * as fs13 from "node:fs";
|
|
11234
11252
|
import * as path44 from "node:path";
|
|
11235
11253
|
var trivy2 = createAvailabilityChecker("trivy", ".exe");
|
|
11236
11254
|
function looksLikeKubernetesManifest(content) {
|
|
@@ -11326,7 +11344,7 @@ var trivyConfigRunner = {
|
|
|
11326
11344
|
if (ctx.kind === "yaml" || ctx.kind === "json") {
|
|
11327
11345
|
let content = "";
|
|
11328
11346
|
try {
|
|
11329
|
-
content =
|
|
11347
|
+
content = fs13.readFileSync(absPath, "utf-8");
|
|
11330
11348
|
} catch {
|
|
11331
11349
|
return { status: "skipped", diagnostics: [], semantic: "none" };
|
|
11332
11350
|
}
|
|
@@ -11395,7 +11413,6 @@ var trivy_config_default = trivyConfigRunner;
|
|
|
11395
11413
|
|
|
11396
11414
|
// dist/clients/dispatch/runners/vale.js
|
|
11397
11415
|
import * as path45 from "node:path";
|
|
11398
|
-
var vale = createAvailabilityChecker("vale", ".exe");
|
|
11399
11416
|
function findValeConfig(cwd) {
|
|
11400
11417
|
return findLocalToolConfig(cwd, [".vale.ini"]);
|
|
11401
11418
|
}
|
|
@@ -11406,8 +11423,8 @@ function parseValeOutput(raw, filePath, cwd) {
|
|
|
11406
11423
|
const absTarget = path45.resolve(cwd, filePath);
|
|
11407
11424
|
try {
|
|
11408
11425
|
const parsed = JSON.parse(raw);
|
|
11409
|
-
if (!parsed || typeof parsed !== "object")
|
|
11410
|
-
return
|
|
11426
|
+
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed))
|
|
11427
|
+
return null;
|
|
11411
11428
|
for (const [reported, alerts] of Object.entries(parsed)) {
|
|
11412
11429
|
if (!Array.isArray(alerts))
|
|
11413
11430
|
continue;
|
|
@@ -11430,7 +11447,7 @@ function parseValeOutput(raw, filePath, cwd) {
|
|
|
11430
11447
|
line: alert.Line ?? 1,
|
|
11431
11448
|
column: alert.Span?.[0] ?? 1,
|
|
11432
11449
|
severity,
|
|
11433
|
-
semantic: severity
|
|
11450
|
+
semantic: semanticFor(severity),
|
|
11434
11451
|
tool: "vale",
|
|
11435
11452
|
rule: alert.Check ?? "vale",
|
|
11436
11453
|
fixable: false
|
|
@@ -11438,7 +11455,7 @@ function parseValeOutput(raw, filePath, cwd) {
|
|
|
11438
11455
|
}
|
|
11439
11456
|
}
|
|
11440
11457
|
} catch {
|
|
11441
|
-
return
|
|
11458
|
+
return null;
|
|
11442
11459
|
}
|
|
11443
11460
|
return diagnostics;
|
|
11444
11461
|
}
|
|
@@ -11447,35 +11464,32 @@ var valeRunner = {
|
|
|
11447
11464
|
appliesTo: ["markdown"],
|
|
11448
11465
|
priority: PRIORITY.DOC_QUALITY,
|
|
11449
11466
|
skipTestFiles: false,
|
|
11467
|
+
requiresConfig: (cwd) => findValeConfig(cwd) !== void 0,
|
|
11450
11468
|
async run(ctx) {
|
|
11451
11469
|
const cwd = resolveRunnerCwd(ctx, "vale");
|
|
11452
|
-
if (!
|
|
11470
|
+
if (!valeRunner.requiresConfig?.(cwd)) {
|
|
11453
11471
|
return { status: "skipped", diagnostics: [], semantic: "none" };
|
|
11454
11472
|
}
|
|
11455
|
-
|
|
11456
|
-
if (await vale.isAvailableAsync(cwd)) {
|
|
11457
|
-
cmd = vale.getCommand(cwd);
|
|
11458
|
-
} else {
|
|
11459
|
-
cmd = await resolveToolCommandWithInstallFallback(cwd, "vale");
|
|
11460
|
-
}
|
|
11473
|
+
const cmd = await resolveToolCommandWithInstallFallback(cwd, "vale");
|
|
11461
11474
|
if (!cmd)
|
|
11462
11475
|
return { status: "skipped", diagnostics: [], semantic: "none" };
|
|
11463
11476
|
const result = await safeSpawnAsync(cmd, ["--output", "JSON", ctx.filePath], { cwd, timeout: 15e3 });
|
|
11464
11477
|
const run = parseToolRun("vale", {
|
|
11465
11478
|
result,
|
|
11466
11479
|
// EXIT TABLE (Vale 3.9.6 docs https://vale.sh/docs/topics/metrics/): 0 clean; 1 findings; 2 error; other nonzero rejected.
|
|
11480
|
+
// 2 is admitted although it is an error: its output is then read by
|
|
11481
|
+
// the parser, so a run that printed nothing parseable is a parse
|
|
11482
|
+
// error, never a clean file (#5411).
|
|
11467
11483
|
exitCodes: { ran: [1, 2] }
|
|
11468
11484
|
}, (raw) => parseValeOutput(raw, ctx.filePath, cwd));
|
|
11469
11485
|
if (run.skipped)
|
|
11470
11486
|
return run.skipped;
|
|
11471
|
-
|
|
11472
|
-
|
|
11473
|
-
|
|
11474
|
-
|
|
11475
|
-
|
|
11476
|
-
|
|
11477
|
-
status: hasBlocking ? "failed" : "succeeded",
|
|
11478
|
-
semantic: hasBlocking ? "blocking" : "warning"
|
|
11487
|
+
return finishParsedRun({
|
|
11488
|
+
tool: "vale",
|
|
11489
|
+
ctx,
|
|
11490
|
+
result,
|
|
11491
|
+
diagnostics: run.diagnostics,
|
|
11492
|
+
unreadable: run.unreadable
|
|
11479
11493
|
});
|
|
11480
11494
|
}
|
|
11481
11495
|
};
|
|
@@ -11485,7 +11499,7 @@ var vale_default = valeRunner;
|
|
|
11485
11499
|
import * as path47 from "node:path";
|
|
11486
11500
|
|
|
11487
11501
|
// dist/clients/cache/rule-cache.js
|
|
11488
|
-
import * as
|
|
11502
|
+
import * as fs14 from "node:fs";
|
|
11489
11503
|
import * as path46 from "node:path";
|
|
11490
11504
|
var CACHE_VERSION = "v7";
|
|
11491
11505
|
function reportBundledRulesRootHealth() {
|
|
@@ -11502,8 +11516,8 @@ var RuleCache = class {
|
|
|
11502
11516
|
this.cacheFile = path46.join(this.cacheDir, `${language}-rules-${CACHE_VERSION}.json`);
|
|
11503
11517
|
}
|
|
11504
11518
|
ensureCacheDir() {
|
|
11505
|
-
if (!
|
|
11506
|
-
|
|
11519
|
+
if (!fs14.existsSync(this.cacheDir)) {
|
|
11520
|
+
fs14.mkdirSync(this.cacheDir, { recursive: true });
|
|
11507
11521
|
}
|
|
11508
11522
|
}
|
|
11509
11523
|
computeRuleHash(ruleFiles) {
|
|
@@ -11512,7 +11526,7 @@ var RuleCache = class {
|
|
|
11512
11526
|
get(ruleFiles) {
|
|
11513
11527
|
try {
|
|
11514
11528
|
this.ensureCacheDir();
|
|
11515
|
-
if (!
|
|
11529
|
+
if (!fs14.existsSync(this.cacheFile))
|
|
11516
11530
|
return null;
|
|
11517
11531
|
const currentHash = this.computeRuleHash(ruleFiles);
|
|
11518
11532
|
const cached = readJsonCache(this.cacheFile, (parsed) => {
|
|
@@ -11550,7 +11564,7 @@ var RuleCache = class {
|
|
|
11550
11564
|
const pattern = new RegExp(`^${this.language}-rules-v\\d+\\.json$`);
|
|
11551
11565
|
let dirents;
|
|
11552
11566
|
try {
|
|
11553
|
-
dirents =
|
|
11567
|
+
dirents = fs14.readdirSync(this.cacheDir);
|
|
11554
11568
|
} catch {
|
|
11555
11569
|
return;
|
|
11556
11570
|
}
|
|
@@ -11558,15 +11572,15 @@ var RuleCache = class {
|
|
|
11558
11572
|
if (name === currentName || !pattern.test(name))
|
|
11559
11573
|
continue;
|
|
11560
11574
|
try {
|
|
11561
|
-
|
|
11575
|
+
fs14.unlinkSync(path46.join(this.cacheDir, name));
|
|
11562
11576
|
} catch {
|
|
11563
11577
|
}
|
|
11564
11578
|
}
|
|
11565
11579
|
}
|
|
11566
11580
|
clear() {
|
|
11567
11581
|
try {
|
|
11568
|
-
if (
|
|
11569
|
-
|
|
11582
|
+
if (fs14.existsSync(this.cacheFile)) {
|
|
11583
|
+
fs14.unlinkSync(this.cacheFile);
|
|
11570
11584
|
}
|
|
11571
11585
|
} catch {
|
|
11572
11586
|
}
|
|
@@ -11968,7 +11982,7 @@ var treeSitterRunner = {
|
|
|
11968
11982
|
const isSeverityBlocking = query.severity === "error" || query.inline_tier === "blocking" || SILENT_ERROR_QUERY_IDS.has(query.id);
|
|
11969
11983
|
const endLine = line + (match.matchedText.match(/\n/g)?.length ?? 0);
|
|
11970
11984
|
const outOfScope = ctx.blockingOnly && isSeverityBlocking && !spanOverlapsModifiedRanges(line, endLine, ctx.modifiedRanges);
|
|
11971
|
-
const semantic = query.severity
|
|
11985
|
+
const semantic = semanticFor(query.severity);
|
|
11972
11986
|
const defectClass = query.defect_class ?? classifyDefect(query.id, "tree-sitter", query.message);
|
|
11973
11987
|
const suggestion = query.has_fix && query.fix_action ? `${query.fix_action} this statement` : semantic === "blocking" ? defaultFixSuggestion2(defectClass, query.id) : void 0;
|
|
11974
11988
|
const hasSuggestedFix = !!query.has_fix;
|
|
@@ -12115,7 +12129,6 @@ var tree_sitter_default = treeSitterRunner;
|
|
|
12115
12129
|
|
|
12116
12130
|
// dist/clients/dispatch/runners/yamllint.js
|
|
12117
12131
|
import * as path48 from "node:path";
|
|
12118
|
-
var yamllint = createAvailabilityChecker("yamllint", ".exe");
|
|
12119
12132
|
function parseYamllintParsable(raw, filePath, cwd) {
|
|
12120
12133
|
const diagnostics = [];
|
|
12121
12134
|
const absTarget = path48.resolve(cwd, filePath);
|
|
@@ -12135,7 +12148,7 @@ function parseYamllintParsable(raw, filePath, cwd) {
|
|
|
12135
12148
|
line: Number(match[2]),
|
|
12136
12149
|
column: Number(match[3]),
|
|
12137
12150
|
severity,
|
|
12138
|
-
semantic: severity
|
|
12151
|
+
semantic: semanticFor(severity),
|
|
12139
12152
|
tool: "yamllint",
|
|
12140
12153
|
rule: match[6]
|
|
12141
12154
|
});
|
|
@@ -12157,12 +12170,7 @@ var yamllintRunner = {
|
|
|
12157
12170
|
if (!hasConfig) {
|
|
12158
12171
|
logRunnerAdvisoryOnce(ctx, "yamllint", cwd, "yamllint: no config detected, running with default rules");
|
|
12159
12172
|
}
|
|
12160
|
-
|
|
12161
|
-
if (await yamllint.isAvailableAsync(cwd)) {
|
|
12162
|
-
cmd = yamllint.getCommand(cwd);
|
|
12163
|
-
} else {
|
|
12164
|
-
cmd = await resolveToolCommandWithInstallFallback(cwd, "yamllint");
|
|
12165
|
-
}
|
|
12173
|
+
const cmd = await resolveToolCommandWithInstallFallback(cwd, "yamllint");
|
|
12166
12174
|
if (!cmd)
|
|
12167
12175
|
return { status: "skipped", diagnostics: [], semantic: "none" };
|
|
12168
12176
|
const result = await safeSpawnAsync(cmd, ["-f", "parsable", ctx.filePath], {
|
|
@@ -13214,14 +13222,14 @@ async function dispatchLintWithResult(filePath, cwd, pi, modifiedRanges, logCont
|
|
|
13214
13222
|
sessionFacts.endDispatchFor(ctx.filePath);
|
|
13215
13223
|
}
|
|
13216
13224
|
}
|
|
13217
|
-
async function getAvailableRunners(filePath) {
|
|
13225
|
+
async function getAvailableRunners(filePath, options = {}) {
|
|
13218
13226
|
const kind = detectFileKind(filePath);
|
|
13219
13227
|
if (!kind)
|
|
13220
13228
|
return [];
|
|
13221
13229
|
const normalizedPath = toPosix(filePath);
|
|
13222
13230
|
const pathForFilter = normalizedPath.startsWith("/") ? normalizedPath : `/${normalizedPath}`;
|
|
13223
|
-
const
|
|
13224
|
-
return
|
|
13231
|
+
const { configCwd } = options;
|
|
13232
|
+
return sessionRunnerRegistry.getForKind(kind, pathForFilter).flatMap((r) => configCwd && r.requiresConfig?.(configCwd(r.id)) === false ? [] : [r.id]);
|
|
13225
13233
|
}
|
|
13226
13234
|
|
|
13227
13235
|
// dist/clients/mcp/host-shim.js
|
|
@@ -13400,7 +13408,7 @@ async function warmLspForFile(absPath, host) {
|
|
|
13400
13408
|
return;
|
|
13401
13409
|
let content;
|
|
13402
13410
|
try {
|
|
13403
|
-
content =
|
|
13411
|
+
content = fs15.readFileSync(absPath, "utf8");
|
|
13404
13412
|
} catch {
|
|
13405
13413
|
return;
|
|
13406
13414
|
}
|
|
@@ -13449,7 +13457,7 @@ async function analyzeFile(filePath, cwd, options = {}) {
|
|
|
13449
13457
|
void 0,
|
|
13450
13458
|
observedAt,
|
|
13451
13459
|
// #5258: the footer reads the same verdict the dispatch gave.
|
|
13452
|
-
|
|
13460
|
+
recordedUnchecked(result.verdict)
|
|
13453
13461
|
);
|
|
13454
13462
|
if (result.diagnostics.length > 0) {
|
|
13455
13463
|
getDiagnosticTracker().trackShown(result.diagnostics);
|
|
@@ -13457,7 +13465,7 @@ async function analyzeFile(filePath, cwd, options = {}) {
|
|
|
13457
13465
|
}
|
|
13458
13466
|
if (options.registerTurnState) {
|
|
13459
13467
|
try {
|
|
13460
|
-
const lineCount =
|
|
13468
|
+
const lineCount = fs15.readFileSync(absPath, "utf8").split("\n").length;
|
|
13461
13469
|
new CacheManager().addModifiedRange(absPath, { start: 1, end: lineCount }, true, cwd, options.ownerId ?? MCP_TURN_STATE_OWNER_ID, "mcp");
|
|
13462
13470
|
} catch {
|
|
13463
13471
|
}
|
|
@@ -13475,7 +13483,7 @@ async function analyzeFile(filePath, cwd, options = {}) {
|
|
|
13475
13483
|
try {
|
|
13476
13484
|
if (warmIndex) {
|
|
13477
13485
|
try {
|
|
13478
|
-
const content =
|
|
13486
|
+
const content = fs15.readFileSync(absPath, "utf8");
|
|
13479
13487
|
if (!canWriteAnalysisRoot(analysisRootMode)) {
|
|
13480
13488
|
emitBounded("adopted_root_writer_skipped", `${absPath}:word-index`, {
|
|
13481
13489
|
filePath: absPath,
|
|
@@ -13525,6 +13533,7 @@ async function analyzeFile(filePath, cwd, options = {}) {
|
|
|
13525
13533
|
fileKind: latencyReport?.fileKind,
|
|
13526
13534
|
durationMs,
|
|
13527
13535
|
hasBlockers: result.hasBlockers,
|
|
13536
|
+
verdict: result.verdict,
|
|
13528
13537
|
counts: {
|
|
13529
13538
|
diagnostics: listedDiagnostics.length,
|
|
13530
13539
|
blockers: result.blockers.length,
|
|
@@ -13558,7 +13567,7 @@ export {
|
|
|
13558
13567
|
CacheManager,
|
|
13559
13568
|
getDiagnosticTracker,
|
|
13560
13569
|
normalizeRuleId,
|
|
13561
|
-
|
|
13570
|
+
findingClassKey,
|
|
13562
13571
|
applyRulePolicy,
|
|
13563
13572
|
convertLspDiagnostics,
|
|
13564
13573
|
applyFindingPolicy,
|