How to Setup a Go Development Shell With Nix Flakes

As you may know, I have been using Nix/NixOS for the last few months. I finally started doing some development, after spending lots and lots and lots of time tweaking my setup (and neovim). As part of starting to do some real development work, I am now trying to leverage devshells with Nix flakes. I like the concept of Nix devshells, I have tried using Docker dev containers in the past, but the issue I had with those was adding my tools such as shell (fish) or cli tools was not easy. ...

TIL: How to Disable Linters in Golangci Lint for Test Files

TIL: How to Disable Linters in Golangci Lint for Test Files Today (for once), I ran golangci-lint run and it failed on CI with the following error: internal/options/parser_test.go:13: Function 'TestParse' is too long (69 > 60) (funlen) func TestParse(t *testing.T) { task: Failed to run task "lint": exit status 1 Where my .golangci.yml file looked like this: run: timeout: 5m skip-dirs: - direnv linters: enable: - bodyclose - dogsled - dupl - errcheck - exportloopref - funlen - gochecknoinits - goconst - gocritic - gocyclo - gofmt - goimports - gomnd - goprintffuncname - gosec - gosimple - govet - ineffassign - lll - misspell - nakedret - noctx - nolintlint - revive - staticcheck - stylecheck - typecheck - unconvert - unparam - unused - whitespace So basically we want the ability to turn off funlen for our tests (and other linters). ...