(filename)
| 378 | ' '.join(space_split[1:])) |
| 379 | |
| 380 | def update_updatable_copyright(filename): |
| 381 | file_lines = read_file_lines(filename) |
| 382 | index, line = get_updatable_copyright_line(file_lines) |
| 383 | if not line: |
| 384 | print_file_action_message(filename, "No updatable copyright.") |
| 385 | return |
| 386 | last_git_change_year = get_most_recent_git_change_year(filename) |
| 387 | new_line = create_updated_copyright_line(line, last_git_change_year) |
| 388 | if line == new_line: |
| 389 | print_file_action_message(filename, "Copyright up-to-date.") |
| 390 | return |
| 391 | file_lines[index] = new_line |
| 392 | write_file_lines(filename, file_lines) |
| 393 | print_file_action_message(filename, |
| 394 | "Copyright updated! -> %s" % last_git_change_year) |
| 395 | |
| 396 | def exec_update_header_year(base_directory): |
| 397 | for filename in get_filenames_to_examine(base_directory): |
no test coverage detected