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

Issue 7801048: Handle '//:lint' and '//:nolint' comments.

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 7 months ago by usrbincc
Modified:
12 years, 6 months ago
Reviewers:
peterhal, slightlylate, arv
CC:
traceur-compiler-reviews_googlegroups.com
Base URL:
https://code.google.com/p/traceur-compiler/@master
Visibility:
Public.

Description

Handle '//:lint' and '//:nolint' comments. Currently this only disables 'strictSemicolons' inside 'nolint' zones. The transition from 'nolint' to 'lint' is a little tricky since comments are not tokens, meaning that for proper transition back to 'lint' mode, you need to make sure there is a semicolon (i.e. you have to manually add a token) either before or after the 'lint' to make sure any errors from the 'nolint' side don't leak through. - Add 'ignoreNolint' option. BUG=None TEST=test/feature/Syntax/Error_StrictSemiColonsNoLint.js test/feature/Syntax/StrictSemiColonsNoLint.js

Patch Set 1 #

Patch Set 2 : Move comment-handling to the parser, add 'ignoreNolint' option. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+88 lines, -8 lines) Patch
M src/options.js View 1 1 chunk +1 line, -0 lines 1 comment Download
M src/syntax/Parser.js View 1 5 chunks +14 lines, -3 lines 0 comments Download
M src/syntax/Scanner.js View 1 4 chunks +9 lines, -5 lines 0 comments Download
A test/feature/Syntax/Error_StrictSemiColonsNoLint.js View 1 chunk +34 lines, -0 lines 0 comments Download
A test/feature/Syntax/StrictSemiColonsNoLint.js View 1 chunk +30 lines, -0 lines 0 comments Download

Messages

Total messages: 9
usrbincc
Note: I'm just cleaning out old issues. New patches will go through github once I ...
12 years, 7 months ago (2013-03-30 16:45:08 UTC) #1
arv
I don't think we want to do this at this layer. Can we either use ...
12 years, 6 months ago (2013-04-02 17:51:33 UTC) #2
usrbincc
The problem is that there doesn't currently exist a linter that accepts ES6, and certainly ...
12 years, 6 months ago (2013-04-02 18:24:42 UTC) #3
usrbincc
I moved the comment-handling into the parser. While this still doesn't save comments, the parser ...
12 years, 6 months ago (2013-04-05 15:51:31 UTC) #4
arv
On 2013/04/05 15:51:31, usrbincc wrote: > I moved the comment-handling into the parser. While this ...
12 years, 6 months ago (2013-04-05 16:52:45 UTC) #5
usrbincc
> I like the parser changes but I'm still not sold that we want to ...
12 years, 6 months ago (2013-04-05 19:04:35 UTC) #6
arv
LGTM I'll commit this for you since I have the tools ready
12 years, 6 months ago (2013-04-05 19:16:42 UTC) #7
arv
Committed as f8914ea2fe3287840c6770a900bfbe5ffea7d9dd
12 years, 6 months ago (2013-04-05 19:29:26 UTC) #8
usrbincc
12 years, 6 months ago (2013-04-07 01:55:50 UTC) #9
Thanks for the commit. I promise, you'll love traceur's regained semicolon-checking powers so much that you'll forget about the code that makes it possible. I apologize in advance for the extra contortion coming in my next pull request. Here is where I metaphorically lock the doors and turn the lights out before leaving the codereview building for the last time. I'm glad I got the chance to get the codereview experience -- I can see the strengths and weaknesses of github that much more clearly, having something to compare it against. A github pull request corresponds roughly to a single patch set of a codereview issue. I think if github made it possible to deal with pull requests the way codereview deals with patch sets, that would be the ultimate combination. And seriously, github, don't make pieces of the pull request suddenly morph and disappear just because someone did a 'git push -f'! [end rant] I feel like codereview seems to foster a more careful approach. I know that constant iteration is still the side to bet on, but I can't help thinking that this needs to be tempered with periods of more thoughtfulness. I'm sure I'll feel nostalgic about github when the time comes, but we'll cross that bridge when we get to it (when the more frenetic successor to github takes over).
Sign in to reply to this message.

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