зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1575659 - Fixed crashing of `mach static-analisys` when no arguments where passed. r=bastien
Differential Revision: https://phabricator.services.mozilla.com/D43393 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
f93d4c2566
Коммит
7b5552dee0
|
@ -155,8 +155,13 @@ class StaticAnalysis(MachCommandBase):
|
||||||
@Command('static-analysis', category='testing',
|
@Command('static-analysis', category='testing',
|
||||||
description='Run C++ static analysis checks')
|
description='Run C++ static analysis checks')
|
||||||
def static_analysis(self):
|
def static_analysis(self):
|
||||||
# If not arguments are provided, just print a help message.
|
# If no arguments are provided, just print a help message.
|
||||||
mach = Mach(os.getcwd())
|
mach = Mach(os.getcwd())
|
||||||
|
|
||||||
|
def populate_context(context, key=None):
|
||||||
|
context.topdir = self.topsrcdir
|
||||||
|
|
||||||
|
mach.populate_context_handler = populate_context
|
||||||
mach.run(['static-analysis', '--help'])
|
mach.run(['static-analysis', '--help'])
|
||||||
|
|
||||||
@StaticAnalysisSubCommand('static-analysis', 'check',
|
@StaticAnalysisSubCommand('static-analysis', 'check',
|
||||||
|
|
Загрузка…
Ссылка в новой задаче