3 Enforces arbitrary set of style guidelines.
5 This package walks over common lisp code to make sure it adheres to a set of syntactic guidelines designed to ensure a semblance of uniformity. No current one was found that could be configured to work the way this one does, so instead of writing a configurable tool, another unconfigurable one was born.
9 * **function [check-directory](#function-check-directory)** - _check-directory_ grabs all .lisp files in the tree under _dir_, and loads checks them all.
10 * **function [check-file](#function-check-file)** - _check-file_ runs all the checks against a file and returns as soon as the first style error is found.
11 * **function [pretty-print-check-directory](#function-pretty-print-check-directory)** - _pretty-print-check-directory_ checks _dir_ for any errors, dumping them to output and returning a single flag.
13 ## Function **CHECK-DIRECTORY**
17 **check-directory** _dir_ _&key_ _copyright-notice_ => _results_
19 ```results::= result*```
21 #### Arguments and Values:
23 _dir_---A directory to recurse into and check files
24 _copyright-notice_---A regex string
25 _result_---A result as returned by check-file
29 _check-directory_ grabs all .lisp files in the tree under _dir_, and loads checks them all.
31 If _copyright-notice_ is included, then the first line must match the regular expression passed.
33 The results are then put together into a list which can be programatically evaluated. As opposed to pretty-print-check-directory, this function doesn't clutter up your standard out.
35 ## Function **CHECK-FILE**
39 **check-file** _file_ _&key_ _copyright-notice_ => _result_
41 ```result::= success-result | failure-result```
42 ```success-result::= (:success filename)```
43 ```failure-result::= (:success filename msg line-no col-no)```
45 #### Arguments and Values:
48 _copyright-notice_---A regex string
49 _filename_---the file this check was run on
50 _msg_---a string containing the failure message
51 _line-no_---an integer, the line number on which the failure appeared
52 _col-no_---an integer, the column number on which the failure appeared
56 _check-file_ runs all the checks against a file and returns as soon as the first style error is found.
58 If _copyright-notice_ is included, then the first line must match the regular expression passed.
62 ```(check-file #P"path/to/file.lisp")``` => ```(:success "path/to/file.lisp")```
63 ```(check-file #P"path/to/error.lisp")``` => ```(:failure "path/to/error.lisp" "File cannot end with empty line" 20 0)```
64 ```(check-file #P"path/to/error.lisp" :copyright-notice "; Copyright .* AGPL")``` => ```(:failure ...)```
66 ## Function **PRETTY-PRINT-CHECK-DIRECTORY**
70 **pretty-print-check-directory** _dir_ _&key_ _copyright-notice_ => _success_
72 #### Arguments and Values:
74 _dir_---A directory to recurse into and check files
75 _copyright-notice_---A regex string
76 _success_---T if there were no failures
80 _pretty-print-check-directory_ checks _dir_ for any errors, dumping them to output and returning a single flag.
82 If _copyright-notice_ is included, then the first line must match the regular expression passed.
84 Unlike check-directory, _pretty-print-check-directory_ is built for continuous integration, dumping errors to standard out and returning a singular result.
88 ```(pretty-print-check-directory "src")``` => ```nil```