Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(877)

Issue 2428: Validate end of line (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
15 years, 10 months ago by Tom
Modified:
14 years, 9 months ago
Reviewers:
googletransitdatafeed, Joe Hughes
Base URL:
http://googletransitdatafeed.googlecode.com/svn/trunk/python/
Visibility:
Public.

Description

Add EndOfLineChecker, wrapper for a file-like object that checks for consistent line ends. It checks that each line ends in CRLF or LF, that lines do not contain other random characters that look like new line separators and that every line in the file ends with the same end of line sequence. Fixes http://code.google.com/p/googletransitdatafeed/issues/detail?id=27 Make RecordingProblemReporter stricter. Uses of it now explicitly list every exception. Fix some bugs where we reported a semantic problem for a field that was missing or had syntax errors.

Patch Set 1 #

Patch Set 2 : updated some comments #

Patch Set 3 : Add test data as zip #

Patch Set 4 : fix comments from review #

Patch Set 5 : after chatting with Joe #

Unified diffs Side-by-side diffs Delta from patch set Stats (+315 lines, -60 lines) Patch
test/data/bad_eol.zip View 0 chunks +-1 lines, --1 lines 0 comments Download
test/testtransitfeed.py View 1 2 3 4 16 chunks +155 lines, -29 lines 0 comments Download
transitfeed.py View 1 2 3 11 chunks +161 lines, -32 lines 0 comments Download

Messages

Total messages: 5
Tom
Please review
15 years, 10 months ago (2008-06-25 18:58:51 UTC) #1
Joe Hughes
Looks good, just a few readability comments below. I found myself wondering if there are ...
15 years, 10 months ago (2008-06-30 20:44:04 UTC) #2
Tom
Fixed the problems you found. Thanks http://codereview.appspot.com/2428/diff/7/25 File transitfeed.py (right): http://codereview.appspot.com/2428/diff/7/25#newcode2372 Line 2372: next() is ...
15 years, 10 months ago (2008-06-30 21:20:31 UTC) #3
Tom
How about this? http://codereview.appspot.com/2428/diff/7/23 File test/testtransitfeed.py (right): http://codereview.appspot.com/2428/diff/7/23#newcode135 Line 135: for l in f: pass ...
15 years, 10 months ago (2008-06-30 21:37:37 UTC) #4
Joe Hughes
15 years, 10 months ago (2008-06-30 21:56:50 UTC) #5
Much better.  Ship it!
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b