MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / run

Method run

scripts/format_code.py:218–240  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

216 return retval
217
218 def run(self):
219 if len(self.files) < 1:
220 logger.debug("No file: early exit")
221 retval = 0
222 self.shell = Shell()
223 self.shell.save_cwd()
224 this_dir = os.path.dirname(__file__)
225 try:
226 self.shell.cd(self.folder)
227 self.shell.prepend_env("PATH","%s/../bin" % this_dir)
228
229 for f in self.files:
230 check_copyright(f)
231
232 except subprocess.CalledProcessError as e:
233 retval = -1
234 logger.error(e)
235 logger.error("OUTPUT= %s" % e.output)
236
237 retval += self.error_on_diff("See above for clang-tidy errors")
238
239 if retval != 0:
240 raise Exception("format-code failed with error code %d" % retval)
241
242class GenerateAndroidBP:
243 def __init__(self, folder):

Callers 1

run_fix_code_formattingFunction · 0.95

Calls 6

error_on_diffMethod · 0.95
ShellClass · 0.90
check_copyrightFunction · 0.85
save_cwdMethod · 0.80
cdMethod · 0.80
prepend_envMethod · 0.80

Tested by

no test coverage detected