Class: CodePoetry::WarningScanner

Inherits:
Object
  • Object
show all
Defined in:
lib/code_poetry/warning_scanner.rb

Constant Summary collapse

INDENTATION_WARNING_REGEXP =
/at 'end' with '(def|class|module)' at (\d+)\z/

Instance Method Summary collapse

Instance Method Details

#scan(source) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/code_poetry/warning_scanner.rb', line 7

def scan(source)
  if defined? Bundler
    Bundler.with_clean_env do
      status, @warnings, process = validate(source)
    end
  else
    status, @warnings, process = validate(source)
  end

  parse_warnings
end