Returns a path canonicalized for alphabetical comparison. - replaces "-" with "_" so they both cmp the same. - removes '-inl' since we don't require them to be after the main header. - lowercase everything, just in case. Args: header_path: Path to be canonicalized. Retur
(self, header_path)
| 759 | self._last_header = header_path |
| 760 | |
| 761 | def CanonicalizeAlphabeticalOrder(self, header_path): |
| 762 | """Returns a path canonicalized for alphabetical comparison. |
| 763 | |
| 764 | - replaces "-" with "_" so they both cmp the same. |
| 765 | - removes '-inl' since we don't require them to be after the main header. |
| 766 | - lowercase everything, just in case. |
| 767 | |
| 768 | Args: |
| 769 | header_path: Path to be canonicalized. |
| 770 | |
| 771 | Returns: |
| 772 | Canonicalized path. |
| 773 | """ |
| 774 | return header_path.replace('-inl.h', '.h').replace('-', '_').lower() |
| 775 | |
| 776 | def IsInAlphabeticalOrder(self, clean_lines, linenum, header_path): |
| 777 | """Check if a header is in alphabetical order with the previous header. |
no test coverage detected