Skip to content

chore(lint): enable zero-dependency unused code checks for Go and Web - #1274

Merged
kyasbal merged 1 commit into
mainfrom
push-qvnlqzwootnz
Nov 18, 2026
Merged

kyasbal merged 1 commit into
mainfrom
push-qvnlqzwootnz

Conversation

@kyasbal

@kyasbal kyasbal commented Nov 17, 2026

Copy link
Copy Markdown
Member

Summary

Enable built-in unused-code checks across existing Go and TypeScript toolchains that require no new dependencies, and clean up the resulting violations.

On the Go side, .golangci.yaml previously excluded iface and govet from _test.go files, allowing unused call results in test assertions to go unnoticed. On the frontend side, tsconfig.json and eslint.config.mjs did not enforce noUnusedLocals, noUnusedParameters, Angular's unusedStandaloneImports and unusedLetDeclaration extended diagnostics, or @typescript-eslint/no-useless-empty-export. Enabling these checks catches dead local bindings, unused parameters, and redundant component imports during standard compilation and linting.

@kyasbal
kyasbal requested a review from RyuSA as a code owner November 17, 2026 05:33
@kyasbal kyasbal added the area:backend-core Core backend frameworks, DAG task runner, and server API label Nov 17, 2026
@kyasbal
kyasbal requested a review from jyane as a code owner November 17, 2026 05:33
@kyasbal kyasbal added area:frontend Web frontend application and UI components area:devenv Development environment, Makefile, and build tooling labels Nov 17, 2026
@kyasbal
kyasbal requested a review from kkuchima as a code owner November 17, 2026 05:33
@kyasbal kyasbal added the type:chore Maintenance, dependency updates, and tooling chores label Nov 17, 2026
@kyasbal
kyasbal requested review from K53 and renamoo as code owners November 17, 2026 05:33

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces stricter compiler and linting checks for unused variables, parameters, and imports across both the Go backend and TypeScript frontend. Specifically, it enables noUnusedLocals and noUnusedParameters in the main tsconfig.json, configures extended diagnostics for unused standalone imports and let declarations, and adds a new ESLint rule. To comply with these rules, unused parameters in TypeScript files have been prefixed with underscores, unused imports and parameters have been removed, and Go test files have been updated to explicitly ignore unused return values from task binder functions. I have no feedback to provide as the changes are clean and correct.

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Go Quality Report (origin/main) — ✅ PASS

Metric Result
Changed Scope 0 prod file(s), 3 test file(s), 0 unit(s)
Patch Coverage 100.0% (0/0 lines)
Mutation Score 100.0% (0/0 killed, 0 survived)

TypeScript Quality Report (origin/main) — ⚠️ ADVISORY (1 finding(s), 0 directive error(s))

Metric Result
Changed Scope 4 prod file(s), 1 test file(s), 4 unit(s)
Patch Coverage 100.0% (7/7 lines)
Mutation Score 0.0% (0/1 killed, 1 survived)

Quality Rule Violations

# Rule Status Value (Limit) Location Subject
[Q1] func_surviving_mutants HARD_LIMIT 1 (<= 0) web/src/app/pages/graph/architecture-graph/graph/base/defs-child-elements.ts:32 <file>
[Q1] func_surviving_mutants — web/src/app/pages/graph/architecture-graph/graph/base/defs-child-elements.ts:32 ()
  • Why: Mutating operators or branches in this touched function did not cause any unit test to fail.
  • Fix: Delete redundant guards first, or strengthen assertions (cmp.Diff on full outputs and boundary inputs).
  • Detail: 1 mutant(s) survived Karma unit tests
- this.transform.onSvgElementUpdate = (_pos, size) => {
+ /* skipped: this.transform.onSvgElementUpdate = (_pos, size) => { this.withMinSize(size.width, size.height); return; }; */

Commit: fcbd724f9873 · Cloud Build Logs

@kyasbal
kyasbal added this pull request to the merge queue Nov 18, 2026
Merged via the queue into main with commit eb728e5 Nov 18, 2026
22 checks passed
@kyasbal
kyasbal deleted the push-qvnlqzwootnz branch November 18, 2026 03:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:backend-core Core backend frameworks, DAG task runner, and server API area:devenv Development environment, Makefile, and build tooling area:frontend Web frontend application and UI components type:chore Maintenance, dependency updates, and tooling chores

1 participant