From 3afa9c2ceb26961e67333150e73b75eaa96050d5 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Mon, 22 Jul 2013 22:53:22 -0500 Subject: [PATCH] audit: fix indentation --- Library/Homebrew/cmd/audit.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb index 08556a6221..3d23212567 100644 --- a/Library/Homebrew/cmd/audit.rb +++ b/Library/Homebrew/cmd/audit.rb @@ -555,12 +555,12 @@ class FormulaAuditor # Checks that apply only to code in def caveats if text =~ /(\s*)def\s+caveats((.*\n)*?)(\1end)/ || text =~ /(\s*)def\s+caveats;(.*?)end/ caveats_body = $2 - if caveats_body =~ /[ \{=](python[23]?)\.(.*\w)/ - # So if in the body of caveats there is a `python.whatever` called, - # check that there is a guard like `if python` or similiar: - python = $1 - method = $2 - unless caveats_body =~ /(if python[23]?)|(if build\.with\?\s?\(?['"]python)|(unless build.without\?\s?\(?['"]python)/ + if caveats_body =~ /[ \{=](python[23]?)\.(.*\w)/ + # So if in the body of caveats there is a `python.whatever` called, + # check that there is a guard like `if python` or similiar: + python = $1 + method = $2 + unless caveats_body =~ /(if python[23]?)|(if build\.with\?\s?\(?['"]python)|(unless build.without\?\s?\(?['"]python)/ problem "Please guard `#{python}.#{method}` like so `#{python}.#{method} if #{python}`" end end