diff options
author | James McCoy <jamessan@jamessan.com> | 2017-04-05 22:39:40 -0400 |
---|---|---|
committer | James McCoy <jamessan@jamessan.com> | 2017-04-05 22:39:40 -0400 |
commit | bb54d921aaf85f0393c1ba10585560056f7f4ec8 (patch) | |
tree | 316ff7424337b3572b58340383eeabb3a0d36e80 /src/clint.py | |
parent | 4f69a8fb8854698adb2de8956ad0d86ff35a6f68 (diff) | |
parent | 210b013ce75b5ea8a897071e32decc1e1f88189e (diff) | |
download | rneovim-bb54d921aaf85f0393c1ba10585560056f7f4ec8.tar.gz rneovim-bb54d921aaf85f0393c1ba10585560056f7f4ec8.tar.bz2 rneovim-bb54d921aaf85f0393c1ba10585560056f7f4ec8.zip |
Merge remote-tracking branch 'origin/master' into vim-7.4.2170
Diffstat (limited to 'src/clint.py')
-rwxr-xr-x | src/clint.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/clint.py b/src/clint.py index ce31822ada..5174521fb8 100755 --- a/src/clint.py +++ b/src/clint.py @@ -571,7 +571,8 @@ class _CppLintState(object): for category, count in self.errors_by_category.items(): sys.stderr.write('Category \'%s\' errors found: %d\n' % (category, count)) - sys.stderr.write('Total errors found: %d\n' % self.error_count) + if self.error_count: + sys.stderr.write('Total errors found: %d\n' % self.error_count) def SuppressErrorsFrom(self, fname): """Open file and read a list of suppressed errors from it""" @@ -2268,11 +2269,14 @@ def CheckSpacing(filename, clean_lines, linenum, nesting_state, error): # //!< Header comment # or they begin with multiple slashes followed by a space: # //////// Header comment + # or they are Vim {{{ fold markers match = (Search(r'[=/-]{4,}\s*$', line[commentend:]) or Search(r'^/$', line[commentend:]) or Search(r'^!< ', line[commentend:]) or Search(r'^/< ', line[commentend:]) or - Search(r'^/+ ', line[commentend:])) + Search(r'^/+ ', line[commentend:]) or + Search(r'^(?:\{{3}|\}{3})\d*(?: |$)', + line[commentend:])) if not match: error(filename, linenum, 'whitespace/comments', 4, 'Should have a space between // and comment') @@ -3575,7 +3579,7 @@ def main(): if __name__ == '__main__': main() -# vim: ts=4 sts=4 sw=4 +# vim: ts=4 sts=4 sw=4 foldmarker=▶,▲ # Ignore "too complex" warnings when using pymode. # pylama:ignore=C901 |