From: Frank Duncan Date: Mon, 13 Jul 2015 06:18:26 +0000 (-0500) Subject: Created README X-Git-Url: https://code.consxy.com/gitweb/gitweb.cgi?p=wolf;a=commitdiff_plain;h=fb2b62902f65524fab0e86a3555b0071a0983e02;hp=5dd1203401bbef1e3657fe5cc89ab2e577dd260b Created README --- diff --git a/README.md b/README.md new file mode 100644 index 0000000..290c324 --- /dev/null +++ b/README.md @@ -0,0 +1,36 @@ +# Common Lisp Style Checker +Enforcement of my guidelines for common lisp style. + +If you like, you can [download it](https://github.com/frankduncan/style-checker/releases/download/0.1/style-checker_0.1.tar.gz) + +## Syntax Checking Rules +* Elements on new line in each form must be indented the same amount +* No space/newline after open parens +* No form longer than 50 lines +* Top level multiline forms must be separated by exactly one space +* No line longer than 120 characters +* No use of unexported symbols in other packages +* No tabs +* Only one space between elements in a form on a single line +* in-package must be first line in file unless file is package.lisp +* No whitespace at end of line +* No lines that are only whitespace +* No empty lines at end of file +* Never have two empty lines in a row +* Only one in-package per file +* No hanging close parens + +### Exceptions +* comments +* multiline strings +* exclude in-package check from package.lisp + +## Usage + +``` +(check-file file) + +(check-directory dir) + +(check-directory pretty-print-check-directory) +``` diff --git a/src/main/syntax-checker.lisp b/src/main/syntax-checker.lisp index 9a0716d..1190818 100644 --- a/src/main/syntax-checker.lisp +++ b/src/main/syntax-checker.lisp @@ -1,27 +1,5 @@ (in-package #:syntax-checker) -; Rules -; * Elements on new line in each form must be indented the same amount -; * No space/newline after open parens -; * No form longer than 50 lines -; * Top level multiline forms must be separated by exactly one space -; * No line longer than 120 characters -; * No use of unexported symbols in other packages -; * No tabs -; * Only one space between elements in a form on a single line -; * in-package must be first line in file unless file is package.lisp -; * No whitespace at end of line -; * No lines that are only whitespace -; * No empty lines at end of file -; * Never have two empty lines in a row -; * Only one in-package per file -; * No hanging close parens -; -; Exceptions -; * comments -; * multiline strings -; * exclude in-package check from package.lisp - ; Some thoughts ; - form starting reader macros will have to be hand added to this code ; - exceptions will eventually arise, and the rule file will have to be changed