File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -521,6 +521,21 @@ def testErrorSuppression(self):
521
521
'' ],
522
522
error_collector )
523
523
self .assertEquals ('' , error_collector .Results ())
524
+ # NOLINT, NOLINTNEXTLINE silences the readability/braces warning for "};".
525
+ error_collector = ErrorCollector (self .assert_ )
526
+ cpplint .ProcessFileData ('test.cc' , 'cc' ,
527
+ ['// Copyright 2014 Your Company.' ,
528
+ 'for (int i = 0; i != 100; ++i) {' ,
529
+ '\t std::cout << i << std::endl;' ,
530
+ '}; // NOLINT' ,
531
+ 'for (int i = 0; i != 100; ++i) {' ,
532
+ '\t std::cout << i << std::endl;' ,
533
+ '// NOLINTNEXTLINE' ,
534
+ '};' ,
535
+ '// LINT_KERNEL_FILE' ,
536
+ '' ],
537
+ error_collector )
538
+ self .assertEquals ('' , error_collector .Results ())
524
539
525
540
# Test Variable Declarations.
526
541
def testVariableDeclarations (self ):
You can’t perform that action at this time.
0 commit comments