Bug 1231720 - Log when ESLint finishes running. r=nalexander
authorFelipe Gomes <felipc@gmail.com>
Thu, 10 Dec 2015 14:31:14 -0500
changeset 276082 5c4c80beee8bacc1a3b1b294b010312c68100a8f
parent 276081 50a0251369dfdc40f5e1a9a77684b77add683117
child 276083 54bb45fa0e7d9c56032fa4af7b5c69e7eb0d90f2
push id29783
push usercbook@mozilla.com
push dateFri, 11 Dec 2015 10:36:33 +0000
treeherdermozilla-central@0dd42501bbe6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnalexander
bugs1231720
milestone45.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1231720 - Log when ESLint finishes running. r=nalexander
python/mach_commands.py
--- a/python/mach_commands.py
+++ b/python/mach_commands.py
@@ -195,21 +195,26 @@ class MachCommands(MachCommandBase):
             'Running {binary}')
 
         args = args or ['.']
 
         cmd_args = [binary,
             '--ext', ext,  # This keeps ext as a single argument.
         ] + args
 
-        return self.run_process(cmd_args,
+        success = self.run_process(cmd_args,
             pass_thru=True,  # Allow user to run eslint interactively.
             ensure_exit_code=False,  # Don't throw on non-zero exit code.
             require_unix_environment=True # eslint is not a valid Win32 binary.
         )
+
+        self.log(logging.INFO, 'eslint', {'msg': ('No errors' if success == 0 else 'Errors')},
+            'Finished eslint. {msg} encountered.')
+        return success
+
     def eslint_setup(self, update_only=False):
         """Ensure eslint is optimally configured.
 
         This command will inspect your eslint configuration and
         guide you through an interactive wizard helping you configure
         eslint for optimal use on Mozilla projects.
         """
         sys.path.append(os.path.dirname(__file__))