Add a Make target to format all go files using gofumpt. Add another target to run the…
- User
Add a Make target to format all go files using gofumpt. Add another target to run the linter using the following settings: gopls = { gofumpt = true, codelenses = { gc_details = false, generate = true, regenerate_cgo = true, run_govulncheck = true, test = true, tidy = true, upgrade_dependency = true, vendor = true, }, hints = { assignVariableTypes = true, compositeLiteralFields = true, compositeLiteralTypes = true, constantValues = true, functionTypeParameters = true, parameterNames = true, rangeVariableTypes = true, }, analyses = { nilness = true, unusedparams = true, unusedwrite = true, useany = true, }, usePlaceholders = true, completeUnimported = true, staticcheck = true, directoryFilters = { "-.git", "-.vscode", "-.idea", "-.vscode-test", "-node_modules" }, semanticTokens = true, . How can go linter configuration be set project specific?
Assistant
Now I have enough context to write the plan directly.
Assistant
Now I'll implement all three changes in parallel.
Assistant
Now add the two targets to the Makefile:
Assistant
Done. Here's a summary of what was created:
Makefile— two new targets added:make fmt— runsgofumpt -l -w .over all Go filesmake lint— runsgolangci-lint run ./...using.golangci.yml
.golangci.yml— golangci-lint config mapping the gopls settings to CLI linter equivalents:gofumpt(formatter enforcement)staticcheck(staticcheck suite)unparam(unused parameters)nilnil(nilness — catches nil returns of nil interface)govetwithnilness+unusedwriteanalyzers
gopls.json— project-specific gopls settings at the module root. This is how you set gopls config project-specifically: place agopls.jsonfile at the workspace root. Any editor running gopls (VS Code, Neovim/nvim-lspconfig, GoLand, Zed, etc.) will pick it up automatically since gopls v0.11 — no per-editor configuration needed. The existing.vscode/settings.jsondoes not need to change.- User
Analyse which directories should be added to the directoryFilters
Assistant
Now I have a complete picture. Here's the analysis:
Directories with no Go files — candidates for exclusion:
Directory Contents Add? -.gitgit internals ✓ already -.vscodeeditor config ✓ already -.ideaeditor config ✓ already -node_modulesJS deps ✓ already (matches anywhere) -web/frontendSvelte/JS/CSS/built assets add — supersedes -node_modulesfor this project-web/templatesHTML templates add -var45 MB runtime data (job archive, checkpoints, SQLite DBs) Assistant
Done. Key additions and rationale:
-web/frontend— entire Svelte app subtree (src, node_modules, public/build); no Go files at all-web/templates— HTML templates only-var— largest win: 45 MB of runtime data (job archives, checkpoints, SQLite DBs); completely irrelevant to gopls-api— onlyswagger.yaml/schema.graphqls; the generateddocs.golives atinternal/api/docs.go, not here-configs— JSON config files-init— systemd service file-internal/repository/migrations— SQL migration files-internal/repository/testdata,-internal/importer/testdata,-pkg/archive/testdata— JSON/SQLite test fixtures
internal/graph/generatedis intentionally not excluded — gopls needs to index the generated GraphQL code to provide navigation and completion across the codebase.- User
Add infos about the new make targets including the required tools and how to install them to the README
Assistant
Done. Added to the "How to build and run" section:
- Descriptions for
make fmtandmake lintalongside the existing targets - A "Installing development tools" subsection with install commands for both
gofumptandgolangci-lint, including the note thatgolangci-lintshould be installed via the official install script rather thango install(which is explicitly not supported upstream).
- Descriptions for