src.ansys.pre_commit_hooks.add_license_headers.recursive_file_check#

src.ansys.pre_commit_hooks.add_license_headers.recursive_file_check(changed_headers, parser, values, proj, missing_headers, count)#

Check if the committed file is missing its header.

Parameters:
changed_headers: int

0 if no headers were added or updated. 1 if headers were added or updated.

parser: argparse.ArgumentParser

Parser containing default license header arguments.

values: dict

Dictionary containing the values of files, copyright, template, license, changed_headers, year, and git_repo.

proj: project.Project

Project to run REUSE on.

missing_headers: list

Committed files that are missing copyright and/or license information in their headers.

count: int

Integer of the location in the files array.

Returns:
int

0 if all files contain headers and are up to date. 1 if REUSE changed all noncompliant files.