--- a/python/mozbuild/mozbuild/mach_commands.py
+++ b/python/mozbuild/mozbuild/mach_commands.py
@@ -1612,17 +1612,18 @@ class StaticAnalysis(MachCommandBase):
'Can be omitted, in which case the entire code base '
'is analyzed. The source argument is ignored if '
'there is anything fed through stdin, in which case '
'the analysis is only performed on the files changed '
'in the patch streamed through stdin. This is called '
'the diff mode.')
@CommandArgument('--checks', '-c', default='-*', metavar='checks',
help='Static analysis checks to enable. By default, this enables only '
- 'custom Mozilla checks, but can be any clang-tidy checks syntax.')
+ 'checks that are published here: https://mzl.la/2DRHeTh, but can be any '
+ 'clang-tidy checks syntax.')
@CommandArgument('--jobs', '-j', default='0', metavar='jobs', type=int,
help='Number of concurrent jobs to run. Default is the number of CPUs.')
@CommandArgument('--strip', '-p', default='1', metavar='NUM',
help='Strip NUM leading components from file names in diff mode.')
@CommandArgument('--fix', '-f', default=False, action='store_true',
help='Try to autofix errors detected by clang-tidy checkers.')
@CommandArgument('--header-filter', '-h-f', default='', metavar='header_filter',
help='Regular expression matching the names of the headers to '
@@ -1726,17 +1727,17 @@ class StaticAnalysis(MachCommandBase):
@StaticAnalysisSubCommand('static-analysis', 'print-checks',
'Print a list of the static analysis checks performed by default')
def print_checks(self, verbose=False):
self._set_log_level(verbose)
rc = self._get_clang_tools(verbose=verbose)
if rc != 0:
return rc
- args = [self._clang_tidy_path, '-list-checks', '-checks=-*,mozilla-*']
+ args = [self._clang_tidy_path, '-list-checks', '-checks=%s' % self._get_checks()]
return self._run_command_in_objdir(args=args, pass_thru=True)
@Command('clang-format', category='misc', description='Run clang-format on current changes')
@CommandArgument('--show', '-s', action='store_true', default=False,
help='Show diff output on instead of applying changes')
@CommandArgument('--path', '-p', nargs='+', default=None,
help='Specify the path(s) to reformat')
def clang_format(self, show, path, verbose=False):