kisielk/errcheck — pull request #23 by isbadawi (2013-06-10 04:51:53+00:00)
Title: Finer-grained ignore syntax

As discussed in #3. I ran into some edge cases you may want to comment on:

* If a regex is specified for a package, and that package is also specified in `-ignorepkg`, I discard the regex and ignore the whole package. (Could maybe output a warning for this.)
* If a global regex is specified, it's always checked first. So if a package regex is specified, a function is ignored if either the global regex or the package regex matches.
* About ignoring `fmt` by default. Currently `ignorepkg` has a default value of `fmt`. But I thought it would be awkward if someone specifies a package regex for `fmt`. Instead I special-case `fmt`, and ignore it if it's not specified with either flag; the way to disable this is to specify a match-nothing regex. This changes the old behavior; if you specify `-ignorepkg` without `fmt`, it could still be ignored.