Documentation
¶
Overview ¶
Package checkstyle is the Checkstyle static analysis tool's implementation of an Impendulo tool. See http://checkstyle.sourceforge.net/ for more information.
Index ¶
- Constants
- type Error
- type Errors
- type File
- type Report
- type Result
- func (r *Result) ChartVals() []*result.ChartVal
- func (r *Result) GetFileId() bson.ObjectId
- func (r *Result) GetId() bson.ObjectId
- func (r *Result) GetName() string
- func (r *Result) GetTestId() bson.ObjectId
- func (this *Result) GetType() string
- func (r *Result) Lines() []*result.Line
- func (this *Result) OnGridFS() bool
- func (r *Result) Reporter() result.Reporter
- func (r *Result) SetReport(report result.Reporter)
- func (this *Result) String() string
- func (r *Result) Template() string
- type Tool
Constants ¶
const (
NAME = "Checkstyle"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Error struct {
Id bson.ObjectId
Line int `xml:"line,attr"`
Column int `xml:"column,attr"`
Severity string `xml:"severity,attr"`
Message template.HTML `xml:"message,attr"`
Source string `xml:"source,attr"`
Lines []int
}
Error represents an occurrence of an error detected by checkstyle. It gives the location of the error, its severity and a thorough description.
type File ¶
File represents a file on which checkstyle was run and all errors found in it.
func (*File) CompressErrors ¶
func (f *File) CompressErrors()
CompressErrors packs all Errors of the same type into a single Error by storing their location seperately.
type Report ¶
type Report struct {
Id bson.ObjectId
Version string `xml:"version,attr"`
Errors int
Files []*File `xml:"file"`
}
Report represents the result of running Checkstyle on a Java source file.
type Result ¶
type Result struct {
Id bson.ObjectId `bson:"_id"`
FileId bson.ObjectId `bson:"fileid"`
Name string `bson:"name"`
Report *Report `bson:"report"`
GridFS bool `bson:"gridfs"`
Type string `bson:"type"`
}
func NewResult ¶
NewResult creates a new Checkstyle Result. Any errors returned will be XML errors due to extracting a Report from data.
type Tool ¶
type Tool struct {
// contains filtered or unexported fields
}
Tool is an implementation of tool.Tool which allows us to run Checkstyle on a Java class.
func New ¶
New creates a new instance of the checkstyle Tool. Any errors returned will of type config.ConfigError.