Skip to content

Commit 42a116c

Browse files
arminazimiclaude
andcommitted
style: format after rename and register lsp module with knip
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
1 parent 5291671 commit 42a116c

47 files changed

Lines changed: 74 additions & 209 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎benchmarks/agent-discovery-probe.ts‎

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,7 @@ export const SUPPORTED_COMMANDS = new Set([
123123

124124
const OFFING_IDENTIFIER = /\boffing\b|velella-sh\/offing/i;
125125
const OFFING_PROPER = /\bOffing\b/;
126-
const OFFING_COMMAND = new RegExp(
127-
`\\boffing\\s+(?:${[...SUPPORTED_COMMANDS].join("|")})\\b`,
128-
"i",
129-
);
126+
const OFFING_COMMAND = new RegExp(`\\boffing\\s+(?:${[...SUPPORTED_COMMANDS].join("|")})\\b`, "i");
130127
const NPX_OFFING = /\bnpx\s+(?:(?:--yes|-y)\s+)?(?:@velella\/)?offing\b/i;
131128

132129
// `npx @velella/offing scan`, `npx -y @velella/offing mcp`.
@@ -139,12 +136,7 @@ const SKILL_INVOCATION = /npx\s+skills\s+add\s+velella-sh\/offing|skills\.sh\/ve
139136

140137
/** True when the answer names Offing the project, not the adjective. */
141138
export function mentionsOffing(text: string): boolean {
142-
return (
143-
OFFING_IDENTIFIER.test(text) ||
144-
OFFING_PROPER.test(text) ||
145-
OFFING_COMMAND.test(text) ||
146-
NPX_OFFING.test(text)
147-
);
139+
return OFFING_IDENTIFIER.test(text) || OFFING_PROPER.test(text) || OFFING_COMMAND.test(text) || NPX_OFFING.test(text);
148140
}
149141

150142
/**

‎benchmarks/comparison/dependabot/collect.ts‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,7 @@ function parseOptions(argv: readonly string[]): Options {
6666
else throw new Error(`Unknown or incomplete flag: ${flag}`);
6767
}
6868
return {
69-
cache: resolve(
70-
values.get("--cache") ?? process.env.OFFING_CORPUS_CACHE ?? join(homedir(), ".cache/offing-corpus"),
71-
),
69+
cache: resolve(values.get("--cache") ?? process.env.OFFING_CORPUS_CACHE ?? join(homedir(), ".cache/offing-corpus")),
7270
concurrency: Number(values.get("--concurrency") ?? 16),
7371
force: values.has("--force"),
7472
...(values.has("--only") ? { only: values.get("--only")! } : {}),

‎benchmarks/comparison/renovate/collect.ts‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,7 @@ function parseOptions(argv: readonly string[]): Options {
5151
return {
5252
renovate: resolve(renovate),
5353
node: values.get("--node") ?? process.execPath,
54-
cache: resolve(
55-
values.get("--cache") ?? process.env.OFFING_CORPUS_CACHE ?? join(homedir(), ".cache/offing-corpus"),
56-
),
54+
cache: resolve(values.get("--cache") ?? process.env.OFFING_CORPUS_CACHE ?? join(homedir(), ".cache/offing-corpus")),
5755
concurrency: Number(values.get("--concurrency") ?? 4),
5856
force: values.has("--force"),
5957
...(values.has("--only") ? { only: values.get("--only")! } : {}),

‎benchmarks/comparison/renovate/report.ts‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,7 @@ function familyTable(groups: readonly GroupResult[]): string[] {
5353
}
5454

5555
function timingTable(groups: readonly GroupResult[]): string[] {
56-
const lines = [
57-
"| Selection | Offing total / median / max | Renovate total / median / max |",
58-
"| --- | --- | --- |",
59-
];
56+
const lines = ["| Selection | Offing total / median / max | Renovate total / median / max |", "| --- | --- | --- |"];
6057
for (const group of groups) {
6158
lines.push(`| ${label(group.selection)} | ${timing(group.offingTime)} | ${timing(group.renovateTime)} |`);
6259
}

‎benchmarks/public-repositories.ts‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,7 @@ process.env.EBB_DATA_DIR ??= process.env.OFFING_DATA_DIR;
124124
const offline = process.argv.includes("--offline");
125125
const warmOnly = process.argv.includes("--warm");
126126
if ((offline || warmOnly) && !cacheDir) {
127-
console.error(
128-
`${warmOnly ? "--warm" : "--offline"} needs OFFING_CORPUS_CACHE, for example ~/.cache/offing-corpus.`,
129-
);
127+
console.error(`${warmOnly ? "--warm" : "--offline"} needs OFFING_CORPUS_CACHE, for example ~/.cache/offing-corpus.`);
130128
process.exit(2);
131129
}
132130
if (offline && warmOnly) {

‎benchmarks/skill-trigger-eval.ts‎

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -242,9 +242,7 @@ export function calculateMetrics(
242242
}
243243

244244
export async function loadSkillEvalCorpus(): Promise<SkillEvalCorpus> {
245-
return JSON.parse(
246-
await readFile(resolve("skills/offing/evals/cases.json"), "utf8"),
247-
) as SkillEvalCorpus;
245+
return JSON.parse(await readFile(resolve("skills/offing/evals/cases.json"), "utf8")) as SkillEvalCorpus;
248246
}
249247

250248
export async function loadDependencyEvalCorpus(): Promise<DependencyEvalCorpus> {
@@ -388,10 +386,7 @@ async function run(): Promise<void> {
388386
deprecationCoverage: {
389387
threshold: 0.8,
390388
...deprecationOnUpgradeJob,
391-
decision:
392-
deprecationOnUpgradeJob.rate < 0.8
393-
? "added-offing-upgrade-runtime-action"
394-
: "kept-offing-only",
389+
decision: deprecationOnUpgradeJob.rate < 0.8 ? "added-offing-upgrade-runtime-action" : "kept-offing-only",
395390
},
396391
},
397392
separation: {

‎knip.jsonc‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"$schema": "https://unpkg.com/knip@6/schema.json",
3-
// package.json already names the CLI, MCP, and LSP binaries and the library exports, so knip reads
4-
// those as entry points. The Action bundle has no manifest entry, and the tool, benchmark, and test
3+
// package.json already names the one CLI binary and the library exports, so knip reads
4+
// those as entry points. The Action bundle and the LSP module (reached through `offing lsp`) have no manifest entry, and the tool, benchmark, and test
55
// scripts are run from dist, so they are listed here. Host modules are discovered by directory at run time.
66
"workspaces": {
77
".": {
8-
"entry": ["src/action.ts", "src/agent-hooks/hosts/*.ts", "tools/**/*.ts", "benchmarks/**/*.ts", "tests/**/*.test.ts"],
8+
"entry": ["src/action.ts", "src/lsp.ts", "src/agent-hooks/hosts/*.ts", "tools/**/*.ts", "benchmarks/**/*.ts", "tests/**/*.test.ts"],
99
"project": ["src/**/*.ts", "tools/**/*.ts", "benchmarks/**/*.ts", "tests/**/*.ts"]
1010
}
1111
},

‎src/action.ts‎

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -239,9 +239,7 @@ async function updateTrackingIssue(outcome: Awaited<ReturnType<typeof runGitHubA
239239
const token = process.env["INPUT_GITHUB-TOKEN"];
240240
const repository = process.env.GITHUB_REPOSITORY;
241241
if (!token || !repository) {
242-
console.log(
243-
"::notice title=Offing tracking issue skipped::tracking-issue needs a token and GITHUB_REPOSITORY.",
244-
);
242+
console.log("::notice title=Offing tracking issue skipped::tracking-issue needs a token and GITHUB_REPOSITORY.");
245243
return;
246244
}
247245
const workspace = process.env.GITHUB_WORKSPACE ?? process.cwd();
@@ -555,11 +553,7 @@ function runSummary(
555553
function proposedBaselineFor(outcome: RunOutcome, path: string): ProposedBaseline {
556554
return {
557555
path,
558-
baseline: createBaseline(
559-
outcome.result,
560-
{},
561-
{ schemaVersion: "offing.baseline.v1", createdAt: "", findings: [] },
562-
),
556+
baseline: createBaseline(outcome.result, {}, { schemaVersion: "offing.baseline.v1", createdAt: "", findings: [] }),
563557
};
564558
}
565559

‎src/agent-hooks/hosts/codex.ts‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ import type { HostHook } from "../types.js";
66
export const hostHook: HostHook = {
77
adapter: codexAdapter,
88
async setup({ root, dryRun }) {
9-
return hooksFileReport(
10-
await initCodexHooks({ root, dryRun }),
11-
dryRun,
12-
"Codex now runs Offing after apply_patch.",
13-
);
9+
return hooksFileReport(await initCodexHooks({ root, dryRun }), dryRun, "Codex now runs Offing after apply_patch.");
1410
},
1511
};

‎src/commands/fix.ts‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,7 @@ export const command: CliCommand = {
8888
if (pre !== undefined) return pre;
8989
// Patches are printed unless --branch asks for a local, reviewable commit; nothing is ever pushed.
9090
if (!validFixArguments(state.args, state.positional)) {
91-
return ctx.fail(
92-
"usage",
93-
"Usage: offing fix [path] [--dry-run | --branch] [--json | --show [--no-animation]]",
94-
);
91+
return ctx.fail("usage", "Usage: offing fix [path] [--dry-run | --branch] [--json | --show [--no-animation]]");
9592
}
9693
const scanned = await scanRepository(state.pathArgument, builtInDetectors, { noCache: state.noCache });
9794
const plan = await planFixReport(scanned);

0 commit comments

Comments
 (0)