def run_lint_command():
    """
    Run lint command in the shell and save results to lint-result.xml
    """
    lint, app_dir, lint_result, ignore_layouts = parse_args()
    if not lint_result:
        if not distutils.spawn.find_executable(lint):
            raise Exception(
                '`%s` executable could not be found and path to lint result not specified. See --help' % lint)
        lint_result = os.path.join(app_dir, 'lint-result.xml')
        call_result = subprocess.call([lint, app_dir, '--xml', lint_result])
        if call_result > 0:
            print('Running the command failed with result %s. Try running it from the console.'
                  ' Arguments for subprocess.call: %s' % (call_result, [lint, app_dir, '--xml', lint_result]))
    else:
        if not os.path.isabs(lint_result):
            lint_result = os.path.join(app_dir, lint_result)
    lint_result = os.path.abspath(lint_result)
    return lint_result, app_dir, ignore_layouts
def run_lint_command ( ) : lint , app_dir , lint_result , ignore_layouts = parse_args ( ) if not lint_result : if not distutils . spawn . find_executable ( lint ) : raise Exception ( '`%s` executable could not be found and path to lint result not specified. See --help' % lint ) lint_result = os . path . join ( app_dir , 'lint-result.xml' ) call_result = subprocess . call ( [ lint , app_dir , '--xml' , lint_result ] ) if call_result > 0 : print ( 'Running the command failed with result %s. Try running it from the console.' ' Arguments for subprocess.call: %s' % ( call_result , [ lint , app_dir , '--xml' , lint_result ] ) ) else : if not os . path . isabs ( lint_result ) : lint_result = os . path . join ( app_dir , lint_result ) lint_result = os . path . abspath ( lint_result ) return lint_result , app_dir , ignore_layouts
Run lint command in the shell and save results to lint-result.xml