The code-review bot currently supports 6 different formats to report issues (clang-tidy, clang-format, zero coverage and mozlint). We are in the process of standardizing toward a single format described here.
Your analyzer task needs to produce a public Taskcluster artifact listing all the issues found in the patch.
That means your task must write a JSON file on the local file system at a specified path. The task definition will take care of configuring Taskcluster for the storage of your file, so it becomes a publicly available file online.
Here is an example implementation from the clang-tidy
task in mozilla-central:
worker:
artifacts:
- type: file
name: public/code-review/clang-tidy.json
path: /builds/worker/clang-tidy.json
Here, the analyzer produces its JSON output as /builds/worker/clang-tidy.json
, but Taskcluster will expose it on its own public hostname as https://taskcluster-artifacts.net/<TASK_ID>/<RUN_ID>/public/code-review/clang-tidy.json
Once your task is triggered with the code-review
attribute, its analysis artifact will be retrieved automatically by the bot. All issues found will be filtered using those basic rules:
- if the issue is not in a modifided line of a file in the patch, it will be discarded.
- if the issue is in a third party path, it will be discarded.
We have plans to remove the first filter, by using a two pass approach and comparing the issues found before vs. after applying the patch.
- Check that your task is triggered by the decision task on new diffs
- Check that your task is present in the task group published by the code review bot as
CI (Treeherder) Jobs
- Check that your task produces the expected analysis artifact
- Check that the
code-review-issues
is present in that task group (for mozilla-central tasks) - Check that your test diff is available on our dashboard by searching its revision ID or title (it can take several seconds to load all the tasks available)
- Reach out to us, see README for contact info