• Stars
    star
    134
  • Rank 270,967 (Top 6 %)
  • Language
    Common Lisp
  • License
    Other
  • Created over 13 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The Lisp Critic scans your code for instances of bad Lisp programming practice.

LISP-CRITIC - A Lisp code critiquing package.

see https://courses.cs.northwestern.edu/325/exercises/critic.php#critic

  • Author: Chris Riesbeck
  • Licence: MIT Licence

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Load:

(asdf:load-system :lisp-critic)

Example call:

(critique
   (defun count-a (lst)
     (setq n 0)
     (dolist (x lst)
       (if (equal x 'a)
         (setq n (+ n 1))))
     n))

Example output:

----------------------------------------------------------------------

SETS-GLOBALS: GLOBALS!! Don't use global variables, i.e., N N
----------------------------------------------------------------------

DOLIST-SETF: Don't use SETQ inside DOLIST to accumulate values for N.
Use DO. Make N a DO variable and don't use SETQ etc at all.
----------------------------------------------------------------------

USE-EQL: Unless something special is going on, use EQL, not EQUAL.
----------------------------------------------------------------------

X-PLUS-1: Don't use (+ N 1), use (1+ N) for its value or (INCF N) to
change N, whichever is appropriate here.
----------------------------------------------------------------------

See the lisp-critic.lisp file for more information. To load LISP-CRITIC to the REPL, Type (USE-PACKAGE :LISP-CRITIC).

To run the Lisp Critic on an entire file of code:

(critique-file pathname)

For example,

(critique-file "~/riesbeck/cs325/chap9-exs.lisp")

More Repositories

1

Starlisp-simulator

*Lisp simulator
Common Lisp
25
star
2

google-common-lisp-style-guide-ja

XSLT
17
star
3

MacLISP-compat

MacLISPのコードをCLで動かす
Common Lisp
14
star
4

setagaya.lisp

common lisp utility
Common Lisp
11
star
5

arc-compat

Arc compatible package
Common Lisp
11
star
6

Uranus

Uranus Interpreter for ANSI Common Lisp
Common Lisp
11
star
7

tagger

Common Lisp
10
star
8

lw-paredit

Paredit version 1 for LispWorks
Common Lisp
10
star
9

srfi-46

SRFI 46 for Common Lisp: Basic Syntax-rules Extensions
Common Lisp
7
star
10

source-compare

Source Compare: A 'diff' Program for Lisp
Common Lisp
7
star
11

CommonORBIT

CORBIT: Object-oriented extension of Common Lisp based on a prototype (classless) model of OOP.
Common Lisp
6
star
12

irix-icons

Shell
5
star
13

fmt

Common Lisp
5
star
14

cool

COOL: Implementation of HP’s CommonObjects on top of the PCL metaclass kernel.
Common Lisp
5
star
15

closette

Common Lisp
5
star
16

tao-compat

TAO/ELISの関数/マクロをCL上に再現してみようという試み
Common Lisp
4
star
17

ai.lang.lisp.code.parsing.time

PARSE-TIME: Parsing routines for time and date strings.
Common Lisp
4
star
18

lint

https://www.cs.cmu.edu/afs/cs/project/ai-repository/ai/lang/lisp/code/tools/lint/0.html
Common Lisp
3
star
19

common-lisp-users.jp

Scheme
3
star
20

srfi-1

SRFI-1: List Library
NewLisp
3
star
21

srfi-42

SRFI 42 for Common Lisp: Eager Comprehensions
Common Lisp
3
star
22

cl-bench-in-single-file

cl-bench-in-single-file
Common Lisp
3
star
23

util.match

Common Lisp
3
star
24

ai.lang.lisp.code.iter.series

November, 26 1991 version of Richard C. Waters' Series macro package
Common Lisp
3
star
25

mbe

Scheme Macros for Common Lisp
Common Lisp
3
star
26

ai.lang.lisp.code.tools.xref

List Callers: A Static Analysis Cross Referencing Tool for Lisp
Common Lisp
3
star
27

rnrs-compat

RnRS Compatibility Package for Common Lisp
Common Lisp
2
star
28

srfi-115

SRFI 115 for CL: Scheme Regular Expressions
Common Lisp
2
star
29

let-over-lambda

Common Lisp
2
star
30

spice-flavors

Spice Lisp Flavors
Common Lisp
2
star
31

lispm-inits

Common Lisp
2
star
32

braille-banner

Common Lisp
2
star
33

artificial-flavors

A straightforward partial implementation of Symbolics New Flavors in PCL.
Common Lisp
2
star
34

bcl

Better CL
Common Lisp
2
star
35

lw-rect

rect.el for LispWorks
Common Lisp
2
star
36

TaoWorks

TaoWorks
Common Lisp
2
star
37

mcs

MCS: Meta Class System, a portable object-oriented extension to Common Lisp.
Common Lisp
2
star
38

srfi-13

SRFI 13 for CL: String Libraries
Common Lisp
2
star
39

lw-emacs-keybinds

GNU Emacs keybinds for LispWorks Editor
Common Lisp
2
star
40

cmlisp1

Common Lisp
2
star
41

telos

Common Lisp
2
star
42

ai.lang.lisp.code.ext.tables

The DEFTABLE macro provides a concise, lightweight notation for defining tables: things you can put key/value pairs into, and retrieve the value from the key
Common Lisp
2
star
43

ai.lang.lisp.code.ext.library

Library of miscellaneous small extensions to Common Lisp
Common Lisp
2
star
44

ai.lang.lisp.code.ext.types

Common Lisp
2
star
45

rmscl

RMS Flavored CL
Common Lisp
2
star
46

srfi-9

SRFI 9 for CL: Defining Record Types
Common Lisp
1
star
47

srfi-37

SRFI 37 for CL: args-fold: a program argument processor
Common Lisp
1
star
48

qpj2

Common Lisp
1
star
49

zrdbc

Zillion Random DbC
Common Lisp
1
star
50

copy-and-paste-pane

Copy and Paste Mixin Pane for Lispworks/Cocoa
Common Lisp
1
star
51

srfi-49

SRFI 49 for CL: Indentation-sensitive syntax
Common Lisp
1
star
52

quasiquote1

Yet Another Quasiquote
Common Lisp
1
star
53

gauche-compat.text.tr

Common Lisp
1
star
54

style-checker-1

Common Lisp
1
star
55

srfi-175

SRFI 175 for CL: ASCII character library
NewLisp
1
star
56

srfi-169

SRFI 169 for CL: Underscores in numbers
NewLisp
1
star
57

srfi-197

SRFI 197 for CL: Pipeline Operators
Common Lisp
1
star
58

asdf-readtables

Common Lisp
1
star
59

lambda.output

Common Lisp
1
star
60

srfi-70

SRFI 70 for CL: Numbers
Common Lisp
1
star
61

srfi-18

SRFI 18 for CL: Multithreading support
Common Lisp
1
star
62

series-ext

Seriesの拡張ユーティリティ
Common Lisp
1
star
63

modern-lisp-lol

Common Lisp
1
star
64

ull1

Common Lisp
1
star
65

srfi-69

SRFI 69 for CL: Basic hash tables
Common Lisp
1
star
66

srfi-60

SRFI 60 for CL: Integers as Bits
Common Lisp
1
star
67

srfi-34

SRFI 34 for CL: Exception Handling for Programs
Common Lisp
1
star
68

qpj1

Common Lisp
1
star
69

package-name-shortener

Common Lisp
1
star
70

zl-compat

Common Lisp
1
star
71

relative-package-names

Common Lisp
1
star
72

g000001

押入れ
Common Lisp
1
star
73

srfi-112

SRFI 112 for CL: Environment Inquiry
Common Lisp
1
star
74

srfi-97

SRFI 97 for CL: SRFI Libraries
Common Lisp
1
star
75

srfi-236

SRFI 236 for CL: Evaluating expressions in an unspecified
Common Lisp
1
star
76

srfi-22

SRFI 22 for CL: Running Scheme Scripts on Unix
Common Lisp
1
star
77

srfi-28

SRFI 28 for CL: Basic Format Strings
Common Lisp
1
star
78

srfi-2

SRFI-2 for CL: AND-LET*
Common Lisp
1
star
79

g000001.remove-method

Common Lisp
1
star
80

srfi-118

SRFI 118 for CL: Simple adjustable-size strings
Common Lisp
1
star
81

nil-compat

NIL Compatibility Library
Common Lisp
1
star
82

srfi-173

SRFI 173 for CL: Hooks
Common Lisp
1
star
83

r7rs-compat

R7RS compatibility package for Common Lisp
Common Lisp
1
star
84

srfi-90

SRFI 90 for CL: Extensible hash table constructor
Common Lisp
1
star
85

quickmonkeys

Common Lisp
1
star