Details
Details
- Reviewers
spectral - Group Reviewers
hg-reviewers - Commits
- rHG4889b84b15f2: check-code: suggest pycompat.is(posix|windows|darwin)
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
( )
spectral |
hg-reviewers |
Lint Skipped |
Unit Tests Skipped |
(r'^import httplib', "don't use httplib, use util.httplib"), | (r'^import httplib', "don't use httplib, use util.httplib"), | ||||
(r'^import BaseHTTPServer', "use util.httpserver instead"), | (r'^import BaseHTTPServer', "use util.httpserver instead"), | ||||
(r'^(from|import) mercurial\.(cext|pure|cffi)', | (r'^(from|import) mercurial\.(cext|pure|cffi)', | ||||
"use mercurial.policy.importmod instead"), | "use mercurial.policy.importmod instead"), | ||||
(r'\.next\(\)', "don't use .next(), use next(...)"), | (r'\.next\(\)', "don't use .next(), use next(...)"), | ||||
(r'([a-z]*).revision\(\1\.node\(', | (r'([a-z]*).revision\(\1\.node\(', | ||||
"don't convert rev to node before passing to revision(nodeorrev)"), | "don't convert rev to node before passing to revision(nodeorrev)"), | ||||
(r'platform\.system\(\)', "don't use platform.system(), use pycompat"), | (r'platform\.system\(\)', "don't use platform.system(), use pycompat"), | ||||
(r'pycompat\.osname\s*==\s*[\'"]nt[\'"]', "use pycompat.iswindows"), | |||||
(r'pycompat\.osname\s*==\s*[\'"]posix[\'"]', "use pycompat.isposix"), | |||||
(r'pycompat\.sysplatform\s*==[\'"]darwin[\'"]', "use pycompat.isdarwin"), | |||||
# rules depending on implementation of repquote() | # rules depending on implementation of repquote() | ||||
(r' x+[xpqo%APM][\'"]\n\s+[\'"]x', | (r' x+[xpqo%APM][\'"]\n\s+[\'"]x', | ||||
'string join across lines with no space'), | 'string join across lines with no space'), | ||||
(r'''(?x)ui\.(status|progress|write|note|warn)\( | (r'''(?x)ui\.(status|progress|write|note|warn)\( | ||||
[ \t\n#]* | [ \t\n#]* | ||||
(?# any strings/comments might precede a string, which | (?# any strings/comments might precede a string, which | ||||
# contains translatable message) | # contains translatable message) |