2 # sample configuration file for weblint
3 # distributed as part of weblint 1.020
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.
10 #========================================================================
11 # Global Configuration File
12 #========================================================================
14 # Weblint supports a local site configuration file.
15 # If one is set up, then you can specify it be included with the following:
17 # use global weblintrc
20 #========================================================================
22 #========================================================================
25 # message-style: style of warning message to generate
26 # lint generate warnings similar to traditional lint:
27 # file(line #): warning
29 # short don't include the filename in the warning message:
31 # terse a style which is easy for another program to parse:
32 # file:line #:warning-identifier
34 set message-style = lint
37 # url-get: a program which can be used to retrieve a URL
40 set url-get = lynx -source
43 # directory-index: list of filenames for directory indices
45 # If your server supports multiple index file names:
46 # set directory-index = index.html, welcome.html
49 set directory-index = index.html
52 # file-extensions: list of filename extensions for valid HTML filenames
54 # A comma-separated list of filenames extensions; these are used when
55 # recursing in a directory, to decide which files should be checked.
58 set file-extensions = html, htm
60 #========================================================================
62 #========================================================================
64 #------------------------------------------------------------------------
65 # Allow Netscape HTML extensions, such as CENTER and FONT
66 #------------------------------------------------------------------------
67 # uncomment following line to enable the Netscape extensions
70 #------------------------------------------------------------------------
71 # Allow Microsoft HTML extensions, such as MARQUEE
72 #------------------------------------------------------------------------
73 # uncomment following line to enable the Microsoft extensions
77 #========================================================================
79 #========================================================================
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 #------------------------------------------------------------------------
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
96 #------------------------------------------------------------------------
97 # Bad style to use `here' as anchor text
98 #------------------------------------------------------------------------
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
107 #------------------------------------------------------------------------
108 # check element attributes to see if they are legal
109 #------------------------------------------------------------------------
110 enable unknown-attribute
112 #------------------------------------------------------------------------
113 # flag if no HEAD element in page
114 #------------------------------------------------------------------------
117 #------------------------------------------------------------------------
118 # Flag elements which should only appear once on a page (eg TITLE)
119 #------------------------------------------------------------------------
122 #------------------------------------------------------------------------
123 # Flag case where page has BODY element, but no HEAD defined
124 #------------------------------------------------------------------------
127 #------------------------------------------------------------------------
128 # If you want outer element to be <HTML>
129 #------------------------------------------------------------------------
132 #------------------------------------------------------------------------
133 # Flag elements which are only allowed to appear in HEAD element
134 #------------------------------------------------------------------------
137 #------------------------------------------------------------------------
138 # Flag elements which aren't allowed to appear in HEAD element
139 #------------------------------------------------------------------------
140 enable non-head-element
142 #------------------------------------------------------------------------
143 # Flag obsolete elements, such as XMP and LISTING
144 #------------------------------------------------------------------------
147 #------------------------------------------------------------------------
148 # Flag mis-matched begin and end tags; for example:
150 #------------------------------------------------------------------------
153 #------------------------------------------------------------------------
154 # Flag any IMG elements which don't have ALT text defined.
155 #------------------------------------------------------------------------
158 #------------------------------------------------------------------------
159 # Flag illegally nested elements (such as anchors).
160 #------------------------------------------------------------------------
161 enable nested-element
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
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 #------------------------------------------------------------------------
176 #------------------------------------------------------------------------
177 # Flag overlapped elements. For example:
178 # <A HREF="..."> <B> text </A> </B>
179 #------------------------------------------------------------------------
180 enable element-overlap
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
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
194 #------------------------------------------------------------------------
195 # You are not allowed to have any whitespace between the opening
196 # < and element name.
197 #------------------------------------------------------------------------
198 enable leading-whitespace
200 #------------------------------------------------------------------------
201 # Flag potentially unclosed tags:
203 #------------------------------------------------------------------------
204 enable unexpected-open
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
212 #------------------------------------------------------------------------
213 # Required element attributes. Eg IMG tag must have SRC attribute.
214 #------------------------------------------------------------------------
215 enable required-attribute
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 #------------------------------------------------------------------------
224 #------------------------------------------------------------------------
225 # Check for headings which are more than 1 level deeper than previous.
226 # Example: <H1> followed by <H3>
227 #------------------------------------------------------------------------
230 #------------------------------------------------------------------------
231 # Check for odd number of double quotes in tag, to catch things like:
233 #------------------------------------------------------------------------
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
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
250 #------------------------------------------------------------------------
251 # Warning for use of physical font markup, rather than logical
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
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
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
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
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
285 #------------------------------------------------------------------------
286 # Warn about empty container elements. For example:
288 #------------------------------------------------------------------------
289 enable empty-container
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 #------------------------------------------------------------------------
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
303 #------------------------------------------------------------------------
306 #------------------------------------------------------------------------
307 # Warn about leading or trailing whitespace for certain container
308 # elements: A, TITLE, H1 through H6.
309 #------------------------------------------------------------------------
310 disable container-whitespace
312 #------------------------------------------------------------------------
313 # Warn if you don't have a DOCTYPE element as the first thing in
315 #------------------------------------------------------------------------
316 disable require-doctype
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 >
322 #------------------------------------------------------------------------
323 enable literal-metacharacter
325 # ========================================================================
326 # Warnings added in the 1.014 release
327 # ========================================================================
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
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
342 #------------------------------------------------------------------------
343 # Warn about illegal attribute values, such as values in the wrong format.
344 #------------------------------------------------------------------------
345 enable attribute-format
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 # ========================================================================
353 # uncomment the following line if using the Microsoft HTML extensions
354 # extension Microsoft
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
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
371 # ========================================================================
372 # New stuff in the 1.016 release
373 # ========================================================================
375 #------------------------------------------------------------------------
376 # Warn of the document TITLE is longer than 64 characters.
377 # This limit is recommended by the HTML specification
378 #------------------------------------------------------------------------
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
387 #------------------------------------------------------------------------
388 # Warn about use of < inside the PRE element. This is just a special
389 # case of the `literal-metacharacter' warning.
390 #------------------------------------------------------------------------
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
401 # ========================================================================
402 # New stuff in the 1.020 release
403 # ========================================================================
405 #-- no new warnings or variables added in 1.020