Skip to content

Commit

Permalink
Fixed lint checking directories it shouldn't be (#10147)
Browse files Browse the repository at this point in the history
Lint earlier checked _venv/ and .git/ which it shouldn't be checking.
  • Loading branch information
Cactusmachete authored and jgraham committed Mar 23, 2018
1 parent 174f764 commit b705dc1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tools/gitignore/gitignore.py
Expand Up @@ -90,7 +90,7 @@ def parse_line(line):
if dir_only:
line = line[:-1]

return invert, dir_only, fnmatch_translate(line, "/" in line)
return invert, dir_only, fnmatch_translate(line, dir_only)


class PathFilter(object):
Expand Down
5 changes: 2 additions & 3 deletions tools/lint/lint.py
Expand Up @@ -60,7 +60,7 @@ def setup_logging(prefix=False):
%s: %s"""

def all_filesystem_paths(repo_root, subdir=None):
path_filter = PathFilter(repo_root, extras=[".git/*"])
path_filter = PathFilter(repo_root, extras=[".git/"])
if subdir:
expanded_path = subdir
else:
Expand All @@ -72,8 +72,7 @@ def all_filesystem_paths(repo_root, subdir=None):
yield path
dirnames[:] = [item for item in dirnames if
path_filter(os.path.relpath(os.path.join(dirpath, item) + "/",
repo_root))]

repo_root)+"/")]

def _all_files_equal(paths):
"""
Expand Down

0 comments on commit b705dc1

Please sign in to comment.