weblint 1.020(1L) MISC. REFERENCE MANUAL PAGES weblint 1.020(1L) NAME weblint - pick fluff off web pages (HTML) SYNOPSIS weblint [ -d _i_d ] [ -e _i_d ] [ -f _f_i_l_e_n_a_m_e ] [ -i ] [ -l ] [ -s ] [ -stderr ] [ -t ] [ -todo ] [ -help ] [ -U ] [ -urlget _c_o_m_m_a_n_d ] [ -v ] [ -version ] [ -warnings ] [ -x _e_x_t_e_n_s_i_o_n ] file1 .. fileN DESCRIPTION Weblint is a Perl script which picks fluff off HTML pages. Files to be checked are passed on the command-line: % weblint foobar.html ./dodgy-files/ index.html If any of the arguments are directories weblint will recurse in the directory, and check any HTML files found. If an argument is a URL, then weblint will get the file using a URL retrieval program, and then check the file: % weblint http://www.foobar.com/ By default weblint will use lynx to retrieve URLs, but this can be over-ridden. A filename of `-' specifies that weblint should read from standard input: % lynx -source http://www.foobar.com/ | weblint - Warnings are generated a la lint: home.html(9): unmatched (no matching seen). Weblint includes the following features: o+ by default checks for HTML 3.2 (Wilbur) o+ 46 different checks and warnings o+ Warnings can be enabled/disabled individually, as per your preference o+ basic structure and syntax checks o+ warnings for use of unknown elements and element attributes. o+ context checks (where a tag must appear within a certain element). o+ overlapped or illegally nested elements. o+ do IMG elements have ALT text? Handmade Last change: August 97 1 weblint 1.020(1L) MISC. REFERENCE MANUAL PAGES weblint 1.020(1L) o+ flags obsolete elements. o+ support for user and site configuration files o+ stylistic checks o+ checks for html which is not portable across all browsers o+ flags markup embedded in comments, since this can confuse some browsers o+ support for Netscape, and Microsoft HTML extensions OPTIONS -d _w_a_r_n_i_n_g-_i_d_e_n_t_i_f_i_e_r Disable the warning associated with the identifier. Multiple identifiers can be specified, with a comma between identifiers. -e _w_a_r_n_i_n_g-_i_d_e_n_t_i_f_i_e_r Enable the warning associated with the identifier. Multiple identifiers can be specified, with a comma between identifiers. -f _c_o_n_f_i_g-_f_i_l_e Specify a weblint configuration file which should be used in place of the user's default config file, or the site configuration file. -help Show a short usage summary. -i Ignore case of element tags. -l When recursing in directories, ignore any files which are symlinks (also known as soft links). This will also cause files on the command-line to be ignored if they are symlinks, unless only one file is given. -pedantic Turn on all warnings except the case-sensitive and bad-link warnings. -s Generate `short' warning messages, which do not include the filename. -stderr Print warning messages to STDERR rather than STDOUT. -t Enable terse warning mode, which is mainly useful for the weblint testsuite. Handmade Last change: August 97 2 weblint 1.020(1L) MISC. REFERENCE MANUAL PAGES weblint 1.020(1L) -U Same as -help. -urlget _c_o_m_m_a_n_d The command which should be used to retrieve HTML pages specified by URL. -v Display the version number. -version Display the version number. -todo This prints out the URL for the online version of the weblint ToDo list. This includes known bugs, and requested/planned features. -warnings List all supported warnings, with warning identifier, and whether the warning is enabled. -x _e_x_t_e_n_s_i_o_n Include checks for the specified HTML extension; multi- ple extensions can be specified, separated with a comma. Currently the only extensions supported are _N_e_t_s_c_a_p_e and _M_i_c_r_o_s_o_f_t. This can also be set in your weblint configuration file, described below. HTML EXTENSIONS Unless you specify otherwise, weblint assumes you are using HTML 3.2. Weblint supports the Netscape and Microsoft HTML extensions in addition. For example, weblint will complain that the BLINK element is not known, unless you enable the Netscape extension. The following extensions are currently supported: Netscape The HTML extensions supported by the Netscape browser, version 4. Microsoft The HTML extensions supported by Microsoft Internet Explorer, version 4. To enable an extension, you can either use the -x command- line switch: % weblint -x Netscape foobar.html Or you can use the extension keyword in your ._w_e_b_l_i_n_t_r_c: # enable the Microsoft extensions extension Microsoft Handmade Last change: August 97 3 weblint 1.020(1L) MISC. REFERENCE MANUAL PAGES weblint 1.020(1L) CONFIGURATION FILE _W_e_b_l_i_n_t can be configured using a file ._w_e_b_l_i_n_t_r_c in your home directory (or a file referenced by the WEBLINTRC environment variable). This file can be used to enable or disable specific warnings, set weblint variables, and include HTML extensions, as described above. Each warning has a short identifier string, used to refer to the warning in config files, and from the command-line. For example, if you want to enable the check for tags in upper-case, but disable the check for obsolete elements, then you would include the following lines in your .weblintrc: # specify the command used to retrieve URLs (-urlget switch) set url-get = lynx -source # the style of warning message to generate (lint, short, or terse) set message-style = lint # enable warning for tags not in upper-case enable upper-case # disable the warning for obsolete tags disable obsolete # enable the Netscape HTML extensions extension Netscape # when recursing in a directory, # ignore files which are symlinks (also known as soft links) ignore symlinks The keywords can be followed by any number of arguments, separated by spaces or tabs. Anything following a `#' is treated as a comment. A sample configuration file is included in the weblint dis- tribution (as of version 1.004), which mirrors the confi- guration built-in to weblint. Weblint also supports a site configuration file. If a user does not have a personal configuration file, then weblint will check for a local site configuration file. To provide such a file, create a directory such as /usr/local/weblint, and create a file global.weblintrc. You need to edit the weblint script and modify the $SITE_DIR variable, which you will find near the top of the file. For example: $SITE_DIR = '/usr/local/weblint'; At some point in the future there will be configuration sup- port for weblint, so you won't have to modify the script directly yourself. Handmade Last change: August 97 4 weblint 1.020(1L) MISC. REFERENCE MANUAL PAGES weblint 1.020(1L) If you have a site configuration file, then users can inherit the site defaults by adding the following line at the top of their .weblintrc file: use global weblintrc WARNINGS All warnings generated by _w_e_b_l_i_n_t are listed below, along with the associated identifier, and whether the warning is enabled or disabled by default. TESTSUITE A simple regression testsuite is included with weblint, in the Perl script test.pl. You can run the testsuite with either of the following commands: % make test % ./test.pl The results are printed to STDERR, with a more complete report generated in test.log. All tests should pass. If any tests fail, please email test.log to the address given in the AUTHOR section below. ENVIRONMENT VARIABLES WEBLINTRC If this variable is defined, and references a file, then _w_e_b_l_i_n_t will read the referenced file for the user's configuration, rather than $HOME/.weblintrc. TMPDIR The directory where weblint will create temporary work- ing files. Defaults to /usr/tmp. FILES $HOME/.weblintrc The user's configuration file. See the section `CONFI- GURATION FILE'. SEE ALSO perl(1) VERSION This man page describes _w_e_b_l_i_n_t _1._0_2_0. AVAILABILITY ftp://ftp.cre.canon.co.uk/pub/weblint/weblint.tar.gz http://www.cre.canon.co.uk/~neilb/weblint/ ftp://unix.hensa.ac.uk/mirrors/perl-CPAN/ ftp://ftp.cdrom.com/pub/perl/CPAN/authors/id/NEILB/weblint-1.020.tar.gz KNOWN BUGS The list of known bugs can be found on the weblint home page: http://www.cre.canon.co.uk/~neilb/weblint/todo/ Certain versions of Perl have bugs which are triggered by weblint. You shouldn't experience problems if you have 4.036, or 5.002. AUTHOR Neil Bowers, Canon Research Centre Europe neilb@cre.canon.co.uk CONTRIBUTIONS Lots of people have contributed to weblint, in the form of suggestions, bug reports, fixes, and contributed code. Please email me if your name should appear in the roll call below. Abigail ; Anthony Thyssen ; Axel Boldt ; Barry Bakalor ; Bill Arnett ; Bob Friesenhahn ; Mark Gates ; Bruce Speyer ; Chris Siebenmann ; Clay Webster ; Dana Jacobsen ; David Begley ; David J. MacKenzie ; Douglas Brick ; Gil Citro; Eric de Mund ; Richard Finegold ; Joerg Heitkoetter ; David Koblas ; John Labovitz ; Eric Maryniak ; John F. Whitehead Juergen Schoenwaelder ; Frank Steinke ; Larry Virden ; Paul Black ; Doug Grinbergs ; Philip Hallstrom ; Craig Leres ; Richard Lloyd ; Charles F. Randall ; Robert Schmunk ; Jeff Schave ; Jon Thackray ; Jens Thordarson ; Ryan Waldron ; Thomas Leavitt ; Tom Neff ; Victor Parada ; Erick Branderhorst ; Bryan O'Sullivan ; Alan J. Flavell ; Raphael Manfredi ; Keith Iosso ; Chris Lambert ; Tristan Savatier ; Phil Hooper Handmade Last change: August 97 6 weblint 1.020(1L) MISC. REFERENCE MANUAL PAGES weblint 1.020(1L) ; Gerald Viers ; Dean Brissinger ; Dave Schmitt ; John Van Essen ; Brandon Bell ; Fumio Moriya and Toshiaki Nomura ; Vincent Lefevre ; Jason Mathews ; Lars Balker Rasmussen ; Richard L. Hawes . Handmade Last change: August 97 7