rubocop 0.0.0 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of rubocop might be problematic. Click here for more details.

Files changed (39) hide show
  1. data/Gemfile +1 -0
  2. data/Gemfile.lock +2 -0
  3. data/VERSION +1 -1
  4. data/bin/rubocop +10 -2
  5. data/lib/rubocop.rb +16 -1
  6. data/lib/rubocop/cli.rb +48 -13
  7. data/lib/rubocop/cop/cop.rb +60 -3
  8. data/lib/rubocop/cop/empty_lines.rb +25 -0
  9. data/lib/rubocop/cop/encoding.rb +17 -0
  10. data/lib/rubocop/cop/grammar.rb +74 -0
  11. data/lib/rubocop/cop/indentation.rb +55 -0
  12. data/lib/rubocop/cop/line_length.rb +19 -0
  13. data/lib/rubocop/cop/offence.rb +12 -4
  14. data/lib/rubocop/cop/space_after_comma_etc.rb +24 -0
  15. data/lib/rubocop/cop/surrounding_space.rb +44 -0
  16. data/lib/rubocop/cop/tab.rb +17 -0
  17. data/lib/rubocop/cop/trailing_whitespace.rb +17 -0
  18. data/lib/rubocop/report/emacs_style.rb +15 -0
  19. data/lib/rubocop/report/plain_text.rb +18 -0
  20. data/lib/rubocop/report/report.rb +41 -0
  21. data/lib/rubocop/version.rb +2 -0
  22. data/rubocop.gemspec +103 -0
  23. data/spec/rubocop/cli_spec.rb +61 -0
  24. data/spec/rubocop/cops/cop_spec.rb +29 -0
  25. data/spec/rubocop/cops/empty_lines_spec.rb +82 -0
  26. data/spec/rubocop/cops/grammar_spec.rb +24 -0
  27. data/spec/rubocop/cops/indentation_spec.rb +60 -0
  28. data/spec/rubocop/cops/line_length_spec.rb +20 -0
  29. data/spec/rubocop/cops/offence_spec.rb +22 -0
  30. data/spec/rubocop/cops/space_after_comma_etc_spec.rb +37 -0
  31. data/spec/rubocop/cops/surrounding_space_spec.rb +128 -0
  32. data/spec/rubocop/cops/tab_spec.rb +19 -0
  33. data/spec/rubocop/cops/trailing_whitespace_spec.rb +25 -0
  34. data/spec/rubocop/reports/emacs_style_spec.rb +23 -0
  35. data/spec/rubocop/reports/report_spec.rb +27 -0
  36. data/spec/spec_helper.rb +25 -1
  37. metadata +88 -18
  38. data/lib/rubocop/cop/line_length_cop.rb +0 -11
  39. data/spec/rubocop_spec.rb +0 -7
@@ -1,11 +0,0 @@
1
- module Rubocop
2
- module Cop
3
- class LineLengthCop < Cop
4
- def inspect(file)
5
- File.readlines(file).each_with_index do |line, index|
6
- add_offence(file, index, line, "Line too long") if line.size > 80
7
- end
8
- end
9
- end
10
- end
11
- end
@@ -1,7 +0,0 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
-
3
- describe "Rubocop" do
4
- it "fails" do
5
- fail "hey buddy, you should probably rename this file and start specing for real"
6
- end
7
- end