summaryrefslogtreecommitdiffstats
path: root/PRESUBMIT.py
diff options
context:
space:
mode:
authordbeam <dbeam@chromium.org>2015-06-01 18:40:23 -0700
committerCommit bot <commit-bot@chromium.org>2015-06-02 01:40:56 +0000
commit95c35a2fad1b1c077ac233d338ea7e5e94c5315b (patch)
treeab3fcd94625b00d2b284ca35d0535dba95359fc9 /PRESUBMIT.py
parentdbd2ef9bb16d7fb63f44a992248b4dbed7f3f8e3 (diff)
downloadchromium_src-95c35a2fad1b1c077ac233d338ea7e5e94c5315b.zip
chromium_src-95c35a2fad1b1c077ac233d338ea7e5e94c5315b.tar.gz
chromium_src-95c35a2fad1b1c077ac233d338ea7e5e94c5315b.tar.bz2
Exclude .md files from version control conflict detection.
Turns out top-level headers basically look exactly like a merge conflict marker. R=jlklein@chromium.org BUG=495338 Review URL: https://codereview.chromium.org/1153013005 Cr-Commit-Position: refs/heads/master@{#332313}
Diffstat (limited to 'PRESUBMIT.py')
-rw-r--r--PRESUBMIT.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index 751ae52..2e33261 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -841,6 +841,10 @@ def _CheckForVersionControlConflictsInFile(input_api, f):
pattern = input_api.re.compile('^(?:<<<<<<<|>>>>>>>) |^=======$')
errors = []
for line_num, line in f.ChangedContents():
+ if f.LocalPath().endswith('.md'):
+ # First-level headers in markdown look a lot like version control
+ # conflict markers. http://daringfireball.net/projects/markdown/basics
+ continue
if pattern.match(line):
errors.append(' %s:%d %s' % (f.LocalPath(), line_num, line))
return errors