Skip to content

First Stable Version

Compare
Choose a tag to compare
@Antonboom Antonboom released this 05 Nov 11:17
· 86 commits to master since this release
0a99a3c

Description

The large release based on the first wave of feedback from community.

What's Changed

Config

  • Support of enable-all and disable-all with enable and disable.
  • Support of require-error.fn-pattern.

New checkers

Checkers

Global

Support more assertions in expected-actual and comparison-based checkers:

  • EqualExportedValues
  • EqualValues
  • Exactly
  • InDelta
  • InDeltaMapValues
  • InDeltaSlice
  • InEpsilon
  • IsType
  • NotEqualValues
  • NotSame
  • Same
  • WithinDuration

bool-compare

  • Ignore arguments of empty interface type.

empty

  • Ignore len(n) > 1 and len(n) >=1 cases (false positives fix).

error-is-as

  • Check ErrorAs target.

error-nil

  • Support ErrorIs(err, nil) and NotErrorIs(err, nil) (false negatives fix).

float-compare

  • Fix report for formatted assertions.
  • Trigger if one of argument is float (false negatives fix).

len

  • Ignore comparisons when len(arr) is expected value and actual is not literal (false positives fix).

require-error

  • Significantly minimize the number of false positives by analysing of surrounding context.
  • Support of require-error.fn-pattern.

New ideas for contribution

New Contributors

Full Changelog: v0.2.3...v1.0.0