Mercurial > hg
comparison tests/hghave.py @ 49791:38ae503b369b stable
hghave: detect newer pylint
Older versions (e.g. 2.7.2) say: "Usage: pylint [options]"
Newer versions (e.g. 2.15.5) say: "usage: pylint [options]"
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Mon, 12 Dec 2022 17:42:30 +0400 |
parents | 3bbf1ad850f0 |
children | a2356e15200a |
comparison
equal
deleted
inserted
replaced
49790:f463eb675e85 | 49791:38ae503b369b |
---|---|
610 return True | 610 return True |
611 | 611 |
612 | 612 |
613 @check("pylint", "Pylint python linter") | 613 @check("pylint", "Pylint python linter") |
614 def has_pylint(): | 614 def has_pylint(): |
615 return matchoutput("pylint --help", br"Usage:[ ]+pylint", True) | 615 return matchoutput("pylint --help", br"[Uu]sage:[ ]+pylint", True) |
616 | 616 |
617 | 617 |
618 @check("clang-format", "clang-format C code formatter (>= 11)") | 618 @check("clang-format", "clang-format C code formatter (>= 11)") |
619 def has_clang_format(): | 619 def has_clang_format(): |
620 m = matchoutput('clang-format --version', br'clang-format version (\d+)') | 620 m = matchoutput('clang-format --version', br'clang-format version (\d+)') |