Updates the list of global error suppressions. Parses any lint directives in the file that have global effect. Args: lines: An array of strings, each representing a line of the file, with the last element being empty if the file is terminated with a newline.
(lines)
| 985 | |
| 986 | |
| 987 | def ProcessGlobalSuppresions(lines): |
| 988 | """Updates the list of global error suppressions. |
| 989 | |
| 990 | Parses any lint directives in the file that have global effect. |
| 991 | |
| 992 | Args: |
| 993 | lines: An array of strings, each representing a line of the file, with the |
| 994 | last element being empty if the file is terminated with a newline. |
| 995 | """ |
| 996 | for line in lines: |
| 997 | if _SEARCH_C_FILE.search(line): |
| 998 | for category in _DEFAULT_C_SUPPRESSED_CATEGORIES: |
| 999 | _global_error_suppressions[category] = True |
| 1000 | if _SEARCH_KERNEL_FILE.search(line): |
| 1001 | for category in _DEFAULT_KERNEL_SUPPRESSED_CATEGORIES: |
| 1002 | _global_error_suppressions[category] = True |
| 1003 | |
| 1004 | |
| 1005 | def ResetNolintSuppressions(): |
no test coverage detected