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

Issue 118370: Add InputApi.ReadFile() and presubmit_canned_checks.CheckChangeHasNoCR(). (Closed)

Created:
11 years, 6 months ago by M-A Ruel
Modified:
9 years, 7 months ago
Reviewers:
Jói Sigurðsson
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Add InputApi.ReadFile() and presubmit_canned_checks.CheckChangeHasNoCR(). ReadFile limits to reading files inside the repository. CheckChangeHasNoCR reads the text files looking for \r and fails if found. TEST=none BUG=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=17857

Patch Set 1 #

Patch Set 2 : version #

Patch Set 3 : Use mode 'rb' #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+84 lines, -7 lines) Patch
M presubmit_canned_checks.py View 1 2 1 chunk +12 lines, -0 lines 0 comments Download
M presubmit_support.py View 1 2 chunks +11 lines, -1 line 1 comment Download
M tests/presubmit_unittest.py View 1 2 5 chunks +61 lines, -6 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
M-A Ruel
11 years, 6 months ago (2009-06-08 00:48:48 UTC) #1
Jói Sigurðsson
11 years, 6 months ago (2009-06-08 10:52:50 UTC) #2
LGTM with nit

http://codereview.chromium.org/118370/diff/1008/7
File presubmit_support.py (right):

http://codereview.chromium.org/118370/diff/1008/7#newcode277
Line 277: Deny reading anything outside the repository."""
For consistency with the rest of the code, please do multi-line docstrings with
the trailing quote on a separate line:

"""foo
blat
gat.
"""

Single-line docstrings should still be on a single line,

"""Foo blat gat."""

Powered by Google App Engine
This is Rietveld 408576698