public
Description: Lint for Ruby. Moved to http://wiki.github.com/kevinclark/nitpick/
Homepage: http://github.com/kevinclark/dust/wikis
Clone URL: git://github.com/kevinclark/dust.git
Click here to lend your support to: dust and make a donation at www.pledgie.com !
dust / README
100644 67 lines (57 sloc) 2.203 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
******************************************************************************
*** This software is now called 'nitpick' and is located at:
***
*** http://github.com/kevinclark/nitpick/tree/master
***
*** This was done to avoid clashing with another ruby project called dust
***
*** - Kevin Clark 3/18/09
******************************************************************************
 
Ruby lint. Sorta.
 
http://github.com/kevinclark/dust/wikis
 
 
Clio:dust kev$ ./bin/dust spec/fixtures/block_badness.rb \
> spec/fixtures/branch_badness.rb \
> spec/fixtures/method_badness.rb \
> spec/fixtures/rescue_badness.rb \
> spec/fixtures/local_variable_badness.rb
./spec/fixtures/branch_badness.rb:20: warning: found = in conditional, should be ==
Fixtures::BlockBadness
  no_conditional_for_block_given
    - A block is being yielded to without a check for block_given?
  simple_conditional_without_check
    - A block is being yielded to without a check for block_given?
 
Fixtures::BranchBadness
  branch_returning_identical_things
    - The branches of 'if (true)' are identical.
  branch_returning_true_or_false
    - No need for an if. Just return '(1 == 2)' as a boolean.
  branch_with_assignment_as_condition
    - An assigment is being used as a condition: (a = 1)
    - The variable :a is unused.
 
Fixtures::LocalVariableBadness
  anonymous_args
    - The method :anonymous_args is empty.
  block_arg_unused
    - The argument :block is unused.
  lvar_shadowed
    - One or more variables are being shadowed (x)
  lvar_shadowed_many_block_vars
    - One or more variables are being shadowed (x)
  rescue_to_variable
    - The variable :e is unused.
  simple_unused_arg
    - The argument :other is unused.
  unused_arg
    - The argument :arg is unused.
  unused_lasgn
    - The variable :bar is unused.
 
Fixtures::MethodBadness
  empty_method
    - The method :empty_method is empty.
 
Fixtures::RescueBadness
  rescue_exception
    - A rescue is capturing Object or Exception, which may hide errors.
  rescue_nil
    - A rescue is returning "nil" directly and may not handle an error.
  rescue_object
    - A rescue is capturing Object or Exception, which may hide errors.