devops.scripts.add_license_header

Script to add license headers to C++ files.

Functions

add_license_header(file_path, ...[, dry_run])

Add a license header to a specified file.

add_license_header_to_files(license_header_path)

Add a license header to all valid files in a specified directory.

devops.scripts.add_license_header.add_license_header(file_path, license_header_path, *, dry_run=False)[source]

Add a license header to a specified file.

Parameters:
  • file_path (str) – The path to the file where the license header should be added.

  • license_header_path (str) – The path to the license header file.

  • dry_run (bool) – If True, only print the file that would be modified without making changes.

Return type:

None

devops.scripts.add_license_header.add_license_header_to_files(license_header_path, dirs=None, *, dry_run=False)[source]

Add a license header to all valid files in a specified directory.

Parameters:
  • license_header_path (str) – The path to the license header file.

  • dirs (list[str] | None) – List of directory paths to search for files. If None, uses the current directory.

  • dry_run (bool) – If True, only print the files that would be modified without making changes.

Return type:

None