shard-ameba/src/ameba/issue.cr

27 lines
485 B
Crystal
Raw Normal View History

2018-06-10 21:15:12 +00:00
module Ameba
# Represents an issue reported by Ameba.
record Issue,
# A rule that triggers this issue.
rule : Rule::Base,
# Location of the issue.
location : Crystal::Location?,
# End location of the issue.
end_location : Crystal::Location?,
# Issue message.
message : String,
# Issue status.
status : Symbol? do
def disabled?
status == :disabled
end
def syntax?
rule.is_a?(Rule::Lint::Syntax)
end
2018-06-10 21:15:12 +00:00
end
end