4671: cpplint tool fails when run without excluded checks

alexander

What version of Review Board are you running?

3.0.3

What version of Review Bot are you running?

1.0

What tool(s) is Review Bot running?

cpplint

What steps will reproduce the problem?

  1. Run cpplint without any excluded checks

What is the expected output? What do you see instead?

[2018-03-16 11:34:20,051: ERROR/Worker-1] reviewbot.tasks.RunTool[9ea59d69-1f3a-45d0-9382-adfcbe45dfc5]: Error executing tool "cpplint": %d format: a number is required, not unicode <server info removed>
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/reviewbot/tasks.py", line 185, in RunTool
base_commit_id=base_commit_id)
File "/usr/local/lib/python2.7/dist-packages/reviewbot/tools/init.py", line 61, in execute
self.handle_files(review.files, settings)
File "/usr/local/lib/python2.7/dist-packages/reviewbot/tools/init.py", line 77, in handle_files
self.handle_file(f, settings)
File "/usr/local/lib/python2.7/dist-packages/reviewbot/tools/cpplint.py", line 112, in handle_file
'--verbose=%i' % settings['verbosity'],
TypeError: %d format: a number is required, not unicode

Please provide any additional information below.

Seems to be a typo, as a few lines above that '--verbose=%s' % settings['verbosity'] is written.

#1 alexander

The problem seems to have disappeared, however, the tool just doesn't work.

It's configured to Always match, comment on unmodified code, open issues, verbosity of 1, max comments of 30, exluded tests: legal/copyright,whitespace/tab,whitespace/parens,whitespace/indent,whitespace/comments,whitespace/braces,readability/braces

However it never posts anything, even on files that had tons of warnings when running the tool manually with the same settings. It always marks it as "cpplint passed", except when the worker is down, in which case it's "cpplint timed out". The configuration is definitely enabled.

cppcheck tool works fine in the mean time.

david
#2 david

Fixed in Review Bot release-1.0.x (1514caf). This will ship in 1.0.1. Thanks!

  • -New
    +Fixed