Skip to content

Releases: ashanbrown/forbidigo

v1.3.0: Support custom forbid reason messages (#11)

12 Jan 16:23
9d87656
Compare
Choose a tag to compare
In order to allow users to communicate intent to collaborators,
optionally embed custom messages into each forbidden pattern.

The syntax is as follows: `identifier(# message goes here)?`

Example: `^fmt\.Errorf(# Please don't use this!)?$`

Regular expressions containing custom messages are effectively identical
to ones that don't, because the sub-expression containing it is marked
optional with a `?`. All this commit does is parse out any recognized
custom message, and place it prominently in the tool's output. The
regular expression itself is omitted from the tool's output when a
custom message is specified.

Ignore print/println by default. Standardize //permit directives.

10 May 22:59
f30240a
Compare
Choose a tag to compare
v1.2.0

Add print and println to default exclusions list (#7)

v1.1.0: Exclude godoc examples by default (#4)

31 Jan 16:52
60920e1
Compare
Choose a tag to compare
godoc examples (https://blog.golang.org/examples) depend on being able to write to stdout, which is in contradiction to the default forbidden pattern of fmt.Print*. To make this work nicely out of the box, we will skip checking godoc examples by default. This includes "whole file examples", in which an entire file is ignored because it has only a single Example* method.

This PR also allows the //permit directive to be ignored, allowing this linter to be controlled just using the standard //nolint directive from golangci lint.

This PR also adds a dependency on the launchdarkly/go-options option code generator, which isn't pinned in the repo. I may consider doing that at a later date.

Fixes #3

v1.0.0

22 Sep 03:39
Compare
Choose a tag to compare
Rename to forbidigo