You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
chore(lint): enable zero-dependency unused code checks for Go and Web - #1274
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.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
area:backend-coreCore backend frameworks, DAG task runner, and server APIarea:devenvDevelopment environment, Makefile, and build toolingarea:frontendWeb frontend application and UI componentstype:choreMaintenance, dependency updates, and tooling chores
1 participant
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.yamlpreviously excludedifaceandgovetfrom_test.gofiles, allowing unused call results in test assertions to go unnoticed. On the frontend side,tsconfig.jsonandeslint.config.mjsdid not enforcenoUnusedLocals,noUnusedParameters, Angular'sunusedStandaloneImportsandunusedLetDeclarationextended 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.