Prefer `Utils.git_version` instead of duplicating version detection
logic. Decouple unnecessary conflated availability and version checks.
Closes#351.
Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
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>
Fix style of previously omitted `check_for_bad_install_name_tool`
method to be in line with changes made in #49.
Closes#56.
Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
Guard clauses instead of if/unless blocks make the checks easier to
understand and reduce nesting, thus improving overall readability.
This includes the following additional minor changes:
- Make indentation of commands consistent inside diagnostic messages.
- Fix minor typos and inconsistent punctuation in diagnostic messages.
- Fix here documents to always start with `<<-EOS.undent` on a new line,
followed by the message (indented once), followed by `EOS` (at the
same level like `<<-EOS.undent`).
- Always separate the check logic (and guard clauses) from the following
message by a single empty line (for consistency and readability).
- Standardize on `message` as the variable name when diagnostic messages
need to be constructed from multiple parts.
- Where easily possible, adapt check logic to stay within 80-column
limit, use more expressive variable names, and break down long
expressions into multiple statements with intermediate results.
Closes#49.
Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
`install_name_tool` location depends on the location of the active developer
directory managed by `xcode-select`.
ClosesHomebrew/homebrew#50509.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This is the only place we advise `:admin` as well so might as well
change this one.
ClosesHomebrew/homebrew#50279.
ClosesHomebrew/homebrew#50295.
Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
The recent updates to OSXFuse include two new elements that get flagged by
`brew doctor`. Adding them here so it's consistent with how we handle the rest
of OSXFuse.
ClosesHomebrew/homebrew#49372.
Both `coreutils` and `findutils` suggest to add `#{opt_libexec}/gnubin`
to PATH in their caveats to get the non-prefixed binaries from those
formulae. Check this in addition to the version-specific directory that
is less likely to be in PATH.
ClosesHomebrew/homebrew#48207.
Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
Determine the age of the local `HEAD` first and only if it is older than
24 hours proceed with the much more expensive `git ls-remote` to check
if there are any new upstream commits (there usually will be).
This keeps the overall logic unaltered, but significantly speeds up the
check for users that have recently updated (still slow for all others).
ClosesHomebrew/homebrew#48499.
Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
Xcode can only provide autotools if it is installed, thus check that
first. Skipping this check will try to compare a `nil` Xcode version to
4.3, the first version of Xcode to not provide autotools.
FixesHomebrew/homebrew#48208.
ClosesHomebrew/homebrew#48278.
Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
Check for non-prefixed findutils in path via gnubin symlinks or directly
ClosesHomebrew/homebrew#46987.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
On all of the machines I have upgraded to OS X El Capitan, my /usr/local
directory has changed ownership. Since this message shows up as an error
during `brew update`, I figured it would be good to beef up the
explanation.
ClosesHomebrew/homebrew#44670.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>