Elsa
Elsa copied to clipboard
Implement rules from emacs style guide
https://github.com/bbatsov/emacs-lisp-style-guide
For inspiration look at https://github.com/Fuco1/Elsa/blob/master/elsa-ruleset.el the ruleset elsa-ruleset-style contains the style rules.
These are in turn defined in https://github.com/Fuco1/Elsa/blob/master/elsa-rules-list.el.
The naming of these files isn't great and I think we will need to split it apart better, somewhat in style of the extension and typed... so we will have elsa-ruleset-style.el which will define the ruleset and all the accompanying rules.
- [ ] Syntax
- [x] Don't wrap the else clause in
progn - [x] Use
wheninstead of(if .. (progn ...)) - [ ] Use
unlessinstead of(when (not ...)) - [ ] Use
tas catch-all incondforms
- [x] Don't wrap the else clause in
- [ ] Naming
- [x] Use
lisp-case - [ ] Use project prefix (how to detect this?)
- [ ] Use
_prefix for unused lexical variables - [ ] Use
--for private functions (see #26, if there is no reference maybe it is public API and should not be private) - [ ] Face names don't end in
-face
- [x] Use
- [ ] Functions
- [ ] No
lambdafor hooks or settings - [ ] Don't quote
lambdaforms with' - [x] Don't wrap functions in lambdas
- [ ] Use
#'for quoting of functions
- [ ] No
We can also look at the closure version https://github.com/bbatsov/clojure-style-guide some of the things might be relevant.