update
[nethome.git] / .weblintrc
1 #
2 # sample configuration file for weblint
3 # distributed as part of weblint 1.020
4 #
5 # The settings in this file reflect the built-in defaults.
6 # I.e. if a warning is enabled in this file, then it is enabled by
7 # default, and you don't have to enable it in your .weblintrc.
8 #
9
10 #========================================================================
11 #       Global Configuration File
12 #========================================================================
13 #
14 # Weblint supports a local site configuration file.
15 # If one is set up, then you can specify it be included with the following:
16 #
17 #       use global weblintrc
18 #
19
20 #========================================================================
21 #       Weblint Variables
22 #========================================================================
23
24 #
25 # message-style: style of warning message to generate
26 #       lint    generate warnings similar to traditional lint:
27 #                       file(line #): warning
28 #               this is the default
29 #       short   don't include the filename in the warning message:
30 #                       line #: warning
31 #       terse   a style which is easy for another program to parse:
32 #                       file:line #:warning-identifier
33
34 set message-style = lint
35
36 #
37 # url-get: a program which can be used to retrieve a URL
38 #
39
40 set url-get = lynx -source
41
42 #
43 # directory-index: list of filenames for directory indices
44 #
45 # If your server supports multiple index file names:
46 #       set directory-index = index.html, welcome.html
47 #
48
49 set directory-index = index.html
50
51 #
52 # file-extensions: list of filename extensions for valid HTML filenames
53 #
54 # A comma-separated list of filenames extensions; these are used when
55 # recursing in a directory, to decide which files should be checked.
56 #
57
58 set file-extensions = html, htm
59
60 #========================================================================
61 #       Extensions
62 #========================================================================
63
64 #------------------------------------------------------------------------
65 # Allow Netscape HTML extensions, such as CENTER and FONT
66 #------------------------------------------------------------------------
67 # uncomment following line to enable the Netscape extensions
68 # extension Netscape
69
70 #------------------------------------------------------------------------
71 # Allow Microsoft HTML extensions, such as MARQUEE
72 #------------------------------------------------------------------------
73 # uncomment following line to enable the Microsoft extensions
74 # extension Microsoft
75
76
77 #========================================================================
78 #       Weblint Warnings
79 #========================================================================
80
81 #------------------------------------------------------------------------
82 # By default, when recursing in a directory, weblint will check files
83 # which are symlinks.  Uncomment the following line if you want weblint
84 # to skip symlinks.  This is equivalent to the -l command-line switch
85 #------------------------------------------------------------------------
86 # ignore symlinks
87
88 #------------------------------------------------------------------------
89 # There are two checks for the case of element tags:
90 #       upper-case      all tags should be in upper case
91 #       lower-case      all tags should be in lower case
92 # If both are disabled, then case is ignored
93 #------------------------------------------------------------------------
94 disable upper-case lower-case
95
96 #------------------------------------------------------------------------
97 # Bad style to use `here' as anchor text
98 #------------------------------------------------------------------------
99 enable here-anchor
100
101 #------------------------------------------------------------------------
102 # Flag any elements which are not recognized.  This will catch mis-typed
103 # elements (e.g. <TOTLE>, or <\BODY>).
104 #------------------------------------------------------------------------
105 enable unknown-element
106
107 #------------------------------------------------------------------------
108 # check element attributes to see if they are legal
109 #------------------------------------------------------------------------
110 enable unknown-attribute
111
112 #------------------------------------------------------------------------
113 # flag if no HEAD element in page
114 #------------------------------------------------------------------------
115 enable require-head
116
117 #------------------------------------------------------------------------
118 # Flag elements which should only appear once on a page (eg TITLE)
119 #------------------------------------------------------------------------
120 enable once-only
121
122 #------------------------------------------------------------------------
123 # Flag case where page has BODY element, but no HEAD defined
124 #------------------------------------------------------------------------
125 enable body-no-head
126
127 #------------------------------------------------------------------------
128 # If you want outer element to be <HTML>
129 #------------------------------------------------------------------------
130 enable html-outer
131
132 #------------------------------------------------------------------------
133 # Flag elements which are only allowed to appear in HEAD element
134 #------------------------------------------------------------------------
135 enable head-element
136
137 #------------------------------------------------------------------------
138 # Flag elements which aren't allowed to appear in HEAD element
139 #------------------------------------------------------------------------
140 enable non-head-element
141
142 #------------------------------------------------------------------------
143 # Flag obsolete elements, such as XMP and LISTING
144 #------------------------------------------------------------------------
145 enable obsolete
146
147 #------------------------------------------------------------------------
148 # Flag mis-matched begin and end tags;  for example:
149 #       <H1> ... </H2>
150 #------------------------------------------------------------------------
151 enable mis-match
152
153 #------------------------------------------------------------------------
154 # Flag any IMG elements which don't have ALT text defined.
155 #------------------------------------------------------------------------
156 enable img-alt
157
158 #------------------------------------------------------------------------
159 # Flag illegally nested elements (such as anchors).
160 #------------------------------------------------------------------------
161 enable nested-element
162
163 #------------------------------------------------------------------------
164 # Check for those elements which have required context.
165 # For example, the <CAPTION> element can only appear in <FIG> or <TABLE>
166 #------------------------------------------------------------------------
167 enable required-context
168
169 #------------------------------------------------------------------------
170 # Check for mailto: LINK in header;  for example:
171 #       <LINK REV=MADE HREF="mailto:neilb@cre.canon.co.uk">
172 # This lets at least lynx users comment on a page.
173 #------------------------------------------------------------------------
174 disable mailto-link
175
176 #------------------------------------------------------------------------
177 # Flag overlapped elements.  For example:
178 #       <A HREF="..."> <B> text </A> </B>
179 #------------------------------------------------------------------------
180 enable element-overlap
181
182 #------------------------------------------------------------------------
183 # Generate a warning if closing tag is not seen for elements where
184 # it is expected.  A common case is <A NAME="..."> ... </A>.
185 #------------------------------------------------------------------------
186 enable unclosed-element
187
188 #------------------------------------------------------------------------
189 # Generate a warning if markup appears inside a comment.  This can
190 # confuse quite a few browsers, so it's not a good idea to do it.
191 #------------------------------------------------------------------------
192 enable markup-in-comment
193
194 #------------------------------------------------------------------------
195 # You are not allowed to have any whitespace between the opening
196 # < and element name.
197 #------------------------------------------------------------------------
198 enable leading-whitespace
199
200 #------------------------------------------------------------------------
201 # Flag potentially unclosed tags:
202 #       < ... < ... >
203 #------------------------------------------------------------------------
204 enable unexpected-open
205
206 #------------------------------------------------------------------------
207 # Elements which do not have any required attributes, but for which at
208 # least one attribute is expected.  Anchors, for example.
209 #------------------------------------------------------------------------
210 enable expected-attribute
211
212 #------------------------------------------------------------------------
213 # Required element attributes.  Eg IMG tag must have SRC attribute.
214 #------------------------------------------------------------------------
215 enable required-attribute
216
217 #------------------------------------------------------------------------
218 # Currently just checks local links, to see if target file exists.
219 # disabled at the moment, since it generates bogus warnings if the file
220 # path included directories.
221 #------------------------------------------------------------------------
222 disable bad-link
223
224 #------------------------------------------------------------------------
225 # Check for headings which are more than 1 level deeper than previous.
226 # Example: <H1> followed by <H3>
227 #------------------------------------------------------------------------
228 enable heading-order
229
230 #------------------------------------------------------------------------
231 # Check for odd number of double quotes in tag, to catch things like:
232 #               <A HREF="url >
233 #------------------------------------------------------------------------
234 enable odd-quotes
235
236 #------------------------------------------------------------------------
237 # Warn about closing tag for elements which don't take a closing tag.
238 # For example: <IMG SRC="foo.gif" ALT="alt text"></IMG>
239 #------------------------------------------------------------------------
240 enable illegal-closing
241
242 #------------------------------------------------------------------------
243 # Warn about unclosed comments.  For example:
244 #       <!-- this comment is not correctly closed >
245 # Legal SGML comments are:
246 #       <!-- ... blah blah ... -->
247 #------------------------------------------------------------------------
248 enable unclosed-comment
249
250 #------------------------------------------------------------------------
251 # Warning for use of physical font markup, rather than logical
252 # For example:
253 #       <B> where you should use <STRONG>
254 #       <I> where you should use <EM>
255 #       <TT> where you should use <CODE>, <KBD>, <VAR>, or <SAMP>
256 #------------------------------------------------------------------------
257 disable physical-font
258
259 #------------------------------------------------------------------------
260 # Warning for repeated attributes within the same tag.  For example:
261 #       <IMG SRC="foo.gif" SRC="bar.gif">
262 #       <A NAME="fred" NAME="bloggs">
263 #------------------------------------------------------------------------
264 enable repeated-attribute
265
266 #------------------------------------------------------------------------
267 # Warn against use of ' as a delimiter for attribute values.  E.g.:
268 #       <A HREF='http://www.cre.canon.co.uk/'>Canon Research Centre</A>
269 #------------------------------------------------------------------------
270 enable attribute-delimiter
271
272 #------------------------------------------------------------------------
273 # Warn about attributes on a closing tag of container element.  E.g.:
274 #       <A HREF="foobar.html">click here!</A NAME="foobar">
275 #------------------------------------------------------------------------
276 enable closing-attribute
277
278 #------------------------------------------------------------------------
279 # When recursing in a directory, check whether there is a directory
280 # index file.  See also the variable `directory-index', which specifies
281 # the name of index file to look for.
282 #------------------------------------------------------------------------
283 enable directory-index
284
285 #------------------------------------------------------------------------
286 # Warn about empty container elements.  For example:
287 #       <TITLE></TITLE>
288 #------------------------------------------------------------------------
289 enable empty-container
290
291 #------------------------------------------------------------------------
292 # Warn about situations where one element is expected to immediately
293 # follow another, with no tags or text between. For example:
294 #       1) LH should be the first thing in a UL, if it appears at all
295 #       2) should be nothing between </HEAD> and <BODY>
296 #------------------------------------------------------------------------
297 enable must-follow
298
299 #------------------------------------------------------------------------
300 # Warn about IMG elements which don't have the WIDTH and HEIGHT
301 # attributes set. Setting these attributes can improve page layout speed
302 # on some browsers.
303 #------------------------------------------------------------------------
304 disable img-size
305
306 #------------------------------------------------------------------------
307 # Warn about leading or trailing whitespace for certain container
308 # elements: A, TITLE, H1 through H6.
309 #------------------------------------------------------------------------
310 disable container-whitespace
311
312 #------------------------------------------------------------------------
313 # Warn if you don't have a DOCTYPE element as the first thing in
314 # your document.
315 #------------------------------------------------------------------------
316 disable require-doctype
317
318 #------------------------------------------------------------------------
319 # Warn if you a metacharacter is included literally, rather than using
320 # the appropriate entity. Currently this just warns about use of >,
321 # in which case you should use &gt;
322 #------------------------------------------------------------------------
323 enable literal-metacharacter
324
325 # ========================================================================
326 # Warnings added in the 1.014 release
327 # ========================================================================
328
329 #------------------------------------------------------------------------
330 # Warn if a heading is closed with a different level close tag than
331 # the heading was opened with. For example:
332 #       <H2>... blah blah ...</H1>
333 #------------------------------------------------------------------------
334 enable heading-mismatch
335
336 #------------------------------------------------------------------------
337 # Warn if text is seen in unexpected context, such as inside a UL element
338 # (rather than inside an LI, which is inside a UL. Or in the HEAD element.
339 #------------------------------------------------------------------------
340 enable bad-text-context
341
342 #------------------------------------------------------------------------
343 # Warn about illegal attribute values, such as values in the wrong format.
344 #------------------------------------------------------------------------
345 enable attribute-format
346
347 # ========================================================================
348 # Warnings added in the 1.015 release  
349 #       NOTE: the netscape-markup and netscape-attribute warnings
350 #               were deleted with the 1.015 release
351 # ========================================================================
352
353 # uncomment the following line if using the Microsoft HTML extensions
354 # extension Microsoft
355
356 #------------------------------------------------------------------------
357 # Warn if using extended markup without an appropriate extension enabled.
358 # This warning replaces the 'netscape-markup' warning, and is now generated
359 # if the page uses Netscape or Microsoft extensions.
360 #------------------------------------------------------------------------
361 enable extension-markup
362  
363 #------------------------------------------------------------------------
364 # Warn if using extended attributes without an appropriate extension enabled.
365 # This warning replaces the 'netscape-attribute' warning, and is now generated
366 # if the page uses Netscape or Microsoft attributes.
367 #------------------------------------------------------------------------
368 enable extension-attribute
369
370
371 # ========================================================================
372 # New stuff in the 1.016 release
373 # ========================================================================
374
375 #------------------------------------------------------------------------
376 # Warn of the document TITLE is longer than 64 characters.
377 # This limit is recommended by the HTML specification
378 #------------------------------------------------------------------------
379 enable title-length
380
381 #------------------------------------------------------------------------
382 # Warn about a heading inside an anchor. Should be the other way round;
383 # i.e. an anchor inside a heading.
384 #------------------------------------------------------------------------
385 enable heading-in-anchor
386
387 #------------------------------------------------------------------------
388 # Warn about use of < inside the PRE element. This is just a special
389 # case of the `literal-metacharacter' warning.
390 #------------------------------------------------------------------------
391 enable meta-in-pre
392
393 #------------------------------------------------------------------------
394 # Warn about attribute values which should be quoted, but aren't.
395 # Attribute values should be quoted if they contain characters
396 # other than [-.A-Za-z0-9]
397 #------------------------------------------------------------------------
398 enable quote-attribute-value
399
400
401 # ========================================================================
402 # New stuff in the 1.020 release
403 # ========================================================================
404
405 #-- no new warnings or variables added in 1.020
406