go-critic.github.io

Trophies

Contributions are partitioned by projects.

By “contribution”, we mean all of these:

  1. Commit that fixes the problem
  2. Reported issue (if there is no commit yet)
  3. Any other form of advices that were suggested by go-critic

The list is sorted by priority. If commit exist, it should be referenced instead of issue. If issue exist, is should be referenced (as opposed of 3 where we have no explicit issue ticket).

This page exists mostly to determine most useful checks that can trigger on real projects. These checks are a good candidates to be included into “default” go-critic list.

Most projects listed here have high base code quality, so every detected issue counts.

golang/go

  1. net: combine append calls in reverseaddr appendCombine
  2. cmd/link/internal/ld: avoid Reloc copies in range loops rangeValCopy
  3. cmd/compile/internal/ssa: fix partsByVarOffset.Less method dupSubExpr
  4. runtime: remove redundant explicit deref in trace.go underef
  5. cmd/link/internal/sym: uncomment code for ELF cases in RelocName commentedOutCode
  6. runtime: simplify slice expression to sliced value itself unslice
  7. html/template: use named consts instead of their values namedConst
  8. cmd/internal/obj/arm64: simplify some bool expressions boolExprSimplify
  9. math,net: omit explicit true tag expr in switch switchTrue
  10. archive/tar: remore redundant parens in type expressions typeUnparen

upspin/upspin

  1. pack/internal/packtest: remove redundant parens in type conv typeUnparen

mvdan/sh

  1. interp: avoid redundant array copies rangeExprCopy
  2. interp,syntax: replace single case switches singleCaseSwitch
  3. syntax: replace if-else chains with expr switch stmt ifElseChain

rumyantseva/go-zeroservice

  1. app.go: rename unused param to _ unusedParam

intel-go/nff-go

  1. Modified style in merge function typeSwitchVar, paramTypeCombine

afiskon/go-elector

  1. minor style fixes ifElseChain, stdExpr, paramTypeCombine