module Ameba::Reportable

Overview

Represents a module used to report issues.

Direct including types

Defined in:

ameba/reportable.cr

Instance Method Summary

Instance Method Detail

def 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.


[View source]
def add_issue(rule, location : Crystal::Location, end_location : Crystal::Location, message : String, status : Issue::Status | Nil = nil, &block : Source::Corrector -> ) : Issue #

Adds a new issue to the list of issues.


[View source]
def add_issue(rule, node : Crystal::ASTNode, message, status : Issue::Status | Nil = nil, block : Source::Corrector -> | Nil = nil) : Issue #

Adds a new issue for Crystal AST node.


[View source]
def 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.


[View source]
def add_issue(rule, node : Crystal::ASTNode, message, status : Issue::Status | Nil = nil, &block : Source::Corrector -> ) : Issue #

Adds a new issue for Crystal AST node.


[View source]
def 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.


[View source]
def add_issue(rule, token : Crystal::Token, message, status : Issue::Status | Nil = nil, &block : Source::Corrector -> ) : Issue #

Adds a new issue for Crystal token.


[View source]
def 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.


[View source]
def 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.


[View source]
def 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.


[View source]
def issues #

List of reported issues.


[View source]
def valid? #

Returns true if the list of not disabled issues is empty, false otherwise.


[View source]