Skip to content

Disable nlreturn linter

Niels Möller requested to merge nisse/disable-nlreturn into main

This linter enforces formatting like

if err := opts.validate(); err != nil {
	return nil, err
}

return opts, nil

and

if err == nil {
	t.Errorf("invalid opts %q not rejected", tt.name)
}

continue

with extra empty lines. I don't think there's any consensus that those empty lines makes code generally more readable, and I'd suggest that those that want return and continue statements to really stand out visually enable syntactic highlighting.

Merge request reports