(filepath: str, prefix: str, add_extension: str, drop_outermost_subdir: str)
| 125 | |
| 126 | |
| 127 | def find_expected_header_guard(filepath: str, prefix: str, add_extension: str, drop_outermost_subdir: str) -> str: |
| 128 | if drop_outermost_subdir: |
| 129 | arr : List[str] = filepath.split("/") |
| 130 | arr = arr[min(1, len(arr)-1):] |
| 131 | filepath = "/".join(arr) |
| 132 | |
| 133 | if not add_extension: |
| 134 | filepath = ".".join(filepath.split(".")[:-1]) |
| 135 | |
| 136 | guard = filepath.replace("/", "_").replace(".", "_").upper() # snake case full path |
| 137 | return prefix + "_" + guard |
| 138 | |
| 139 | |
| 140 | def skip_file(filepath: str, extensions: List[str], exclude: List[str], include: List[str]) -> bool: |
no test coverage detected