Lines Matching refs:diff
49 def __init__(self, diff=()):
53 diff: The list of files that changed.
55 self.diff = diff
118 return [x.file for x in self.diff if x.status != 'D']
147 def expand_vars(args, diff=()):
149 replacer = Placeholders(diff=diff)
152 def args(self, default_args=(), diff=()):
157 diff: The list of files that changed in the current commit.
166 return self.expand_vars(args, diff=diff)
214 def _filter_diff(diff, include_list, exclude_list=()):
218 diff: list of diff objects to filter.
231 for d in diff:
284 def check_custom(project, commit, _desc, diff, options=None, **kwargs):
286 return _check_cmd(options.name, project, commit, options.args((), diff),
290 def check_checkpatch(project, commit, _desc, diff, options=None):
291 """Run |diff| through the kernel's checkpatch.pl tool."""
294 options.args(('--ignore=GERRIT_CHANGE_ID',), diff))
299 def check_clang_format(project, commit, _desc, diff, options=None):
306 options.args(('--style', 'file', '--commit', commit), diff))
318 google_java_format_diff = options.tool_path('google-java-format-diff')
320 '--google-java-format-diff', google_java_format_diff,
429 def check_cpplint(project, commit, _desc, diff, options=None):
433 filtered = _filter_diff(diff, [r'\.(cc|h|cpp|cu|cuh)$'])
442 def check_gofmt(project, commit, _desc, diff, options=None):
444 filtered = _filter_diff(diff, [r'\.go$'])
461 def check_json(project, commit, _desc, diff, options=None):
466 filtered = _filter_diff(diff, [r'\.json$'])
482 def check_pylint(project, commit, _desc, diff, options=None):
484 filtered = _filter_diff(diff, [r'\.py$'])
496 def check_xmllint(project, commit, _desc, diff, options=None):
529 filtered = _filter_diff(diff, [r'\.(%s)$' % '|'.join(extensions)])
564 'google-java-format-diff': 'google-java-format-diff.py',