Module: Cane

Defined in:
lib/cane/runner.rb,
lib/cane/cli.rb,
lib/cane/file.rb,
lib/cane/version.rb,
lib/cane/abc_check.rb,
lib/cane/doc_check.rb,
lib/cane/rake_task.rb,
lib/cane/cli/parser.rb,
lib/cane/cli/options.rb,
lib/cane/style_check.rb,
lib/cane/task_runner.rb,
lib/cane/default_checks.rb,
lib/cane/json_formatter.rb,
lib/cane/threshold_check.rb,
lib/cane/violation_formatter.rb,
lib/cane/encoding_aware_iterator.rb

Overview

Default checks performed when no checks are provided

Defined Under Namespace

Modules: CLI Classes: AbcCheck, DocCheck, EncodingAwareIterator, File, JsonFormatter, RakeTask, Runner, SimpleTaskRunner, StyleCheck, ThresholdCheck, ViolationFormatter

Constant Summary collapse

VERSION =
'3.0.0'

Class Method Summary collapse

Class Method Details

.default_checksObject



8
9
10
11
12
13
14
15
# File 'lib/cane/default_checks.rb', line 8

def default_checks
  [
    AbcCheck,
    StyleCheck,
    DocCheck,
    ThresholdCheck
  ]
end

.run(*args) ⇒ Object



8
9
10
# File 'lib/cane/runner.rb', line 8

def run(*args)
  Runner.new(*args).run
end

.task_runner(opts) ⇒ Object



3
4
5
6
7
8
9
# File 'lib/cane/task_runner.rb', line 3

def task_runner(opts)
  if opts[:parallel]
    Parallel
  else
    SimpleTaskRunner
  end
end