Lines Matching +full:turing +full:- +full:complete
2 # -*- coding: utf-8; -*-
99 if error.find(substr) != -1:
111 def open(self, # pylint: disable-msg=C6409
138 # Single-line lint tests are allowed to fail the 'unlintable function'
440 ['Using C-style cast. Use static_cast<int64>(...) instead'
448 'Using C-style cast. Use static_cast<int64>(...) instead'
470 '// ./command' + (' -verbose' * 80),
562 # Test C-style cast cases.
566 'Using C-style cast. Use static_cast<int>(...) instead'
569 'int a = (int)-1.0;',
570 'Using C-style cast. Use static_cast<int>(...) instead'
574 'Using C-style cast. Use reinterpret_cast<int *>(...) instead'
579 'Using C-style cast. Use static_cast<uint16>(...) instead'
583 'Using C-style cast. Use static_cast<int32>(...) instead'
587 'Using C-style cast. Use static_cast<uint64>(...) instead'
608 self.TestLint('[](int/*unused*/) -> bool {', '')
609 self.TestLint('[](int /*unused*/) -> bool {', '')
610 self.TestLint('auto f = [](MyStruct* /*unused*/)->int {', '')
611 self.TestLint('[](int) -> bool {', '')
612 self.TestLint('auto f = [](MyStruct*)->int {', '')
626 variable &= ~Type1{0} - 1;
634 variable &= ~Type{0} - 1;
643 variable &= ~Type{0} - 1;
654 variable &= ~Type{0} - 1;
670 ['Using C-style cast. Use reinterpret_cast<int*>(...) '
683 self.TestLint('int* x = &down_cast<Obj*>(obj)->member_;', alt_error_msg)
685 self.TestLint('int* x = &(down_cast<Obj*>(obj)->member_);', '')
687 self.TestLint('int* x = &down_cast<Obj*>(obj)\n->member_;', alt_error_msg)
688 self.TestLint('int* x = &(down_cast<Obj*>(obj)\n->member_);', '')
694 # with taking address of old-style casts.
733 self.TestLint('X operator--(int);', '')
734 self.TestLint('X operator--(int /*unused*/) {', '')
756 'Using C-style cast. '
762 'Using C-style cast. '
772 self.TestLint('new const int(42);', '') # "new" on const-qualified type
773 self.TestLint('using a = bool(int arg);', '') # C++11 alias-declaration
779 'new(field_ptr) int(field->default_value_enum()->number());',
866 '#include "foo/long-foo.h"',
873 # typedef for pointer to function as C-style cast and produced
874 # false-positive error messages.
1009 """foo->swap(0,1);
1141 f('base/google_unittest.cc', 'base/google-inl.h'))
1172 #endif <- invalid preprocessor should be ignored
1173 */ <- invalid comment should be ignored too
1236 /* multi-liner
1243 r"""/* int a = 0; multi-liner
1245 'Could not find end of multi-line comment'
1247 self.TestMultiLineLint(r""" /* multi-line comment""",
1248 'Could not find end of multi-line comment'
1250 self.TestMultiLineLint(r""" // /* comment, but not multi-line""", '')
1264 'Multi-line string ("...") found. This lint script doesn\'t '
1280 # Test non-explicit single-argument constructors
1292 'Single-parameter constructors should be marked explicit.'
1301 'Single-parameter constructors should be marked explicit.'
1309 'Single-parameter constructors should be marked explicit.'
1317 'Single-parameter constructors should be marked explicit.'
1325 'Single-parameter constructors should be marked explicit.'
1333 'Single-parameter constructors should be marked explicit.'
1341 'Single-parameter constructors should be marked explicit.'
1348 'Single-parameter constructors should be marked explicit.'
1407 'Single-parameter constructors should be marked explicit.'
1415 'Single-parameter constructors should be marked explicit.'
1423 'Single-parameter constructors should be marked explicit.'
1433 # multi-argument constructors with all but one default argument should be
1442 # multi-argument constructors with all default arguments should be marked
1451 # explicit no-argument constructors are bad
1457 'Zero-parameter constructors should not be marked explicit.'
1459 # void constructors are considered no-argument
1465 'Zero-parameter constructors should not be marked explicit.'
1467 # No warning for multi-parameter constructors
1480 # single-argument constructors that take a function that takes multiple
1487 'Single-parameter constructors should be marked explicit.'
1489 # single-argument constructors that take a single template argument with
1497 'Single-parameter constructors should be marked explicit.'
1529 # non-constructor (but similar name), is okay
1640 'Could not find end of multi-line comment'
1644 'Could not find end of multi-line comment'
1692 ' memset(buf, -1, 0)',
1768 self.TestLint('->rand()', '')
1825 'printf(foo->c_str())',
1827 'Do printf("%s", foo->c_str()) instead.'
1852 'const string &turing',
1856 # "const Turing & a",
1877 # Variable-length arrays are not permitted.
1879 errmsg = ('Do not use variable-length arrays. Use an appropriately named '
1880 "('k' followed by CamelCase) compile-time constant for the size."
1887 self.TestLint('bool a_list[items_->size()];', errmsg)
1902 self.TestLint('int a[128 - sizeof(const bar)];', '')
2096 self.TestLint('CHECK(x->y == 42);',
2143 _STLP_DEFINE_BINARY_OP_CHECK(-, _OP_SUBTRACT);
2191 self.TestLint('#include "base/false-and-false.h"', '')
2196 # Passing and returning non-const references
2198 # Passing a non-const reference as function parameter is forbidden.
2199 operand_error_message = ('Is this a non-const reference? '
2202 # Warn of use of a non-const reference in operators and functions
2210 # Allow use of non-const references in a few specific cases
2218 # Returning a non-const reference from a function is OK.
2230 # Non-const reference to a pointer type is not OK.
2243 # Non-const reference to a templated type is not OK.
2255 # We don't get confused by C++11 range-based for loops.
2280 # Don't warn on out-of-line method definitions.
2338 # Multi-line references
2374 ' : lock_(&rcu_->mutex_) {',
2645 self.TestLint('if (foo<bar->baz) {', 'Missing spaces around <'
2647 self.TestLint('if (foo<bar->bar) {', 'Missing spaces around <'
2780 'Missing space around colon in range-based for loop'
2784 'Missing space around colon in range-based for loop'
2788 'Missing space around colon in range-based for loop'
2795 'Missing space around colon in range-based for loop'
2805 # The error message for a non-const global/static string variable.
3018 self.TestLint('//----', '')
3022 self.TestLint('///< x', '') # After-member Doxygen comment
3023 self.TestLint('//!< x', '') # After-member Doxygen comment
3047 'Do not use namespace using-directives. '
3048 'Use using-declarations instead.'
3080 'Line contains invalid UTF-8'
3101 # Make sure both NUL bytes and UTF-8 are caught if they appear on
3111 ['Line contains invalid UTF-8 (or Unicode replacement character).'
3413 self.TestLint('f(a, /* name */-1);', '')
3477 'Weird number of spaces at line-start. '
3478 'Are you using a 2-space indent? [whitespace/indent] [3]')
3480 'Weird number of spaces at line-start. '
3481 'Are you using a 2-space indent? [whitespace/indent] [3]')
3483 'Weird number of spaces at line-start. '
3484 'Are you using a 2-space indent? [whitespace/indent] [3]')
3497 'Weird number of spaces at line-start. '
3498 'Are you using a 2-space indent? [whitespace/indent] [3]')
3511 'Weird number of spaces at line-start. '
3512 'Are you using a 2-space indent? [whitespace/indent] [3]')
3743 # single-line if error.
3805 self.assertRaises(SystemExit, cpplint.ParseArguments, ['--badopt'])
3806 self.assertRaises(SystemExit, cpplint.ParseArguments, ['--help'])
3807 self.assertRaises(SystemExit, cpplint.ParseArguments, ['--v=0'])
3808 self.assertRaises(SystemExit, cpplint.ParseArguments, ['--filter='])
3809 # This is illegal because all filters must start with + or -
3810 self.assertRaises(SystemExit, cpplint.ParseArguments, ['--filter=foo'])
3812 ['--filter=+a,b,-c'])
3813 self.assertRaises(SystemExit, cpplint.ParseArguments, ['--headers'])
3820 cpplint.ParseArguments(['--v=1', 'foo.cc']))
3823 cpplint.ParseArguments(['--v=3', 'foo.h']))
3826 cpplint.ParseArguments(['--verbose=5', 'foo.cpp']))
3829 cpplint.ParseArguments, ['--v=f', 'foo.cc'])
3832 cpplint.ParseArguments(['--output=emacs', 'foo.cc']))
3835 cpplint.ParseArguments(['--output=vs7', 'foo.h']))
3838 cpplint.ParseArguments, ['--output=blah', 'foo.cc'])
3840 filt = '-,+whitespace,-whitespace/indent'
3842 cpplint.ParseArguments(['--filter='+filt, 'foo.h']))
3843 self.assertEquals(['-', '+whitespace', '-whitespace/indent'],
3850 cpplint.ParseArguments(['--linelength=120', 'foo.h']))
3854 cpplint.ParseArguments(['--extensions=hpp,cpp,cpp', 'foo.h']))
3859 cpplint.ParseArguments(['--extensions=cpp,cpp', '--headers=hpp,h', 'foo.h']))
3898 cpplint._cpplint_state.SetFilters('-,+whitespace,-whitespace/indent')
3911 cpplint._DEFAULT_FILTERS = ['-whitespace']
3949 ' https://google-styleguide.googlecode.com/svn/trunk/cppguide.xml#Namespaces'
3962 # Use multi-line linter because it performs the ClassState check.
3965 'Failed to find complete declaration of class Foo'
3970 'Failed to find complete declaration of namespace Foo'
4002 'Failed to find complete declaration of class Foo'
4011 'Uncommented text after #endif is non-standard. Use a comment.'
4018 'Inner-style forward declarations are invalid.'
4029 '([A-Z0-9_]+)',
4120 # Commentless endif for old-style guard
4142 if line.find('build/header_guard') != -1:
4145 # No header guard errors for old-style guard
4153 if line.find('build/header_guard') != -1:
4159 # Warn on old-style guard if verbosity is 0.
4239 # Skip this test in such a case because --root flag makes sense only
4246 # test --root flags:
4250 # left-strip the header guard by using a root dir inside of the repo dir.
4278 # --root flag is ignored if an non-existent directory is specified.
4295 expected_prefix = re.sub(r'[^a-zA-Z0-9]', '_', styleguide_dir_name).upper() + '_'
4384 r'printf(file, "The number is" "%-12q", value);',
4419 'Storage-class specifier (static, extern, typedef, etc) should be '
4444 # Build up random list of non-storage-class declaration specs.
4499 if message.find('legal/copyright') != -1:
4508 if message.find('legal/copyright') != -1:
4562 'C++11 class or function. Send c-style an example '
4573 'C++11 class or function. Send c-style an example '
4588 'For C++11-compatibility, omit template arguments from'
4593 'For C++11-compatibility, omit template arguments from'
4680 self.assertEquals('1.602176565e-19', collapse("1.602'176'565e-19"))
4760 'foo/foo-inl.h',
4776 self.assertEqual('foo/foo', cpplint._DropCommonSuffixes('foo/foo-inl.h'))
4801 self.TestLanguageRulesCheck('foo/foo.cc', Format(['"foo/foo-inl.h"']), '')
4802 self.TestLanguageRulesCheck('foo/foo.cc', Format(['"bar/bar-inl.h"']), '')
4808 '"foo/foo-inl.h"',
4812 '"bar/bar-inl.h"',
4825 Format(['"foo/bar-inl.h"',
4826 '"foo/foo-inl.h"']),
4839 # -inl.h headers are no longer special.
4841 Format(['"foo/foo-inl.h"', '<string>']),
4844 Format(['"foo/bar.h"', '"foo/bar-inl.h"']),
4863 # According to the style, -inl.h should come before .h, but we don't
4866 Format(['"foo/foo-inl.h"',
4869 '"base/google-inl.h"']),
4952 error_level: --v setting for cpplint.
4963 error_level: --v setting for cpplint.
4975 error_level: --v setting for cpplint.
4981 'test() has %d non-comment lines '
4997 """Generate and check function at the trigger level for --v setting.
5000 error_level: --v setting for cpplint.
5006 """Generate and check function just below the trigger level for --v setting.
5009 error_level: --v setting for cpplint.
5011 self.TestFunctionLengthCheckDefinition(self.TriggerLines(error_level)-1,
5012 error_level-1)
5015 """Generate and check function just above the trigger level for --v setting.
5018 error_level: --v setting for cpplint.
5062 self.TestFunctionLengthCheckDefinitionOK(self.TriggerLines(0)-1)
5086 self.TestFunctionLengthCheckDefinitionOK(self.TriggerLines(1)-1)
5101 'test_blanks() has %d non-comment lines '
5116 ' has %d non-comment lines '
5128 'TEST_F(Test, Mutator) has %d non-comment lines '
5143 'FixGoogleUpdate_AllValues_MachineApp) has %d non-comment lines '
5156 'TEST_F has %d non-comment lines '
5168 'test() has %d non-comment lines '
5176 + ' // NOLINT -- long function'),
5244 'CodeCoverageCL35256059() has 3000 non-comment lines '
5288 ' : lock_(&rcu_->mutex_) {',
5312 (2, 30, 22, -1), # Left shift operator
5315 (11, 54, 22, -1), # Greater than operator
5332 (6, 18, 0, -1), # -> operator
5334 (11, 54, 0, -1), # Greater than operator
5594 self.assertEquals(self.nesting_state.stack[-1].open_parentheses, 0)
5599 self.assertEquals(self.nesting_state.stack[-1].open_parentheses, 1)
5602 self.assertEquals(self.nesting_state.stack[-1].open_parentheses, 0)
5616 self.assertEquals(self.nesting_state.stack[-1].open_parentheses, 1)
5620 self.assertEquals(self.nesting_state.stack[-1].open_parentheses, 0)
5624 self.assertEquals(self.nesting_state.stack[-1].open_parentheses, 1)
5628 self.assertEquals(self.nesting_state.stack[-1].open_parentheses, 1)
5631 self.assertEquals(self.nesting_state.stack[-1].open_parentheses, 0)
5640 self.assertEquals(self.nesting_state.stack[-1].open_parentheses, 0)
5641 self.assertEquals(self.nesting_state.stack[-1].inline_asm, cpplint._NO_ASM)
5645 self.assertEquals(self.nesting_state.stack[-1].open_parentheses, 1)
5646 self.assertEquals(self.nesting_state.stack[-1].inline_asm,
5664 self.assertEquals(self.nesting_state.stack[-1].open_parentheses, 1)
5665 self.assertEquals(self.nesting_state.stack[-1].inline_asm,
5671 self.assertEquals(self.nesting_state.stack[-1].open_parentheses, 1)
5672 self.assertEquals(self.nesting_state.stack[-1].inline_asm,
5677 self.assertEquals(self.nesting_state.stack[-1].open_parentheses, 1)
5678 self.assertEquals(self.nesting_state.stack[-1].inline_asm,
5683 self.assertEquals(self.nesting_state.stack[-1].open_parentheses, 0)
5684 self.assertEquals(self.nesting_state.stack[-1].inline_asm, cpplint._END_ASM)
5688 self.assertEquals(self.nesting_state.stack[-1].open_parentheses, 0)
5689 self.assertEquals(self.nesting_state.stack[-1].inline_asm,
5728 # Always-on behavior: Print error messages as they come up.
5731 # If --quiet was unspecified: Print 'Done processing' and 'Total errors..'
5736 # When there are errors, behavior is identical to not passing --quiet.
5737 (return_code, output) = self._runCppLint('--quiet')
5741 # Even though --quiet was used, print these since there were errors.
5747 (return_code, output) = self._runCppLint('--filter=' +
5748 '-legal/copyright,' +
5749 '-build/header_guard')
5755 # --quiet was not specified.
5761 (return_code, output) = self._runCppLint('--quiet',
5762 '--filter=' +
5763 '-legal/copyright,' +
5764 '-build/header_guard')
5769 # --quiet was specified and there were no errors:
5776 # pylint: disable-msg=C6409
5785 # pylint: disable-msg=C6409
5787 """A global check to make sure all error-categories have been tested.