@staff0rd/assist 0.132.0 → 0.133.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/index.js +17 -15
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -117,6 +117,7 @@ After installation, the `assist` command will be available globally. You can als
|
|
|
117
117
|
- `assist dotnet inspect [sln] --scope all` - Inspect the full solution
|
|
118
118
|
- `assist dotnet inspect [sln] --scope base:<ref>` - Inspect all .cs files changed since diverging from a base ref (e.g. `--scope base:main` for a full PR)
|
|
119
119
|
- `assist dotnet inspect [sln] --scope commit:<ref>` - Inspect .cs files changed in a specific commit
|
|
120
|
+
- `assist dotnet inspect [sln] --only <ids...>` - Show only the specified issue type IDs (e.g. `--only CommentedCode`)
|
|
120
121
|
- `assist dotnet inspect [sln] --suppress <ids...>` - Suppress specific issue type IDs on the command line
|
|
121
122
|
- `assist dotnet inspect [sln] --roslyn` - Use Roslyn analyzers via msbuild instead of JetBrains
|
|
122
123
|
- `assist dotnet inspect [sln] --swea` - Enable solution-wide error analysis (slower but more thorough)
|
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { Command } from "commander";
|
|
|
6
6
|
// package.json
|
|
7
7
|
var package_default = {
|
|
8
8
|
name: "@staff0rd/assist",
|
|
9
|
-
version: "0.
|
|
9
|
+
version: "0.133.0",
|
|
10
10
|
type: "module",
|
|
11
11
|
main: "dist/index.js",
|
|
12
12
|
bin: {
|
|
@@ -4839,13 +4839,14 @@ var deadCodeRules = /* @__PURE__ */ new Set([
|
|
|
4839
4839
|
]);
|
|
4840
4840
|
|
|
4841
4841
|
// src/commands/dotnet/filterIssues.ts
|
|
4842
|
-
function filterIssues(issues, all, cliSuppress) {
|
|
4842
|
+
function filterIssues(issues, all, cliOnly, cliSuppress) {
|
|
4843
|
+
const only = cliOnly.length > 0 ? new Set(cliOnly) : null;
|
|
4843
4844
|
const suppress = /* @__PURE__ */ new Set([
|
|
4844
4845
|
...loadConfig().dotnet?.inspect.suppress ?? [],
|
|
4845
4846
|
...cliSuppress
|
|
4846
4847
|
]);
|
|
4847
4848
|
return issues.filter(
|
|
4848
|
-
(i) => (all || deadCodeRules.has(i.typeId)) && !suppress.has(i.typeId)
|
|
4849
|
+
(i) => (only ? only.has(i.typeId) : all || deadCodeRules.has(i.typeId)) && !suppress.has(i.typeId)
|
|
4849
4850
|
);
|
|
4850
4851
|
}
|
|
4851
4852
|
|
|
@@ -5031,6 +5032,15 @@ function runEngine(resolved, changedFiles, options2) {
|
|
|
5031
5032
|
}
|
|
5032
5033
|
|
|
5033
5034
|
// src/commands/dotnet/inspect.ts
|
|
5035
|
+
function logScope(changedFiles) {
|
|
5036
|
+
if (changedFiles === null) {
|
|
5037
|
+
console.log(chalk57.dim("Inspecting full solution..."));
|
|
5038
|
+
} else {
|
|
5039
|
+
console.log(
|
|
5040
|
+
chalk57.dim(`Inspecting ${changedFiles.length} changed file(s)...`)
|
|
5041
|
+
);
|
|
5042
|
+
}
|
|
5043
|
+
}
|
|
5034
5044
|
function reportResults(issues, elapsed) {
|
|
5035
5045
|
if (issues.length > 0) displayIssues(issues);
|
|
5036
5046
|
else console.log(chalk57.green("No issues found"));
|
|
@@ -5048,20 +5058,12 @@ async function inspect(sln, options2) {
|
|
|
5048
5058
|
console.log(chalk57.green("No changed .cs files found"));
|
|
5049
5059
|
return;
|
|
5050
5060
|
}
|
|
5051
|
-
|
|
5052
|
-
console.log(chalk57.dim("Inspecting full solution..."));
|
|
5053
|
-
} else {
|
|
5054
|
-
console.log(
|
|
5055
|
-
chalk57.dim(`Inspecting ${changedFiles.length} changed file(s)...`)
|
|
5056
|
-
);
|
|
5057
|
-
}
|
|
5061
|
+
logScope(changedFiles);
|
|
5058
5062
|
const start3 = Date.now();
|
|
5059
5063
|
const issues = runEngine(resolved, changedFiles, options2);
|
|
5060
5064
|
const elapsed = Date.now() - start3;
|
|
5061
|
-
|
|
5062
|
-
|
|
5063
|
-
elapsed
|
|
5064
|
-
);
|
|
5065
|
+
const { all = false, only = [], suppress = [] } = options2;
|
|
5066
|
+
reportResults(filterIssues(issues, all, only, suppress), elapsed);
|
|
5065
5067
|
}
|
|
5066
5068
|
|
|
5067
5069
|
// src/commands/registerDotnet.ts
|
|
@@ -5072,7 +5074,7 @@ function registerDotnet(program2) {
|
|
|
5072
5074
|
).argument("[sln]", "Path to a .sln file (auto-detected if omitted)").option(
|
|
5073
5075
|
"--scope <mode>",
|
|
5074
5076
|
`File scope: ${scopeHelpText} (default: working copy diff)`
|
|
5075
|
-
).option("--all", "Show all issues, not just dead code").option("--suppress <ids...>", "Suppress specific issue type IDs").option("--swea", "Enable solution-wide error analysis").option("--roslyn", "Use Roslyn analyzers via msbuild instead of JetBrains").action(inspect);
|
|
5077
|
+
).option("--all", "Show all issues, not just dead code").option("--only <ids...>", "Show only the specified issue type IDs").option("--suppress <ids...>", "Suppress specific issue type IDs").option("--swea", "Enable solution-wide error analysis").option("--roslyn", "Use Roslyn analyzers via msbuild instead of JetBrains").action(inspect);
|
|
5076
5078
|
cmd.command("check-locks").description("Check if build output files are locked by a debugger").action(checkBuildLocksCommand);
|
|
5077
5079
|
cmd.command("deps").description("Show .csproj project dependency tree and solution membership").argument("<csproj>", "Path to a .csproj file").option("--json", "Output as JSON").action(deps);
|
|
5078
5080
|
cmd.command("in-sln").description("Check whether a .csproj is referenced by any .sln file").argument("<csproj>", "Path to a .csproj file").action(inSln);
|