Skip to content

Instantly share code, notes, and snippets.

@emaiax
Last active February 26, 2016 17:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save emaiax/7432638f8341804c9097 to your computer and use it in GitHub Desktop.
Save emaiax/7432638f8341804c9097 to your computer and use it in GitHub Desktop.
Code Climate CLI vs Rubocop

Code Climate CLI

.code-climate.yml

engines:
  fixme:
    enabled: true
  rubocop:
    enabled: true
  duplication:
    enabled: true
    config:
      languages:
        - ruby
ratings:
   paths:
   - "lib/**/*"
   - "**.rb"
~/code (master)$ codeclimate version
0.21.0

~/code (master)$ codeclimate analyze -e rubocop
Starting analysis
Running rubocop: Done!

== Gemfile (1 issue) ==
1: Style/FrozenStringLiteralComment: Missing frozen string literal comment. [rubocop]

== Rakefile (1 issue) ==
1: Style/FrozenStringLiteralComment: Missing frozen string literal comment. [rubocop]

== bin/console (1 issue) ==
1: Style/FrozenStringLiteralComment: Missing frozen string literal comment. [rubocop]

== deckbrew-api.gemspec (1 issue) ==
1: Style/FrozenStringLiteralComment: Missing frozen string literal comment. [rubocop]

== lib/deckbrew.rb (2 issues) ==
1: Style/FrozenStringLiteralComment: Missing frozen string literal comment. [rubocop]
3: Style/Documentation: Missing top-level module documentation comment. [rubocop]

== lib/deckbrew/version.rb (2 issues) ==
1: Style/FrozenStringLiteralComment: Missing frozen string literal comment. [rubocop]
2: Style/MutableConstant: Freeze mutable objects assigned to constants. [rubocop]

== spec/deckbrew/deckbrew_spec.rb (1 issue) ==
1: Style/FrozenStringLiteralComment: Missing frozen string literal comment. [rubocop]

== spec/spec_helper.rb (1 issue) ==
1: Style/FrozenStringLiteralComment: Missing frozen string literal comment. [rubocop]

Analysis complete! Found 10 issues.

~/code (master)$ codeclimate analyze
Starting analysis
Running fixme: Done!
Running rubocop: Done!
Running duplication: Done!

== Gemfile (1 issue) ==
1: Style/FrozenStringLiteralComment: Missing frozen string literal comment. [rubocop]

== Rakefile (1 issue) ==
1: Style/FrozenStringLiteralComment: Missing frozen string literal comment. [rubocop]

== bin/console (1 issue) ==
1: Style/FrozenStringLiteralComment: Missing frozen string literal comment. [rubocop]

== deckbrew-api.gemspec (1 issue) ==
1: Style/FrozenStringLiteralComment: Missing frozen string literal comment. [rubocop]

== lib/deckbrew.rb (2 issues) ==
1: Style/FrozenStringLiteralComment: Missing frozen string literal comment. [rubocop]
3: Style/Documentation: Missing top-level module documentation comment. [rubocop]

== lib/deckbrew/version.rb (2 issues) ==
1: Style/FrozenStringLiteralComment: Missing frozen string literal comment. [rubocop]
2: Style/MutableConstant: Freeze mutable objects assigned to constants. [rubocop]

== spec/deckbrew/deckbrew_spec.rb (1 issue) ==
1: Style/FrozenStringLiteralComment: Missing frozen string literal comment. [rubocop]

== spec/spec_helper.rb (1 issue) ==
1: Style/FrozenStringLiteralComment: Missing frozen string literal comment. [rubocop]

Analysis complete! Found 10 issues.

Rubocop

.rubocop.yml

AllCops:
  DisplayCopNames: true
  DisplayStyleGuide: true
  StyleGuideCopsOnly: true
  TargetRubyVersion: 2.3

Style/StringLiterals:
  EnforcedStyle: double_quotes

Metrics/LineLength:
  Max: 120
~/code (master)$ rubocop -v
0.37.2

~/code (master)$ rubocop
Inspecting 8 files
........

8 files inspected, no offenses detected

~/code (master)$ rubocop -c .rubocop.yml
Inspecting 8 files
........

~/code (master)$ rubocop -V
0.37.2 (using Parser 2.3.0.6, running on ruby 2.2.4 x86_64-darwin14)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment