comparison tests/test-check-code.t @ 21487:c26464ce0781

check-code: check for consistent usage of the websub filter in hgweb templates The check-code tool now expects the "desc" keyword to be followed by the "websub" filter, with the following exceptions: a) It has no filters at all, e.g. a changeset description in the raw style templates or the repository description in the summary page. b) It is followed by the "firstline" filter, e.g. the first line of the changeset description is displayed as a summary or title.
author Steven Brown <StevenGBrown@gmail.com>
date Sat, 17 May 2014 17:11:06 +0800
parents e8ef59b351c3
children e53f6b72a0e4
comparison
equal deleted inserted replaced
21486:16352b34e32e 21487:c26464ce0781
282 don't use % inside _() 282 don't use % inside _()
283 ./map-inside-gettext.py:9: 283 ./map-inside-gettext.py:9:
284 > print _( 284 > print _(
285 don't use % inside _() 285 don't use % inside _()
286 [1] 286 [1]
287
288 web templates
289
290 $ mkdir -p mercurial/templates
291 $ cat > mercurial/templates/example.tmpl <<EOF
292 > {desc}
293 > {desc|escape}
294 > {desc|firstline}
295 > {desc|websub}
296 > EOF
297
298 $ "$check_code" --warnings mercurial/templates/example.tmpl
299 mercurial/templates/example.tmpl:2:
300 > {desc|escape}
301 warning: follow desc keyword with either firstline or websub
302 [1]