未验证 提交 4bfe6bc7 编写于 作者: P Phodal Huang

refactor: refactor path

上级 4f55b3ed
......@@ -3,7 +3,7 @@ package cmd
import (
. "coca/src/adapter/api"
"coca/src/adapter/models"
"coca/src/call_graph"
"coca/src/domain/call_graph"
. "coca/src/support"
"encoding/json"
"github.com/olekukonko/tablewriter"
......
package cmd
import (
"coca/src/bs"
"coca/src/domain/bs"
"coca/src/support"
"encoding/json"
"github.com/spf13/cobra"
......
......@@ -2,7 +2,7 @@ package cmd
import (
"coca/src/adapter/models"
. "coca/src/call_graph"
. "coca/src/domain/call_graph"
. "coca/src/support"
"encoding/json"
"github.com/spf13/cobra"
......
......@@ -2,7 +2,7 @@ package cmd
import (
"coca/src/adapter/models"
"coca/src/concept"
"coca/src/domain/concept"
. "coca/src/support"
"encoding/json"
"github.com/spf13/cobra"
......
package cmd
import (
. "coca/src/gitt"
. "coca/src/domain/gitt"
"fmt"
"github.com/olekukonko/tablewriter"
"github.com/spf13/cobra"
......
package cmd
import (
. "coca/src/refactor/move_class"
. "coca/src/refactor/rename"
. "coca/src/refactor/unused"
. "coca/src/domain/refactor/move_class"
. "coca/src/domain/refactor/rename"
. "coca/src/domain/refactor/unused"
"github.com/spf13/cobra"
)
......
......@@ -2,7 +2,7 @@ package main_test
import (
"coca/src/gitt"
"coca/src/domain/gitt"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
......
package bs
import (
"coca/src/domain/bs/models"
"coca/src/support"
"encoding/json"
"fmt"
......@@ -10,11 +11,10 @@ import (
"strconv"
"strings"
. "coca/src/bs/models"
. "coca/src/language/java"
)
var nodeInfos []JFullClassNode
var nodeInfos []models.JFullClassNode
type BadSmellModel struct {
File string `json:"File,omitempty"`
......@@ -30,7 +30,7 @@ func (j *BadSmellApp) AnalysisPath(codeDir string, ignoreRules []string) []BadSm
nodeInfos = nil
files := (*BadSmellApp)(nil).javaFiles(codeDir)
for index := range files {
nodeInfo := NewJFullClassNode()
nodeInfo := models.NewJFullClassNode()
file := files[index]
displayName := filepath.Base(file)
......@@ -72,7 +72,7 @@ func filterBadsmellList(models []BadSmellModel, ignoreRules map[string]bool) []B
return results
}
func analysisBadSmell(nodes []JFullClassNode) []BadSmellModel {
func analysisBadSmell(nodes []models.JFullClassNode) []BadSmellModel {
var badSmellList []BadSmellModel
for _, node := range nodes {
// To be Defined number
......@@ -140,7 +140,7 @@ func analysisBadSmell(nodes []JFullClassNode) []BadSmellModel {
return badSmellList
}
func withOutGetterSetterClass(fullMethods []JFullMethod) int {
func withOutGetterSetterClass(fullMethods []models.JFullMethod) int {
var normalMethodSize = 0
for _, method := range fullMethods {
if !strings.Contains(method.Name, "get") && !strings.Contains(method.Name, "set") {
......
package bs
import (
. "coca/src/bs/models"
"coca/src/domain/bs/models"
. "coca/src/language/java"
"github.com/antlr/antlr4/runtime/Go/antlr"
"reflect"
......@@ -17,13 +17,13 @@ var currentClzType string
var currentClzExtends string
var currentClzImplements []string
var methods []JFullMethod
var methodCalls []JFullMethodCall
var methods []models.JFullMethod
var methodCalls []models.JFullMethodCall
var fields = make(map[string]string)
var localVars = make(map[string]string)
var formalParameters = make(map[string]string)
var currentClassBs ClassBadSmellInfo
var currentClassBs models.ClassBadSmellInfo
func NewBadSmellListener() *BadSmellListener {
currentClz = ""
......@@ -39,8 +39,8 @@ type BadSmellListener struct {
BaseJavaParserListener
}
func (s *BadSmellListener) getNodeInfo() *JFullClassNode {
return &JFullClassNode{
func (s *BadSmellListener) getNodeInfo() *models.JFullClassNode {
return &models.JFullClassNode{
currentPkg,
currentClz,
currentClzType,
......@@ -105,7 +105,7 @@ func (s *BadSmellListener) EnterInterfaceMethodDeclaration(ctx *InterfaceMethodD
typeType := ctx.TypeTypeOrVoid().GetText()
var methodParams []JFullParameter = nil
var methodParams []models.JFullParameter = nil
parameters := ctx.FormalParameters()
if parameters != nil {
if reflect.TypeOf(parameters.GetChild(1)).String() == "*parser.FormalParameterListContext" {
......@@ -115,14 +115,14 @@ func (s *BadSmellListener) EnterInterfaceMethodDeclaration(ctx *InterfaceMethodD
paramContext := param.(*FormalParameterContext)
paramType := paramContext.TypeType().GetText()
paramValue := paramContext.VariableDeclaratorId().(*VariableDeclaratorIdContext).IDENTIFIER().GetText()
methodParams = append(methodParams, *&JFullParameter{paramType, paramValue})
methodParams = append(methodParams, *&models.JFullParameter{paramType, paramValue})
}
}
}
methodBSInfo := *&MethodBadSmellInfo{0, 0}
methodBSInfo := *&models.MethodBadSmellInfo{0, 0}
method := &JFullMethod{
method := &models.JFullMethod{
name,
typeType,
startLine,
......@@ -168,7 +168,7 @@ func (s *BadSmellListener) EnterMethodDeclaration(ctx *MethodDeclarationContext)
typeType := ctx.TypeTypeOrVoid().GetText()
methodBody := ctx.MethodBody().GetText()
var methodParams []JFullParameter = nil
var methodParams []models.JFullParameter = nil
parameters := ctx.FormalParameters()
if parameters != nil {
if reflect.TypeOf(parameters.GetChild(1)).String() == "*parser.FormalParameterListContext" {
......@@ -178,17 +178,17 @@ func (s *BadSmellListener) EnterMethodDeclaration(ctx *MethodDeclarationContext)
paramContext := param.(*FormalParameterContext)
paramType := paramContext.TypeType().GetText()
paramValue := paramContext.VariableDeclaratorId().(*VariableDeclaratorIdContext).IDENTIFIER().GetText()
methodParams = append(methodParams, *&JFullParameter{paramType, paramValue})
methodParams = append(methodParams, *&models.JFullParameter{paramType, paramValue})
localVars[paramValue] = paramType
}
}
}
methodBSInfo := *&MethodBadSmellInfo{0, 0}
methodBSInfo := *&models.MethodBadSmellInfo{0, 0}
methodBadSmellInfo := buildMethodBSInfo(ctx, methodBSInfo)
method := &JFullMethod{
method := &models.JFullMethod{
name,
typeType,
startLine,
......@@ -202,7 +202,7 @@ func (s *BadSmellListener) EnterMethodDeclaration(ctx *MethodDeclarationContext)
methods = append(methods, *method)
}
func buildMethodBSInfo(context *MethodDeclarationContext, bsInfo MethodBadSmellInfo) MethodBadSmellInfo {
func buildMethodBSInfo(context *MethodDeclarationContext, bsInfo models.MethodBadSmellInfo) models.MethodBadSmellInfo {
methodBody := context.MethodBody()
blockContext := methodBody.GetChild(0)
if reflect.TypeOf(blockContext).String() == "*parser.BlockContext" {
......@@ -275,16 +275,16 @@ func (s *BadSmellListener) EnterMethodCall(ctx *MethodCallContext) {
targetType = currentClzExtends
}
if fullType != "" {
jMethodCall := &JFullMethodCall{removeTarget(fullType), "", targetType, callee, startLine, startLinePosition, stopLine, stopLinePosition}
jMethodCall := &models.JFullMethodCall{removeTarget(fullType), "", targetType, callee, startLine, startLinePosition, stopLine, stopLinePosition}
methodCalls = append(methodCalls, *jMethodCall)
} else {
if ctx.GetText() == targetType {
methodName := ctx.IDENTIFIER().GetText()
jMethodCall := &JFullMethodCall{currentPkg, "", currentClz, methodName, startLine, startLinePosition, stopLine, stopLinePosition}
jMethodCall := &models.JFullMethodCall{currentPkg, "", currentClz, methodName, startLine, startLinePosition, stopLine, stopLinePosition}
methodCalls = append(methodCalls, *jMethodCall)
} else {
methodName := ctx.IDENTIFIER().GetText()
jMethodCall := &JFullMethodCall{currentPkg, "NEEDFIX", targetType, methodName, startLine, startLinePosition, stopLine, stopLinePosition}
jMethodCall := &models.JFullMethodCall{currentPkg, "NEEDFIX", targetType, methodName, startLine, startLinePosition, stopLine, stopLinePosition}
methodCalls = append(methodCalls, *jMethodCall)
}
}
......@@ -303,7 +303,7 @@ func (s *BadSmellListener) EnterExpression(ctx *ExpressionContext) {
stopLine := ctx.GetStop().GetLine()
stopLinePosition := startLinePosition + len(text)
jMethodCall := &JFullMethodCall{removeTarget(fullType), "", targetType, methodName, startLine, startLinePosition, stopLine, stopLinePosition}
jMethodCall := &models.JFullMethodCall{removeTarget(fullType), "", targetType, methodName, startLine, startLinePosition, stopLine, stopLinePosition}
methodCalls = append(methodCalls, *jMethodCall)
}
}
......
......@@ -2,7 +2,7 @@ package concept
import (
"coca/src/adapter/models"
"coca/src/call_graph/stop_words/languages"
languages2 "coca/src/domain/call_graph/stop_words/languages"
"coca/src/support"
"fmt"
)
......@@ -116,7 +116,7 @@ var itStopWords = []string{
func removeNormalWords(words map[string]int) map[string]int {
var newWords = words
var stopwords = languages.ENGLISH_STOP_WORDS
var stopwords = languages2.ENGLISH_STOP_WORDS
stopwords = append(stopwords, itStopWords...)
for _, normalWord := range stopwords {
if newWords[normalWord] > 0 {
......
......@@ -2,7 +2,7 @@ package gitt
import (
"bytes"
. "coca/src/gitt/apriori"
"coca/src/domain/gitt/apriori"
"encoding/json"
"fmt"
"log"
......@@ -103,7 +103,7 @@ type TopAuthor struct {
LineCount int
}
func GetRelatedFiles(commitMessages []CommitMessage, relatedConfig []byte) []RelationRecord {
func GetRelatedFiles(commitMessages []CommitMessage, relatedConfig []byte) []apriori.RelationRecord {
var dataset [][]string
for _, commitMessage := range commitMessages {
var set []string
......@@ -123,7 +123,7 @@ func GetRelatedFiles(commitMessages []CommitMessage, relatedConfig []byte) []Rel
}
}
var newOptions Options = NewOptions(0.1, 0.9, 0, 0)
var newOptions apriori.Options = apriori.NewOptions(0.1, 0.9, 0, 0)
decoder := json.NewDecoder(bytes.NewReader(relatedConfig))
decoder.UseNumber()
......@@ -134,7 +134,7 @@ func GetRelatedFiles(commitMessages []CommitMessage, relatedConfig []byte) []Rel
}
fmt.Println(newOptions)
apriori := NewApriori(dataset)
apriori := apriori.NewApriori(dataset)
result := apriori.Calculate(newOptions)
for _, res := range result {
......
package base
import (
models2 "coca/src/domain/refactor/base/models"
. "coca/src/language/java"
"coca/src/refactor/base/models"
"strings"
"unicode"
)
var node *models.JFullIdentifier;
var node *models2.JFullIdentifier;
type JavaRefactorListener struct {
BaseJavaParserListener
......@@ -19,7 +19,7 @@ func (s *JavaRefactorListener) EnterPackageDeclaration(ctx *PackageDeclarationCo
startLine := ctx.GetStart().GetLine()
stopLine := ctx.GetStop().GetLine()
pkgInfo := &models.JPkgInfo{node.Pkg, startLine, stopLine}
pkgInfo := &models2.JPkgInfo{node.Pkg, startLine, stopLine}
node.SetPkgInfo(*pkgInfo)
}
......@@ -31,7 +31,7 @@ func (s *JavaRefactorListener) EnterImportDeclaration(ctx *ImportDeclarationCont
startLine := ctx.GetStart().GetLine()
stopLine := ctx.GetStop().GetLine()
jImport := &models.JImport{importText, startLine, stopLine}
jImport := &models2.JImport{importText, startLine, stopLine}
node.AddImport(*jImport)
}
......@@ -46,7 +46,7 @@ func (s *JavaRefactorListener) EnterQualifiedNameList(ctx *QualifiedNameListCont
for _, qualified := range ctx.AllQualifiedName() {
startLine := ctx.GetStart().GetLine()
stopLine := ctx.GetStop().GetLine()
field := &models.JField{qualified.GetText(), node.Pkg, startLine, stopLine}
field := &models2.JField{qualified.GetText(), node.Pkg, startLine, stopLine}
node.AddField(*field)
}
}
......@@ -55,7 +55,7 @@ func (s *JavaRefactorListener) EnterCatchType(ctx *CatchTypeContext) {
for _, qualified := range ctx.AllQualifiedName() {
startLine := ctx.GetStart().GetLine()
stopLine := ctx.GetStop().GetLine()
field := &models.JField{qualified.GetText(), node.Pkg, startLine, stopLine}
field := &models2.JField{qualified.GetText(), node.Pkg, startLine, stopLine}
node.AddField(*field)
}
}
......@@ -68,7 +68,7 @@ func (s *JavaRefactorListener) EnterInterfaceMethodDeclaration(ctx *InterfaceMet
stopLinePosition := ctx.GetStop().GetColumn()
name := ctx.IDENTIFIER().GetText()
//XXX: find the start position of {, not public
method := &models.JFullMethod{name, startLine, startLinePosition, stopLine, stopLinePosition}
method := &models2.JFullMethod{name, startLine, startLinePosition, stopLine, stopLinePosition}
node.AddMethod(*method)
}
......@@ -80,7 +80,7 @@ func (s *JavaRefactorListener) EnterInterfaceDeclaration(ctx *InterfaceDeclarati
func (s *JavaRefactorListener) EnterTypeType(ctx *TypeTypeContext) {
startLine := ctx.GetStart().GetLine()
stopLine := ctx.GetStop().GetLine()
field := &models.JField{ctx.GetText(), node.Pkg, startLine, stopLine}
field := &models2.JField{ctx.GetText(), node.Pkg, startLine, stopLine}
node.AddField(*field)
}
......@@ -92,7 +92,7 @@ func (s *JavaRefactorListener) EnterClassOrInterfaceType(ctx *ClassOrInterfaceTy
startLine := ctx.GetStart().GetLine()
stopLine := ctx.GetStop().GetLine()
field := &models.JField{name, node.Pkg, startLine, stopLine}
field := &models2.JField{name, node.Pkg, startLine, stopLine}
node.AddField(*field)
}
}
......@@ -103,7 +103,7 @@ func (s *JavaRefactorListener) EnterAnnotation(ctx *AnnotationContext) {
startLine := ctx.GetStart().GetLine()
stopLine := ctx.GetStop().GetLine()
field := &models.JField{annotation, node.Pkg, startLine, stopLine}
field := &models2.JField{annotation, node.Pkg, startLine, stopLine}
node.AddField(*field)
}
......@@ -115,7 +115,7 @@ func (s *JavaRefactorListener) EnterLambdaParameters(ctx *LambdaParametersContex
startLine := ctx.GetStart().GetLine()
stopLine := ctx.GetStop().GetLine()
field := &models.JField{name, node.Pkg, startLine, stopLine}
field := &models2.JField{name, node.Pkg, startLine, stopLine}
node.AddField(*field)
}
}
......@@ -124,7 +124,7 @@ func (s *JavaRefactorListener) EnterMethodCall(ctx *MethodCallContext) {
text := ctx.IDENTIFIER().GetText()
startLine := ctx.GetStart().GetLine()
stopLine := ctx.GetStop().GetLine()
field := &models.JField{text, node.Pkg, startLine, stopLine}
field := &models2.JField{text, node.Pkg, startLine, stopLine}
node.AddField(*field)
}
......@@ -134,7 +134,7 @@ func (s *JavaRefactorListener) EnterExpressionList(ctx *ExpressionListContext) {
if isUppercaseText(expText) {
startLine := ctx.GetStart().GetLine()
stopLine := ctx.GetStop().GetLine()
field := &models.JField{expText, node.Pkg, startLine, stopLine}
field := &models2.JField{expText, node.Pkg, startLine, stopLine}
node.AddField(*field)
}
}
......@@ -146,7 +146,7 @@ func (s *JavaRefactorListener) EnterStatement(ctx *StatementContext) {
if isUppercaseText(expText) {
startLine := ctx.GetStart().GetLine()
stopLine := ctx.GetStop().GetLine()
field := &models.JField{expText, node.Pkg, startLine, stopLine}
field := &models2.JField{expText, node.Pkg, startLine, stopLine}
node.AddField(*field)
}
}
......@@ -160,7 +160,7 @@ func (s *JavaRefactorListener) EnterCreatedName(ctx *CreatedNameContext) {
startLine := ctx.GetStart().GetLine()
stopLine := ctx.GetStop().GetLine()
field := &models.JField{name, node.Pkg, startLine, stopLine}
field := &models2.JField{name, node.Pkg, startLine, stopLine}
node.AddField(*field)
}
}
......@@ -172,7 +172,7 @@ func (s *JavaRefactorListener) EnterExpression(ctx *ExpressionContext) {
if isUppercaseText(expText) {
startLine := ctx.GetStart().GetLine()
stopLine := ctx.GetStop().GetLine()
field := &models.JField{expText, node.Pkg, startLine, stopLine}
field := &models2.JField{expText, node.Pkg, startLine, stopLine}
node.AddField(*field)
}
}
......@@ -192,7 +192,7 @@ func (s *JavaRefactorListener) EnterExpression(ctx *ExpressionContext) {
if isUppercaseText(expText) {
startLine := ctx.GetStart().GetLine()
stopLine := ctx.GetStop().GetLine()
field := &models.JField{expText, node.Pkg, startLine, stopLine}
field := &models2.JField{expText, node.Pkg, startLine, stopLine}
node.AddField(*field)
}
}
......@@ -203,6 +203,6 @@ func isUppercaseText(text string) bool {
return !strings.Contains(text, ".") && unicode.IsUpper([]rune(text)[0])
}
func (s *JavaRefactorListener) InitNode(identifier *models.JFullIdentifier) {
func (s *JavaRefactorListener) InitNode(identifier *models2.JFullIdentifier) {
node = identifier
}
......@@ -2,9 +2,9 @@ package move_class
import (
"bufio"
"coca/src/refactor/base"
"coca/src/refactor/base/models"
"coca/src/refactor/utils"
base2 "coca/src/domain/refactor/base"
models2 "coca/src/domain/refactor/base/models"
utils3 "coca/src/domain/refactor/utils"
utils2 "coca/src/support"
"fmt"
"github.com/antlr/antlr4/runtime/Go/antlr"
......@@ -20,7 +20,7 @@ var currentFile string
var moveConfig string
var configPath string
var nodes []models.JMoveStruct
var nodes []models2.JMoveStruct
type MoveClassApp struct {
}
......@@ -35,7 +35,7 @@ func NewMoveClassApp(config string, pPath string) *MoveClassApp {
func (j *MoveClassApp) Analysis() {
// TODO: 使用 Deps.json 来移动包
files := utils.GetJavaFiles(configPath)
files := utils3.GetJavaFiles(configPath)
fmt.Println(files)
for index := range files {
file := files[index]
......@@ -43,16 +43,16 @@ func (j *MoveClassApp) Analysis() {
currentFile, _ = filepath.Abs(file)
//displayName := filepath.Base(file)
parser := utils.ProcessFile(file)
parser := utils3.ProcessFile(file)
context := parser.CompilationUnit()
node := models.NewJFullIdentifier()
listener := new(base.JavaRefactorListener)
node := models2.NewJFullIdentifier()
listener := new(base2.JavaRefactorListener)
listener.InitNode(node)
antlr.NewParseTreeWalker().Walk(listener, context)
moveStruct := &models.JMoveStruct{node, currentFile, node.GetImports()}
moveStruct := &models2.JMoveStruct{node, currentFile, node.GetImports()}
nodes = append(nodes, *moveStruct)
}
......@@ -87,8 +87,8 @@ func parseRename() {
}
}
func updatePackageInfo(structs []models.JMoveStruct, originImport string, newImport string) {
var originNode models.JMoveStruct
func updatePackageInfo(structs []models2.JMoveStruct, originImport string, newImport string) {
var originNode models2.JMoveStruct
for index := range nodes {
node := nodes[index]
if originImport == node.Pkg + "." + node.Name {
......
......@@ -2,8 +2,8 @@ package unused
import (
. "coca/src/adapter/models"
"coca/src/refactor/base/models"
support2 "coca/src/refactor/rename/support"
models2 "coca/src/domain/refactor/base/models"
support3 "coca/src/domain/refactor/rename/support"
"coca/src/support"
"encoding/json"
"io/ioutil"
......@@ -11,8 +11,8 @@ import (
"strings"
)
var parsedChange []support2.RefactorChangeRelate
var nodes []models.JMoveStruct
var parsedChange []support3.RefactorChangeRelate
var nodes []models2.JMoveStruct
type RemoveMethodApp struct {
}
......@@ -44,17 +44,17 @@ func (j *RemoveMethodApp) Start() {
conf = string(configBytes)
parsedChange = support2.ParseRelates(conf)
parsedChange = support3.ParseRelates(conf)
startParse(parsedDeps, parsedChange)
}
func startParse(nodes []JClassNode, relates []support2.RefactorChangeRelate) {
func startParse(nodes []JClassNode, relates []support3.RefactorChangeRelate) {
for _, pkgNode := range nodes {
for _, related := range relates {
oldInfo := support2.BuildMethodPackageInfo(related.OldObj)
newInfo := support2.BuildMethodPackageInfo(related.NewObj)
oldInfo := support3.BuildMethodPackageInfo(related.OldObj)
newInfo := support3.BuildMethodPackageInfo(related.NewObj)
if pkgNode.Package+pkgNode.Class == oldInfo.Package+oldInfo.Class {
for _, method := range pkgNode.Methods {
......@@ -79,7 +79,7 @@ func methodCallToMethodModel(call JMethodCall) *JMethod {
return &JMethod{call.MethodName, call.Type, call.StartLine, call.StartLinePosition, call.StopLine, call.StopLinePosition, nil, nil, false}
}
func updateSelfRefs(node JClassNode, method JMethod, info *support2.PackageClassInfo) {
func updateSelfRefs(node JClassNode, method JMethod, info *support3.PackageClassInfo) {
path := node.Path
input, err := ioutil.ReadFile(path)
if err != nil {
......
package unused
import (
"coca/src/refactor/base"
"coca/src/refactor/base/models"
"coca/src/refactor/utils"
base2 "coca/src/domain/refactor/base"
models2 "coca/src/domain/refactor/base/models"
utils2 "coca/src/domain/refactor/utils"
"fmt"
"github.com/antlr/antlr4/runtime/Go/antlr"
"io/ioutil"
......@@ -19,7 +19,7 @@ var configPath string
type RemoveUnusedImportApp struct {
}
var nodes []models.JMoveStruct
var nodes []models2.JMoveStruct
func NewRemoveUnusedImportApp(config string, pPath string) *RemoveUnusedImportApp {
moveConfig = config
......@@ -30,7 +30,7 @@ func NewRemoveUnusedImportApp(config string, pPath string) *RemoveUnusedImportAp
}
func (j *RemoveUnusedImportApp) Analysis() {
files := utils.GetJavaFiles(configPath)
files := utils2.GetJavaFiles(configPath)
for index := range files {
file := files[index]
......@@ -38,11 +38,11 @@ func (j *RemoveUnusedImportApp) Analysis() {
displayName := filepath.Base(file)
fmt.Println("Start parse java call: " + displayName)
parser := utils.ProcessFile(file)
parser := utils2.ProcessFile(file)
context := parser.CompilationUnit()
node := models.NewJFullIdentifier()
listener := new(base.JavaRefactorListener)
node := models2.NewJFullIdentifier()
listener := new(base2.JavaRefactorListener)
listener.InitNode(node)
antlr.NewParseTreeWalker().Walk(listener, context)
......@@ -53,7 +53,7 @@ func (j *RemoveUnusedImportApp) Analysis() {
}
}
func handleNode(node *models.JFullIdentifier) {
func handleNode(node *models2.JFullIdentifier) {
var fields = node.GetFields()
var imports = node.GetImports()
......@@ -87,7 +87,7 @@ func removeImportByLines(file string, errorLines []int) {
}
}
func removeImportByLineNum(imp models.JImport, line int) {
func removeImportByLineNum(imp models2.JImport, line int) {
removeLine(currentFile, line)
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册