Add a configuration option to the JSHint tool plugin.
Review Request #6241 — Created Aug. 18, 2014 and submitted
This adds a
config
option to the JSHint plugin, allowing admins to specify
which JSHint options should be turned on or off. The contents of a .jshintrc
file can simply be copied into this field.I also fixed a small bug in make_tempfile() (the default value of None for
extension
would cause an error since mkstemp()'ssuffix
must be a string).
Without any config specified, I published a review request, saw the worker run
jshint without the --config flag. The published review did not include issues
on unused variables.Using the same config as reviewboard/static/rb/js/.jshintrc, I published a
review request, and saw the worker run jshint with the --config flag this time.
The published review included issues on unused variables.
- Change Summary:
-
To match the change in /r/6240, the widget is now specified as a dictionary
instead of as a part of field_type. - Commit:
-
d84fc162ff95defa9d0c90b74959a32947ec4c70a28a8ff743fcadd9179cc52540671f7ccadc6f25
-
Tool: PEP8 Style Checker Processed Files: bot/reviewbot/tools/jshint.py bot/reviewbot/processing/filesystem.py Tool: Pyflakes Processed Files: bot/reviewbot/tools/jshint.py bot/reviewbot/processing/filesystem.py