https://go-critic.github.io/overview
Last update (of this issue): Wed Jan 13 05:49:01 AM CET 2021
I think initClause fits stylecheck more, because it's not really a simplification, but rather an effort of avoiding code with surprises.
singleCaseSwitch can benefit from TODO comments checks.
Some switches with a single case have something like: "TODO: cover all things later".
These may be better left alone, at least by default.
This case is not handled by gocritic since it's not really convenient to match comments (non-doc comments) to arbitrary statement.
elseif finds many cases where code can be less beautiful when re-written.
See https://github.com/go-critic/go-critic/issues/420.
I don't know whether my approach gives good enough reduce in these false-positive like cases.
There can be issues in determining 100%-fine replacements.