Class: Kamal::Lint::Finding

Inherits:
Struct
  • Object
show all
Defined in:
lib/kamal/lint/finding.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#autofixObject

Returns the value of attribute autofix

Returns:

  • (Object)

    the current value of autofix



5
6
7
# File 'lib/kamal/lint/finding.rb', line 5

def autofix
  @autofix
end

#check_idObject

Returns the value of attribute check_id

Returns:

  • (Object)

    the current value of check_id



5
6
7
# File 'lib/kamal/lint/finding.rb', line 5

def check_id
  @check_id
end

#columnObject

Returns the value of attribute column

Returns:

  • (Object)

    the current value of column



5
6
7
# File 'lib/kamal/lint/finding.rb', line 5

def column
  @column
end

#fileObject

Returns the value of attribute file

Returns:

  • (Object)

    the current value of file



5
6
7
# File 'lib/kamal/lint/finding.rb', line 5

def file
  @file
end

#lineObject

Returns the value of attribute line

Returns:

  • (Object)

    the current value of line



5
6
7
# File 'lib/kamal/lint/finding.rb', line 5

def line
  @line
end

#messageObject

Returns the value of attribute message

Returns:

  • (Object)

    the current value of message



5
6
7
# File 'lib/kamal/lint/finding.rb', line 5

def message
  @message
end

#severityObject

Returns the value of attribute severity

Returns:

  • (Object)

    the current value of severity



5
6
7
# File 'lib/kamal/lint/finding.rb', line 5

def severity
  @severity
end

Instance Method Details

#autofixable?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/kamal/lint/finding.rb', line 15

def autofixable?
  !autofix.nil?
end

#to_hObject



19
20
21
22
23
24
25
26
27
28
29
# File 'lib/kamal/lint/finding.rb', line 19

def to_h
  {
    check: check_id,
    severity: severity.to_s,
    message: message,
    file: file,
    line: line,
    column: column,
    autofixable: autofixable?
  }
end