This collects all violations for each formula in a single place, instead
of doing `brew style` outputs for all formulae first, and then the other
audit checks.
Closes#112.
Signed-off-by: Andrew Janke <andrew@apjanke.net>
Currently, brew audit --strict includes the name of the tap when calculating the
length of a formula's description. This makes it difficult to pass the audit for
formulas in taps with lengthy names. In #47033 @jawshooah called out head-only
or devel-only taps specifically, but this is an issue elsewhere. For example:
homebrew/versions/elasticsearch20: Distributed search & analytics engine (72)
This commit updates audit.rb to use formula.name rather than formula.full_name.
Closes#47033 -- Audit shouldn't include tap name in description length
Running brew audit --strict --online on a formula with a GitHub
homepage/url would crash if HOMEBREW_NO_GITHUB_API is set because
GitHub.repository returns `nil` and the audit code assumes it always
returns a hash.
ClosesHomebrew/homebrew#50054.
Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
We allow certain special regex characters in formula names, and if
those aren't escaped when interpolating them into a regex, they'll be
interpreted as special regex characters.
This can cause regex compile errors on Ruby 1.8 (for example, with
"libxml++3", which has nested match characters), and more subtle
matching bugs in general.
Refs an issue surfaced in Homebrew/homebrew#48744.
ClosesHomebrew/homebrew#49005.
Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
Add two checks:
* revision should be reset to 0 for new version.
* revision should not decrease inside the same version interval.
ClosesHomebrew/homebrew#48032.
Signed-off-by: Xu Cheng <xucheng@me.com>
Adding a strict check for usage that should be using pkgshare.
Pulled onto two unique checks to provide a better problem message, with a
clearer solution, but open to thoughts.
* Use pkgshare instead of (share/"example")
* Use #{pkgshare} instead of #{share}/example
ClosesHomebrew/homebrew#47900.
Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
This commit modifies the whitelisting of the Kibama formula from the
npm audit check to allow the versioned Kibana formulae to receive the
same whitelisting.
ClosesHomebrew/homebrew#47500.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit partial reverts beed39e46fa021dd1c133c2c8eaaa81b524e68c7.
For users whose local brew is at around 2015-06-02 to 2015-06-11,
running `brew update` will emit following error:
Error: undefined method 'full_version' for OS::Mac:Module
This is caused by the same bug described in Homebrew/homebrew#42553.
Let's use `MACOS_FULL_VERSION` for now to restore `brew update` compatibility
for these users.
TODO: revert this commit after core code and formulae separation.
* Checks for placement of the bottle modifier variable.
* Checks there isn't a bottle modifier and a bottle do block - The former makes
the latter redundant.
ClosesHomebrew/homebrew#45146.
Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
There are audit rules which check cellar. Therefore, we need
`ARGV.resolved_formula` to get proper spec and prefix.
ClosesHomebrew/homebrew#44781.
Signed-off-by: Xu Cheng <xucheng@me.com>