Merge "Print the project name if available when running Checkstyle." am: 2e625b0d3e am: c85d7f8492

am: 45d65adcc1

Change-Id: Iecf67f71babda38c66fb270950281535fd03ee93
This commit is contained in:
Aurimas Liutikas
2016-11-03 22:13:51 +00:00
committed by android-build-merger

View File

@@ -188,7 +188,11 @@ def _ParseAndFilterOutput(stdout,
if error.hasAttribute('column'):
column = '%s:' % error.attributes['column'].value
message = error.attributes['message'].value
result = ' %s:%s:%s %s' % (file_name, line, column, message)
project = ''
if os.environ.get('REPO_PROJECT'):
project = '[' + os.environ.get('REPO_PROJECT') + '] '
result = ' %s%s:%s:%s %s' % (project, file_name, line, column, message)
severity = error.attributes['severity'].value
if severity == 'error':