Mercurial > hg
comparison tests/test-check-code.t @ 19998:289bbb294e82 stable
check-code: check comment for '.. note::' without two newlines
Because string entries are replaced before matching, we must search for
the transformed pattern. But it seems to be quite unique and does not return
false matches. If it will, they can be listed as 3rd arg in pypats.
author | Simon Heimberg <simohe@besonet.ch> |
---|---|
date | Tue, 05 Nov 2013 09:00:31 +0100 |
parents | 725507cd5216 |
children | 22154ec6fb8b |
comparison
equal
deleted
inserted
replaced
19997:de16c673455b | 19998:289bbb294e82 |
---|---|
202 raise-format.py:1: | 202 raise-format.py:1: |
203 > raise SomeException, message | 203 > raise SomeException, message |
204 don't use old-style two-argument raise, use Exception(message) | 204 don't use old-style two-argument raise, use Exception(message) |
205 [1] | 205 [1] |
206 | 206 |
207 $ cat > rst.py <<EOF | |
208 > """problematic rst text | |
209 > | |
210 > .. note:: | |
211 > wrong | |
212 > """ | |
213 > | |
214 > ''' | |
215 > | |
216 > .. note:: | |
217 > | |
218 > valid | |
219 > | |
220 > new text | |
221 > | |
222 > .. note:: | |
223 > | |
224 > also valid | |
225 > ''' | |
226 > | |
227 > """mixed | |
228 > | |
229 > .. note:: | |
230 > | |
231 > good | |
232 > | |
233 > .. note:: | |
234 > plus bad | |
235 > """ | |
236 > EOF | |
237 $ $check_code -w rst.py | |
238 rst.py:3: | |
239 > .. note:: | |
240 warning: add two newlines after '.. note::' | |
241 rst.py:26: | |
242 > .. note:: | |
243 warning: add two newlines after '.. note::' | |
244 [1] | |
245 |