4795: cpplint fails with internal error when run without exclusion filters


What version of Review Board are you running?


What version of Review Bot are you running?

What tool(s) is Review Bot running?

cpplint - v1.0

What steps will reproduce the problem?

  1. Enable cpp lint integration
  2. Configure integration with no exclusions
  3. Publish review request to trigger running tool

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

Expect the check to run.

Instead it fails with an internal error.

reviewbot_1 | Traceback (most recent call last):
reviewbot_1 | File "/usr/local/lib/python2.7/site-packages/reviewbot/tasks.py", line 185, in RunTool
reviewbot_1 | base_commit_id=base_commit_id)
reviewbot_1 | File "/usr/local/lib/python2.7/site-packages/reviewbot/tools/init.py", line 61, in execute
reviewbot_1 | self.handle_files(review.files, settings)
reviewbot_1 | File "/usr/local/lib/python2.7/site-packages/reviewbot/tools/init.py", line 77, in handle_files
reviewbot_1 | self.handle_file(f, settings)
reviewbot_1 | File "/usr/local/lib/python2.7/site-packages/reviewbot/tools/cpplint.py", line 112, in handle_file
reviewbot_1 | '--verbose=%s' % self.settings['verbosity'],
reviewbot_1 | AttributeError: 'CPPLintTool' object has no attribute 'settings'

Please provide any additional information below.

This is due to a merge issue on line 112 of https://github.com/reviewboard/ReviewBot/blob/master/bot/reviewbot/tools/cpplint.py

self.settings[‘verbosity’] should be settings[‘verbosity’]

With that fixed it works.


#1 chipx86

Fixed for the upcoming Review Bot 3.

  • -New
  • +chipx86