Skip to content

Commit

Permalink
feat: idea and vscode config folder ignore (swaggo#133)
Browse files Browse the repository at this point in the history
  • Loading branch information
pei0804 authored and easonlin404 committed May 24, 2018
1 parent faa91b1 commit 7f43daa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,8 @@ func (parser *Parser) getAllGoFileInfo(searchDir string) {
//exclude vendor folder
if ext := filepath.Ext(path); ext == ".go" &&
!strings.Contains(string(os.PathSeparator)+path, string(os.PathSeparator)+"vendor"+string(os.PathSeparator)) &&
!strings.Contains(string(os.PathSeparator)+path, string(os.PathSeparator)+".history"+string(os.PathSeparator)) &&
!strings.Contains(string(os.PathSeparator)+path, string(os.PathSeparator)+".idea"+string(os.PathSeparator)) &&
!strings.Contains(string(os.PathSeparator)+path, string(os.PathSeparator)+".git"+string(os.PathSeparator)) {
fset := token.NewFileSet() // positions are relative to fset
astFile, err := goparser.ParseFile(fset, path, nil, goparser.ParseComments)
Expand Down

0 comments on commit 7f43daa

Please sign in to comment.