Documentation
¶
Overview ¶
Package critic provides tools for identifying refactoring opportunities in code.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Aibolit ¶ added in v0.2.0
type Aibolit struct {
// contains filtered or unexported fields
}
Aibolit is a tool for identifying refactoring opportunities in Java code. @todo #2:45min Implement support for Aibolit with multiple classes. As for now, we check only the first class, and return imperfections result. Instead, we need to support multiple files instead. Let's implement such Aibolit struct, that will be able to manage whole project, instead of single Java file. Also see this related issue: https://github.com/cqfn/refrax/issues/28.
func NewAibolit ¶ added in v0.2.0
NewAibolit creates a new instance of Aibolit for analyzing a single Java file.
func (*Aibolit) Imperfections ¶ added in v0.2.0
Imperfections analyzes the Java code and identifies refactoring opportunities.
type CombinedTool ¶ added in v0.2.0
type CombinedTool struct {
// contains filtered or unexported fields
}
CombinedTool represents a tool that combines multiple tools into one.
func (*CombinedTool) Imperfections ¶ added in v0.2.0
func (c *CombinedTool) Imperfections() string
Imperfections gathers and returns the imperfections from all combined tools.
type Critic ¶
type Critic struct {
// contains filtered or unexported fields
}
Critic represents the main struct responsible for analyzing code critiques.
type MockTool ¶ added in v0.2.0
type MockTool struct {
// contains filtered or unexported fields
}
MockTool represents a mock implementation of the Tool interface.
func (*MockTool) Imperfections ¶ added in v0.2.0
Imperfections returns the imperfections associated with the MockTool.
type Tool ¶ added in v0.2.0
type Tool interface {
Imperfections() string
}
Tool defines the interface for a tool that can be used to identify and report imperfections in artifacts.
func NewCombinedTool ¶ added in v0.2.0
NewCombinedTool creates a new CombinedTool instance with the provided tools.
func NewMockTool ¶ added in v0.2.0
NewMockTool creates a new instance of MockTool with the provided data.
func NewMockToolEmpty ¶ added in v0.2.0
func NewMockToolEmpty() Tool
NewMockToolEmpty creates a new instance of MockTool with empty data.