Skip to content

golangci-lint: Stop excluding many `Close` and `Serve` functions from errcheck linter

The errcheck linter is tasked with finding cases where we are mistakenly not checking errors returned by a function. While we have it globally enabled, one gap that we currently have is that we exclude all function calls to Close and Serve. This exception is something we added back when we added this linter to our rules as it has proven to be too much work to fix all violations in the code base. Not checking any such errors may easily hide issues we're not aware of though and is thus bad practice.

Convert the blanket-exclude for all functions to instead explicitly exclude all functions that currently violate it. Like this, it becomes a lot more manageable to fix missing error checks one function at a time and makes sure that we don't add new violations to our codebase that are not covered by any of these explicit function excludes.

Merge request reports