You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by bb...@apache.org on 2018/07/20 11:39:07 UTC
mesos git commit: Normalized paths passed to mesos-style.
Repository: mesos
Updated Branches:
refs/heads/master a1848c613 -> 7f74785fc
Normalized paths passed to mesos-style.
This make it possible to pass in slightly messier paths to
mesos-style, e.g., paths containing double directory separators.
Review: https://reviews.apache.org/r/67995/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/7f74785f
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/7f74785f
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/7f74785f
Branch: refs/heads/master
Commit: 7f74785fc3bccdce1ef5f2eb1586bf49b78336b8
Parents: a1848c6
Author: Benjamin Bannier <be...@mesosphere.io>
Authored: Fri Jul 20 13:35:02 2018 +0200
Committer: Benjamin Bannier <bb...@apache.org>
Committed: Fri Jul 20 13:35:02 2018 +0200
----------------------------------------------------------------------
support/mesos-style.py | 3 +++
support/python3/mesos-style.py | 3 +++
2 files changed, 6 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/7f74785f/support/mesos-style.py
----------------------------------------------------------------------
diff --git a/support/mesos-style.py b/support/mesos-style.py
index 4f3488c..a0ef221 100755
--- a/support/mesos-style.py
+++ b/support/mesos-style.py
@@ -186,6 +186,9 @@ class LinterBase(object):
for candidate in self.find_candidates(source_dir):
candidates.append(candidate)
+ # Normalize paths of any files give.
+ modified_files = map(os.path.normpath, modified_files)
+
# If file paths are specified, check all file paths that are
# candidates; else check all candidates.
file_paths = modified_files if modified_files else candidates
http://git-wip-us.apache.org/repos/asf/mesos/blob/7f74785f/support/python3/mesos-style.py
----------------------------------------------------------------------
diff --git a/support/python3/mesos-style.py b/support/python3/mesos-style.py
index cba47c3..12fd330 100755
--- a/support/python3/mesos-style.py
+++ b/support/python3/mesos-style.py
@@ -187,6 +187,9 @@ class LinterBase(object):
for candidate in self.find_candidates(source_dir):
candidates.append(candidate)
+ # Normalize paths of any files give.
+ modified_files = map(os.path.normpath, modified_files)
+
# If file paths are specified, check all file paths that are
# candidates; else check all candidates.
file_paths = modified_files if modified_files else candidates