mirror of
https://github.com/mgechev/revive.git
synced 2025-11-23 22:04:49 +02:00
Introduce the empty-lines rule that verifies there are no {head,trail}ing lines (#81)
This commit is contained in:
committed by
Minko Gechev
parent
da63d0a965
commit
d2e0e5a0ed
@@ -56,6 +56,11 @@ func (f *File) Render(x interface{}) string {
|
||||
return buf.String()
|
||||
}
|
||||
|
||||
// CommentMap builds a comment map for the file.
|
||||
func (f *File) CommentMap() ast.CommentMap {
|
||||
return ast.NewCommentMap(f.Pkg.fset, f.AST, f.AST.Comments)
|
||||
}
|
||||
|
||||
var basicTypeKinds = map[types.BasicKind]string{
|
||||
types.UntypedBool: "bool",
|
||||
types.UntypedInt: "int",
|
||||
|
||||
Reference in New Issue
Block a user