Skip to content

Commit

Permalink
fix: fix lint issue
Browse files Browse the repository at this point in the history
  • Loading branch information
phodal committed Jan 9, 2020
1 parent 2a922bb commit 8ef9fa6
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 14 deletions.
2 changes: 1 addition & 1 deletion cmd/git.go
Expand Up @@ -77,7 +77,7 @@ var gitCmd = &cobra.Command{
const secondsOfOneMonth = 2600640
month := time.Since(info.Age).Seconds() / secondsOfOneMonth
displayMonth := strconv.FormatFloat(month, 'f', 2, 64)
agesDisplay = append(agesDisplay, CodeAgeDisplay{info.EntityName, displayMonth})
agesDisplay = append(agesDisplay, CodeAgeDisplay{EntityName: info.EntityName, Month: displayMonth})
}

table.SetHeader([]string{"EntityName", "Month"})
Expand Down
3 changes: 1 addition & 2 deletions go.sum
Expand Up @@ -28,8 +28,7 @@ github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5y
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/huleTW/bad-smell-analysis v0.0.0-20200108141729-8208e91ffb91 h1:gtDJh/2ApQrXtvVDNqfszlkMDhSdWDh3fVkwKN97IeY=
github.com/huleTW/bad-smell-analysis v0.0.0-20200108141729-8208e91ffb91/go.mod h1:m/G88wmnOY6Qii7BkXlx8Omm8LLK3bvT+J7HqFQ4Jak=
github.com/huleTW/bad-smell-analysis v0.1.0 h1:mEVtiekah7S2X5CqyeakCDUcWyO3v0QruJDNh7JzX+s=
github.com/huleTW/bad-smell-analysis v0.1.0/go.mod h1:m/G88wmnOY6Qii7BkXlx8Omm8LLK3bvT+J7HqFQ4Jak=
github.com/iancoleman/strcase v0.0.0-20191112232945-16388991a334 h1:VHgatEHNcBFEB7inlalqfNqw65aNkM1lGX2yt3NmbS8=
github.com/iancoleman/strcase v0.0.0-20191112232945-16388991a334/go.mod h1:SK73tn/9oHe+/Y0h39VT4UCxmurVJkR5NA7kMEAOgSE=
Expand Down
2 changes: 1 addition & 1 deletion pkg/application/call/call_graph.go
Expand Up @@ -10,7 +10,7 @@ type CallGraph struct {
}

func NewCallGraph() CallGraph {
return *&CallGraph{}
return CallGraph{}
}

func (c CallGraph) Analysis(funcName string, clzs []domain.JClassNode) string {
Expand Down
2 changes: 1 addition & 1 deletion pkg/application/evaluate/evaluator/models.go
Expand Up @@ -35,5 +35,5 @@ type EvaluateModel struct {
}

func NewEvaluateModel() EvaluateModel {
return *&EvaluateModel{Nullable: Nullable{Items: nil}}
return EvaluateModel{Nullable: Nullable{Items: nil}}
}
2 changes: 1 addition & 1 deletion pkg/application/refactor/base/models/jfull_identifier.go
Expand Up @@ -35,7 +35,7 @@ type JFullIdentifier struct {
}

func NewJFullIdentifier() JFullIdentifier {
identifier := *&JFullIdentifier{"", "", ""}
identifier := JFullIdentifier{"", "", ""}
methods = nil
fields = make(map[string]JField)
imports = nil
Expand Down
8 changes: 0 additions & 8 deletions pkg/infrastructure/ast/api/java_api_listener.go
Expand Up @@ -23,22 +23,18 @@ var currentPkg string

var identMap map[string]models.JIdentifier
var imports []string
var currentExtends = ""
var currentImplements = ""
var depInjectMap map[string]string

func NewJavaApiListener(jIdentMap map[string]models.JIdentifier, diMap map[string]string) *JavaApiListener {
isSpringRestController = false
currentClz = ""
currentPkg = ""
currentExtends = ""
currentImplements = ""

imports = nil
restApis = nil

identMap = jIdentMap
depInjectMap = diMap

params := make(map[string]string)
currentRestApi = models.RestApi{MethodParams: params}
Expand All @@ -64,10 +60,6 @@ func (s *JavaApiListener) EnterClassDeclaration(ctx *parser.ClassDeclarationCont
currentClz = ctx.IDENTIFIER().GetText()
}

if ctx.EXTENDS() != nil {
currentExtends = ctx.TypeType().GetText()
}

if ctx.IMPLEMENTS() != nil {
currentImplements = ctx.TypeList().GetText()
}
Expand Down

0 comments on commit 8ef9fa6

Please sign in to comment.