Class: Lilac::CLI::CrossRefLinter::Result

Inherits:
Struct
  • Object
show all
Defined in:
lib/lilac/cli/lint/cross_ref_linter.rb

Overview

Aggregate counts returned from lint. errors tracks fatal violations (build should fail); warnings tracks non-fatal ones. total is the "any diagnostic count" sum used by callers that don't need to distinguish severity.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#errorsObject

Returns the value of attribute errors

Returns:

  • (Object)

    the current value of errors



37
38
39
# File 'lib/lilac/cli/lint/cross_ref_linter.rb', line 37

def errors
  @errors
end

#warningsObject

Returns the value of attribute warnings

Returns:

  • (Object)

    the current value of warnings



37
38
39
# File 'lib/lilac/cli/lint/cross_ref_linter.rb', line 37

def warnings
  @warnings
end

Instance Method Details

#errors?Boolean

Returns:

  • (Boolean)


42
43
44
# File 'lib/lilac/cli/lint/cross_ref_linter.rb', line 42

def errors?
  errors.positive?
end

#totalObject



38
39
40
# File 'lib/lilac/cli/lint/cross_ref_linter.rb', line 38

def total
  warnings + errors
end