module Ameba::Reportable
Overview
Represents a module used to report issues.
Included Modules
Direct including types
Defined in:
ameba/reportable.crInstance Method Summary
-
#add_issue(rule, location : Crystal::Location | Nil, end_location : Crystal::Location | Nil, message : String, status : Issue::Status | Nil = nil, block : Source::Corrector -> | Nil = nil) : Issue
Adds a new issue to the list of issues.
-
#add_issue(rule, location : Crystal::Location | Nil, end_location : Crystal::Location | Nil, message : String, status : Issue::Status | Nil = nil, &block : Source::Corrector -> ) : Issue
Adds a new issue to the list of issues.
-
#add_issue(rule, token : Crystal::Token, message, status : Issue::Status | Nil = nil, block : Source::Corrector -> | Nil = nil) : Issue
Adds a new issue for Crystal token.
-
#add_issue(rule, location : Tuple(Int32, Int32), message, status : Issue::Status | Nil = nil, block : Source::Corrector -> | Nil = nil) : Issue
Adds a new issue for location defined by line and column numbers.
-
#add_issue(rule, location : Tuple(Int32, Int32), end_location : Tuple(Int32, Int32), message, status : Issue::Status | Nil = nil, block : Source::Corrector -> | Nil = nil) : Issue
Adds a new issue for location and end_location defined by line and column numbers.
-
#add_issue(rule, node : Crystal::ASTNode, message, status : Issue::Status | Nil = nil, block : Source::Corrector -> | Nil = nil, *, prefer_name_location = false) : Issue
Adds a new issue for Crystal AST node.
-
#add_issue(rule, location : Tuple(Int32, Int32), message, status : Issue::Status | Nil = nil, &block : Source::Corrector -> ) : Issue
Adds a new issue for location defined by line and column numbers.
-
#add_issue(rule, token : Crystal::Token, message, status : Issue::Status | Nil = nil, &block : Source::Corrector -> ) : Issue
Adds a new issue for Crystal token.
-
#add_issue(rule, location : Tuple(Int32, Int32), end_location : Tuple(Int32, Int32), message, status : Issue::Status | Nil = nil, &block : Source::Corrector -> ) : Issue
Adds a new issue for location and end_location defined by line and column numbers.
-
#add_issue(rule, node : Crystal::ASTNode, message, status : Issue::Status | Nil = nil, *, prefer_name_location = false, &block : Source::Corrector -> ) : Issue
Adds a new issue for Crystal AST node.
-
#issues
List of reported issues.
-
#valid?
Returns
true
if the list of not disabled issues is empty,false
otherwise.
Instance methods inherited from module Ameba::AST::Util
abort?(node)
abort?,
control_exp_code(node : Crystal::ControlExpression, code_lines)
control_exp_code,
dynamic_literal?(node) : Bool
dynamic_literal?,
exit?(node)
exit?,
flow_command?(node, in_loop)
flow_command?,
flow_expression?(node, in_loop = false)
flow_expression?,
literal?(node) : Bool
literal?,
loop?(node)
loop?,
name_end_location(node)
name_end_location,
name_location(node)
name_location,
name_size(node)
name_size,
node_source(node, code_lines)
node_source,
path_named?(node, name) : Bool
path_named?,
raise?(node)
raise?,
source_between(loc, end_loc, code_lines) : String | Nil
source_between,
static_literal?(node) : Bool
static_literal?
Instance Method Detail
Adds a new issue to the list of issues.
Adds a new issue to the list of issues.
Adds a new issue for Crystal token.
Adds a new issue for location defined by line and column numbers.
Adds a new issue for location and end_location defined by line and column numbers.
Adds a new issue for Crystal AST node.
Adds a new issue for location defined by line and column numbers.
Adds a new issue for Crystal token.
Adds a new issue for location and end_location defined by line and column numbers.
Adds a new issue for Crystal AST node.