Mercurial > hg
changeset 27733:3d1baa702d1a
docchecker: scan for missing space before :hg:
author | timeless <timeless@mozdev.org> |
---|---|
date | Wed, 06 Jan 2016 20:05:18 +0000 |
parents | ea3937af2bb1 |
children | 5c0fd878779c |
files | doc/docchecker tests/test-gendoc.t |
diffstat | 2 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/docchecker Wed Jan 06 19:57:29 2016 +0000 +++ b/doc/docchecker Wed Jan 06 20:05:18 2016 +0000 @@ -11,11 +11,15 @@ leadingline = re.compile(r'(^\s*)(\S.*)$') hg_backtick = re.compile(r""":hg:`[^`]*'[^`]*`""") +hg_cramped = re.compile(r'\w:hg:`') def check(line): if hg_backtick.search(line): print(line) print("""warning: please avoid nesting ' in :hg:`...`""") + if hg_cramped.search(line): + print(line) + print('warning: please have a space before :hg:') def work(file): (llead, lline) = ('', '')
--- a/tests/test-gendoc.t Wed Jan 06 19:57:29 2016 +0000 +++ b/tests/test-gendoc.t Wed Jan 06 20:05:18 2016 +0000 @@ -32,6 +32,8 @@ % extracting documentation from de checking for parse errors + Die Dateien werden dem Projektarchiv beim n\xc3\xa4chsten \xc3\x9cbernehmen (commit) hinzugef\xc3\xbcgt. Um dies vorher r\xc3\xbcckg\xc3\xa4ngig zu machen, siehe:hg:`forget`. (esc) + warning: please have a space before :hg: % extracting documentation from el checking for parse errors