From fb2b62902f65524fab0e86a3555b0071a0983e02 Mon Sep 17 00:00:00 2001 From: Frank Duncan Date: Mon, 13 Jul 2015 01:18:26 -0500 Subject: [PATCH] Created README --- README.md | 36 ++++++++++++++++++++++++++++++++++++ src/main/syntax-checker.lisp | 22 ---------------------- 2 files changed, 36 insertions(+), 22 deletions(-) create mode 100644 README.md 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 -- 2.25.1