Skip to content

Commit

Permalink
Preprocess wpt lint paths to be relative to the wpt root
Browse files Browse the repository at this point in the history
MozReview-Commit-ID: EUS7sjPhWoH

Upstreamed from https://bugzilla.mozilla.org/show_bug.cgi?id=1428582 [ci skip]
  • Loading branch information
gsnedders authored and jgraham committed Jan 23, 2018
1 parent 24f3c1e commit 19c7918
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/lint/lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,8 @@ def changed_files(wpt_root):

def lint_paths(kwargs, wpt_root):
if kwargs.get("paths"):
paths = kwargs["paths"]
r = os.path.realpath(wpt_root)
paths = [os.path.relpath(os.path.realpath(x), r) for x in kwargs["paths"]]
elif kwargs["all"]:
paths = list(all_filesystem_paths(wpt_root))
else:
Expand Down

0 comments on commit 19c7918

Please sign in to comment.