Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(111)

Unified Diff: PRESUBMIT.py

Issue 1153013005: Exclude .md files from version control conflict detection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: bettar Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | PRESUBMIT_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: PRESUBMIT.py
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index 751ae525751be38445e4bca2fd0a02c0ac7dd03e..2e33261c5af23b65309a1febb899020cf05f7eda 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
« no previous file with comments | « no previous file | PRESUBMIT_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698