Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Releases: go-critic/go-critic

v0.5.3

29 Dec 10:26
cdd54cf

Choose a tag to compare

v0.5.3 Pre-release
Pre-release

Improvements

New checkers

Fixes

More stable checkers

14 Aug 19:21
9213f6f

Choose a tag to compare

More stable checkers Pre-release
Pre-release

Changes

Checkers that are now considered to be stable:

* argOrder
* badCall
* badCond
* codegenComment
* commentFormatting
* deprecatedComment
* exitAfterDefer
* flagName
* mapKey
* newDeref
* offBy1
* stringXbytes
* valSwap
* wrapperFunc

Every checker from this list was tested on several big Go projects.

v0.5.1: checkers: update ruleguard to v0.2.0 (#952)

12 Aug 21:12
c61cd34

Choose a tag to compare

Updated go-ruleguard version to v0.2.0.

This minor release is an attempt to fix a broken dependency.
See #953

Lintpack-free release

15 Jun 11:40
94678bc

Choose a tag to compare

Lintpack-free release Pre-release
Pre-release

It's now possible to install go-critic with go get (no lintpack required).

New checkers:

  • 9a11c85 added deferUnlambda checker.
  • 99489e1 added badRegexp checker.
  • 3a3e885 added regexpSimplify checker.
  • 3916229 added sloppyTypeAssert checker.
  • d6fa699 added sqlQuery checker.
  • 33d100b added sortSlice checker.

Fixes:

  • 4757c17 typeSwitchVar now generates 1 warning per switch statement.
  • 7668b86 commentFormatting does not report //go:generate comments.
  • 730db5a commentFormatting does not report //export comments.
  • f4eb84b unnecessaryDefer false positive fix.

v0.4.3: checkers: add ruleguard checker (#907)

18 Mar 21:48
8c5f841

Choose a tag to compare

This is part of the ruleguard integration experiment.

Hopefully, we can get some feedback to improve the way it's integrated.

The simplest way to try it out:
	gocritic check -enable ruleguard [email protected] <gorules> <target>

Where:
	<gorules> is a path to a Go rules file
	<target> is a linting target

An example gorules file can be found here:
	https://github.com/quasilyte/go-ruleguard/blob/master/rules.go

Visit https://github.com/quasilyte/go-ruleguard for more info on the ruleguard.

Updates #873
Updates #869
Updates #837
Updates #836
Updates #831

Signed-off-by: Iskander Sharipov <[email protected]>

v0.4.2

18 Mar 21:49
8c5f841

Choose a tag to compare

v0.4.2 Pre-release
Pre-release

Changes

v0.4.1

07 Jan 14:28
c46ab3c

Choose a tag to compare

v0.4.1 Pre-release
Pre-release

Changes

v0.4.0 Delayed release

27 Nov 11:06

Choose a tag to compare

Pre-release

Long time ago we did v0.3.4 release, it's time to make them more regular.
Current one contains mostly bugfixes.

v0.3.4: checkers: fix nil pointer dereference in flagName (#750)

04 Jan 15:01

Choose a tag to compare

  • Fixed a number of false positives and panics for stable checkers
  • Moved to a lintpack framework which uses https://godoc.org/golang.org/x/tools/go/packages
  • Improved the test suite for checkers
  • Moved less maintained and too experimental checkers to contrib repo

Marked several checkers stable.
The current list of stable checkers:

appendAssign [diagnostic]
appendCombine [performance]
assignOp [style]
builtinShadow [style opinionated]
captLocal [style]
caseOrder [diagnostic]
defaultCaseOrder [style]
dupArg [diagnostic]
dupBranchBody [diagnostic]
dupCase [diagnostic]
dupSubExpr [diagnostic]
elseif [style]
flagDeref [diagnostic]
hugeParam [performance]
ifElseChain [style]
importShadow [style opinionated]
indexAlloc [performance]
paramTypeCombine [style opinionated]
rangeExprCopy [performance]
rangeValCopy [performance]
regexpMust [style]
singleCaseSwitch [style]
sloppyLen [style]
switchTrue [style]
typeSwitchVar [style]
typeUnparen [style opinionated]
underef [style]
unlambda [style]
unslice [style]