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

Unified Diff: Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py

Issue 609633004: Eliminate style rule about one space after punctuation. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 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 | « Tools/Scripts/webkitpy/style/checkers/cpp.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py
diff --git a/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py b/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py
index 4a92cfb67a9e3d2483e05979a94221b54f5b3725..ba4f010a1992d4d10d4ef2a2c4b32af0cb643817 100644
--- a/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py
+++ b/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py
@@ -1901,25 +1901,11 @@ class CppStyleTest(CppStyleTestBase):
self.assert_lint('printf("\\"%s // In quotes.")', '')
self.assert_lint('printf("%s", "// In quotes.")', '')
- def test_one_spaces_after_punctuation_in_comments(self):
+ def test_line_ending_in_whitespace(self):
self.assert_lint('int a; // This is a sentence.',
'')
self.assert_lint('int a; // This is a sentence. ',
'Line ends in whitespace. Consider deleting these extra spaces. [whitespace/end_of_line] [4]')
- self.assert_lint('int a; // This is a sentence. This is a another sentence.',
- '')
- self.assert_lint('int a; // This is a sentence. This is a another sentence.',
- 'Should have only a single space after a punctuation in a comment. [whitespace/comments] [5]')
- self.assert_lint('int a; // This is a sentence! This is a another sentence.',
- 'Should have only a single space after a punctuation in a comment. [whitespace/comments] [5]')
- self.assert_lint('int a; // Why did I write this? This is a another sentence.',
- 'Should have only a single space after a punctuation in a comment. [whitespace/comments] [5]')
- self.assert_lint('int a; // Elementary, my dear.',
- 'Should have only a single space after a punctuation in a comment. [whitespace/comments] [5]')
- self.assert_lint('int a; // The following should be clear: Is it?',
- 'Should have only a single space after a punctuation in a comment. [whitespace/comments] [5]')
- self.assert_lint('int a; // Look at the follow semicolon; I hope this gives an error.',
- 'Should have only a single space after a punctuation in a comment. [whitespace/comments] [5]')
def test_space_after_comment_marker(self):
self.assert_lint('//', '')
« no previous file with comments | « Tools/Scripts/webkitpy/style/checkers/cpp.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698