Bug 1529504 - Fix two flake8 warnings in static analysis (mach_commands.py) r=sylvestre
authorAlvaro Serero <alvaroserero@gmail.com>
Sat, 16 Mar 2019 11:53:50 +0100
changeset 464369 2a96d8f9339f49e84789bbe3899699c5d7185406
parent 464368 d3f3cada7e5886374b0c6f36093b6ae622e3dc24
child 464490 ec61f19960f3ad4067c6be72a429447c705800c9
child 464494 86c62ded3b663a3a847c86060b783f4f47fca913
push id35715
push userccoroiu@mozilla.com
push dateSat, 16 Mar 2019 21:53:26 +0000
treeherdermozilla-central@2a96d8f9339f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssylvestre
bugs1529504
milestone67.0a1
first release with
nightly linux32
2a96d8f9339f / 67.0a1 / 20190316215326 / files
nightly linux64
2a96d8f9339f / 67.0a1 / 20190316215326 / files
nightly mac
2a96d8f9339f / 67.0a1 / 20190316215326 / files
nightly win32
2a96d8f9339f / 67.0a1 / 20190316215326 / files
nightly win64
2a96d8f9339f / 67.0a1 / 20190316215326 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1529504 - Fix two flake8 warnings in static analysis (mach_commands.py) r=sylvestre
python/mozbuild/mozbuild/mach_commands.py
--- a/python/mozbuild/mozbuild/mach_commands.py
+++ b/python/mozbuild/mozbuild/mach_commands.py
@@ -1604,17 +1604,16 @@ class StaticAnalysisMonitor(object):
         from mozbuild.compilation.warnings import (
             WarningsCollector,
             WarningsDatabase,
         )
 
         self._warnings_database = WarningsDatabase()
 
         def on_warning(warning):
-            filename = warning['filename']
             self._warnings_database.insert(warning)
 
         self._warnings_collector = WarningsCollector(on_warning, objdir=objdir)
 
     @property
     def num_files(self):
         return self._total
 
@@ -2453,17 +2452,16 @@ class StaticAnalysis(MachCommandBase):
         end = re.search(r'^Enabled checks:\n', clang_output, re.MULTILINE)
         if end is not None:
             clang_output = clang_output[:end.start()-1]
 
         # Sort headers by positions
         regex_header = re.compile(
             r'(.+):(\d+):(\d+): (warning|error): ([^\[\]\n]+)(?: \[([\.\w-]+)\])?$', re.MULTILINE)
 
-        something = regex_header.finditer(clang_output)
         headers = sorted(
             regex_header.finditer(clang_output),
             key=lambda h: h.start()
         )
 
         issues = []
         for _, header in enumerate(headers):
             header_group = header.groups()