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_ => _results_
19 ```results::= result*```
21 #### Arguments and Values:
23 _dir_---A directory to recurse into and check files
24 _result_---A result as returned by check-file
28 _check-directory_ grabs all .lisp files in the tree under _dir_, and loads checks them all.
30 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.
32 ## Function **CHECK-FILE**
36 **check-file** _file_ => _result_
38 ```result::= success-result | failure-result```
39 ```success-result::= (:success filename)```
40 ```failure-result::= (:success filename msg line-no col-no)```
42 #### Arguments and Values:
45 _filename_---the file this check was run on
46 _msg_---a string containing the failure message
47 _line-no_---an integer, the line number on which the failure appeared
48 _col-no_---an integer, the column number on which the failure appeared
52 _check-file_ runs all the checks against a file and returns as soon as the first style error is found.
56 ```(check-file #P"path/to/file.lisp")``` => ```(:success "path/to/file.lisp")```
57 ```(check-file #P"path/to/error.lisp")``` => ```(:failure "path/to/error.lisp" "File cannot end with empty line" 20 0)```
59 ## Function **PRETTY-PRINT-CHECK-DIRECTORY**
63 **pretty-print-check-directory** _dir_ => _success_
65 #### Arguments and Values:
67 _dir_---A directory to recurse into and check files
68 _success_---T if there were no failures
72 _pretty-print-check-directory_ checks _dir_ for any errors, dumping them to output and returning a single flag.
74 Unlike check-directory, _pretty-print-check-directory_ is built for continuous integration, dumping errors to standard out and returning a singular result.
78 ```(pretty-print-check-directory "src")``` => ```nil```