diff options
Diffstat (limited to 'utils/checkstyle.py')
-rwxr-xr-x | utils/checkstyle.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/utils/checkstyle.py b/utils/checkstyle.py index 835f2a9f..66af96ab 100755 --- a/utils/checkstyle.py +++ b/utils/checkstyle.py @@ -279,6 +279,8 @@ class ClassRegistry(type): newclass = super().__new__(cls, clsname, bases, attrs) if bases: bases[0].subclasses.append(newclass) + bases[0].subclasses.sort(key=lambda x: getattr(x, 'priority', 0), + reverse=True) return newclass @@ -568,6 +570,7 @@ class Formatter(metaclass=ClassRegistry): class CLangFormatter(Formatter): patterns = ('*.c', '*.cpp', '*.h') + priority = -1 @classmethod def format(cls, filename, data): |