File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -54,8 +54,7 @@ var allRules = []lint.Rule{
5454// 2. check for conf flag
5555// 3. load default conf
5656func GetConfig (confFilePath string ) (* lint.Config , error ) {
57- confFilePath = filepath .Clean (confFilePath )
58-
57+ // get current directory
5958 currentDir , err := os .Getwd ()
6059 if err != nil {
6160 return nil , err
@@ -67,10 +66,12 @@ func GetConfig(confFilePath string) (*lint.Config, error) {
6766 confFilePath = currentDirConf
6867 }
6968
69+ // if confFilePath empty, means no config in current directory or config flag is empty
7070 if confFilePath == "" {
7171 return defConf , nil
7272 }
7373
74+ confFilePath = filepath .Clean (confFilePath )
7475 conf , err := Parse (confFilePath )
7576 if err != nil {
7677 return nil , err
You can’t perform that action at this time.
0 commit comments