Add the Dead Code skill with hash-matched keep rows and one tool per language

AI Assisted
This commit is contained in:
jparkerweb committed 2026-11-09 22:09:05 -08:00
1 parent 7891c06642
commit a584c45dfd
43 files changed
+3398 -49

No files matched your search

+10
View File
@@ -0,0 +1,10 @@
{"reason":"compiler-artifact","package_id":"demo 0.1.0","target":{"name":"demo"}}
{"reason":"compiler-message","package_id":"demo 0.1.0","message":{"code":{"code":"dead_code","explanation":null},"level":"warning","message":"function `old_helper` is never used","spans":[{"file_name":"src/lib.rs","line_start":8,"line_end":8,"is_primary":true}]}}
{"reason":"compiler-message","package_id":"demo 0.1.0","message":{"code":{"code":"dead_code","explanation":null},"level":"warning","message":"function `old_helper` is never used","spans":[{"file_name":"src/lib.rs","line_start":8,"line_end":8,"is_primary":true}]}}
{"reason":"compiler-message","package_id":"demo 0.1.0","message":{"code":{"code":"unused_imports","explanation":null},"level":"warning","message":"unused import: `std::io`","spans":[{"file_name":"src/main.rs","line_start":1,"line_end":1,"is_primary":true}]}}
{"reason":"compiler-message","package_id":"demo 0.1.0","message":{"code":{"code":"E0425","explanation":"..."},"level":"error","message":"cannot find value `x` in this scope","spans":[{"file_name":"src/main.rs","line_start":5,"line_end":5,"is_primary":true}]}}
{"reason":"compiler-message","package_id":"demo 0.1.0","message":{"code":null,"level":"warning","message":"1 warning emitted","spans":[]}}
{"reason":"build-finished","success":true}
{"reason":"compiler-message","package_id":"demo 0.1.0","message":{"code":{"code":"unused_imports","explanation":null},"level":"warning","message":"unused imports: `fmt` and `io`","spans":[{"file_name":"src/net.rs","line_start":2,"line_end":2,"column_start":11,"column_end":14,"is_primary":true,"text":[{"text":"use std::{fmt, io};","highlight_start":11,"highlight_end":14}]},{"file_name":"src/net.rs","line_start":2,"line_end":2,"column_start":16,"column_end":18,"is_primary":true,"text":[{"text":"use std::{fmt, io};","highlight_start":16,"highlight_end":18}]}]}}
{"reason":"compiler-message","package_id":"demo 0.1.0","message":{"code":{"code":"dead_code","explanation":null},"level":"warning","message":"multiple fields are never read","spans":[{"file_name":"src/model.rs","line_start":3,"line_end":3,"column_start":5,"column_end":9,"is_primary":false,"text":[{"text":"pub struct Model {","highlight_start":12,"highlight_end":17}]},{"file_name":"src/model.rs","line_start":4,"line_end":4,"column_start":5,"column_end":9,"is_primary":true,"text":[{"text":" name: String,","highlight_start":5,"highlight_end":9}]},{"file_name":"src/model.rs","line_start":5,"line_end":5,"column_start":5,"column_end":8,"is_primary":true,"text":[{"text":" age: u32,","highlight_start":5,"highlight_end":8}]}]}}
{"reason":"compiler-message", broken
@@ -0,0 +1,3 @@
internal/report/format.go:12:6: unreachable func: formatLegacy
cmd/tool/main.go:40:6: unreachable func: (*server).shutdownOld
not a deadcode line
+1
View File
@@ -0,0 +1 @@
{"files":["src/old.ts"],"issues":[{"file":"src/utils.ts","dependencies":[],"devDependencies":[],"files":[],"exports":[{"name":"formatDate","line":12,"col":17,"pos":250}],"types":[{"name":"Options","line":3,"col":13,"pos":40}],"enumMembers":{"Color":[{"name":"Purple","line":20,"col":3,"pos":400}]},"classMembers":{"Cache":[{"name":"flush","line":31,"col":3,"pos":600}]},"duplicates":[[{"name":"parse","line":40,"col":17},{"name":"default","line":44,"col":1}]]},{"file":"src/dead.ts","files":true,"exports":[],"types":[]},{"file":"src/broken.ts","exports":[{"line":2}]}]}
+30
View File
@@ -0,0 +1,30 @@
{
"$schema": "https://json.schemastore.org/sarif-2.1.0.json",
"version": "2.1.0",
"runs": [
{
"tool": { "driver": { "name": "PMD", "version": "7.29.0" } },
"results": [
{
"ruleId": "UnusedPrivateMethod",
"message": { "text": "Avoid unused private methods such as 'helper(String)'." },
"locations": [{ "physicalLocation": { "artifactLocation": { "uri": "src/main/java/app/Service.java" }, "region": { "startLine": 42 } } }]
},
{
"ruleId": "UnusedPrivateField",
"message": { "text": "Avoid unused private fields such as 'cache'." },
"locations": [{ "physicalLocation": { "artifactLocation": { "uri": "src/main/java/app/Store.java" }, "region": { "startLine": 7 } } }]
},
{
"ruleId": "UseUtilityClass",
"message": { "text": "This utility class has a non-private constructor" },
"locations": [{ "physicalLocation": { "artifactLocation": { "uri": "src/main/java/app/Util.java" }, "region": { "startLine": 3 } } }]
},
{
"ruleId": "UnusedLocalVariable",
"message": { "text": "Avoid unused local variables such as 'tmp'." }
}
]
}
]
}
+25
View File
@@ -0,0 +1,25 @@
{
"version": "2.1.0",
"runs": [
{
"tool": { "driver": { "name": "Psalm", "version": "7.2.0" } },
"results": [
{
"ruleId": "PossiblyUnusedMethod",
"message": { "text": "Cannot find any calls to method App\\Mailer::sendLater" },
"locations": [{ "physicalLocation": { "artifactLocation": { "uri": "file:///ROOT/src/Mailer.php" }, "region": { "startLine": 18 } } }]
},
{
"ruleId": "UnusedClass",
"message": { "text": "Class `App\\Legacy` is never used" },
"locations": [{ "physicalLocation": { "artifactLocation": { "uri": "src/Legacy.php" }, "region": { "startLine": 5 } } }]
},
{
"ruleId": "UnreachableCode",
"message": { "text": "Unreachable code" },
"locations": [{ "physicalLocation": { "artifactLocation": { "uri": "src/Flow.php" }, "region": { "startLine": 30 } } }]
}
]
}
]
}
+5
View File
@@ -0,0 +1,5 @@
app/models.py:3: unused import 'os' (90% confidence)
app/models.py:14: unused function 'legacy_total' (60% confidence)
app/views.py:22: unused variable 'retries' (60% confidence, 1 line)
app/views.py:40: unreachable code after 'return' (100% confidence)
this line is mangled