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)
| 989 | |
| 990 | |
| 991 | def ProcessGlobalSuppresions(lines): |
| 992 | """Updates the list of global error suppressions. |
| 993 | |
| 994 | Parses any lint directives in the file that have global effect. |
| 995 | |
| 996 | Args: |
| 997 | lines: An array of strings, each representing a line of the file, with the |
| 998 | last element being empty if the file is terminated with a newline. |
| 999 | """ |
| 1000 | for line in lines: |
| 1001 | if _SEARCH_C_FILE.search(line): |
| 1002 | for category in _DEFAULT_C_SUPPRESSED_CATEGORIES: |
| 1003 | _global_error_suppressions[category] = True |
| 1004 | if _SEARCH_KERNEL_FILE.search(line): |
| 1005 | for category in _DEFAULT_KERNEL_SUPPRESSED_CATEGORIES: |
| 1006 | _global_error_suppressions[category] = True |
| 1007 | |
| 1008 | |
| 1009 | def ResetNolintSuppressions(): |