From bd51ae33431d8aa2b30d150da775097ccd603c9c Mon Sep 17 00:00:00 2001 From: Adam Vandenberg Date: Fri, 23 Jul 2010 21:31:32 -0700 Subject: [PATCH] Add depends_on spacing checks to brew_audit --- Library/Contributions/examples/brew-audit.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Library/Contributions/examples/brew-audit.rb b/Library/Contributions/examples/brew-audit.rb index 50728693d2..147587b7c3 100755 --- a/Library/Contributions/examples/brew-audit.rb +++ b/Library/Contributions/examples/brew-audit.rb @@ -26,6 +26,11 @@ ff.each do |f| problems << " * Remove 'use_mirror' from url." end + # 2 (or more, if in an if block) spaces before depends_on, please + if /^\ ?depends_on/ =~ text + problems << " * Check indentation of 'depends_on'." + end + if /(#\{\w+\s*\+\s*['"][^}]+\})/ =~ text problems << " * Try not to concatenate paths in string interpolation:\n #{$1}" end