-
Notifications
You must be signed in to change notification settings - Fork 4
standard-1-37-0 #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
c39b454
65e2693
9fccafb
31117db
90fbd13
35db219
05d66bf
bf30535
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,10 +2,10 @@ source "https://rubygems.org" | |
|
||
gem "activesupport", require: false | ||
gem "mry", "~> 0.52.0", require: false | ||
gem "parser", "~> 3.0.2" | ||
gem "parser", "~> 3.3.0" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. required in order to satisfy gem dependencies |
||
gem "pry", require: false | ||
gem "safe_yaml" | ||
gem "standard", "~> 1.4", require: false | ||
gem "standard", "1.37.0", require: false | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hardlocked without twiddle wakka to emphasize this is the last version before ruby 3 is a minimum requirement for |
||
|
||
group :test do | ||
gem "rake" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,12 @@ You can find some basic setup instructions and links to the Standard OSS project | |
### Installation | ||
|
||
1. If you haven't already, [install the Code Climate CLI](https://github.com/codeclimate/codeclimate). | ||
2. Add the engine and enable it in your `.codeclimate.yml` file. | ||
2. Enable the engine by adding the following under `plugins` in your `.codeclimate.yaml`: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. adjusting README to mimic the rubocop engine instructions (which this repo was apparently made from since it has some of the original commits in it). Modified slightly to use This also sets it up nicely for when the next standard channel (> 1.37.0) is released which will require a minimum ruby version of >= 3. I suspect given the default implementation is to either not set the channel explicitly in the .codeclimate.yml file or set it to "latest", we may (at that time in the future) see some regression when we move to that next version. The reason I think having this setup in the README helps is we can add a |
||
```yaml | ||
plugins: | ||
standard: | ||
enabled: true | ||
``` | ||
3. You're ready to analyze! Browse into your project's folder and run `codeclimate analyze`. | ||
|
||
### Need help? | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
A Gem's requirements should be listed only once in a Gemfile. | ||
|
||
### Example: | ||
# bad | ||
gem 'rubocop' | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
A Gem group, or a set of groups, should be listed only once in a Gemfile. | ||
|
||
For example, if the values of `source`, `git`, `platforms`, or `path` | ||
surrounding `group` are different, no offense will be registered: | ||
|
||
[source,ruby] | ||
----- | ||
platforms :ruby do | ||
group :default do | ||
gem 'openssl' | ||
end | ||
end | ||
|
||
platforms :jruby do | ||
group :default do | ||
gem 'jruby-openssl' | ||
end | ||
end | ||
----- | ||
|
||
### Example: | ||
# bad | ||
group :development do | ||
gem 'rubocop' | ||
end | ||
|
||
group :development do | ||
gem 'rubocop-rails' | ||
end | ||
|
||
# bad (same set of groups declared twice) | ||
group :development, :test do | ||
gem 'rubocop' | ||
end | ||
|
||
group :test, :development do | ||
gem 'rspec' | ||
end | ||
|
||
# good | ||
group :development do | ||
gem 'rubocop' | ||
end | ||
|
||
group :development, :test do | ||
gem 'rspec' | ||
end | ||
|
||
# good | ||
gem 'rubocop', groups: [:development, :test] | ||
gem 'rspec', groups: [:development, :test] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
Verifies that a project contains Gemfile or gems.rb file and correct | ||
associated lock file based on the configuration. | ||
|
||
### Example: EnforcedStyle: Gemfile (default) | ||
# bad | ||
Project contains gems.rb and gems.locked files | ||
|
||
# bad | ||
Project contains Gemfile and gems.locked file | ||
|
||
# good | ||
Project contains Gemfile and Gemfile.lock | ||
|
||
### Example: EnforcedStyle: gems.rb | ||
# bad | ||
Project contains Gemfile and Gemfile.lock files | ||
|
||
# bad | ||
Project contains gems.rb and Gemfile.lock file | ||
|
||
# good | ||
Project contains gems.rb and gems.locked files |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
Enforce that gem dependency version specifications or a commit reference (branch, | ||
ref, or tag) are either required or forbidden. | ||
|
||
### Example: EnforcedStyle: required (default) | ||
|
||
# bad | ||
Gem::Specification.new do |spec| | ||
spec.add_dependency 'parser' | ||
end | ||
|
||
# bad | ||
Gem::Specification.new do |spec| | ||
spec.add_development_dependency 'parser' | ||
end | ||
|
||
# good | ||
Gem::Specification.new do |spec| | ||
spec.add_dependency 'parser', '>= 2.3.3.1', '< 3.0' | ||
end | ||
|
||
# good | ||
Gem::Specification.new do |spec| | ||
spec.add_development_dependency 'parser', '>= 2.3.3.1', '< 3.0' | ||
end | ||
|
||
### Example: EnforcedStyle: forbidden | ||
|
||
# bad | ||
Gem::Specification.new do |spec| | ||
spec.add_dependency 'parser', '>= 2.3.3.1', '< 3.0' | ||
end | ||
|
||
# bad | ||
Gem::Specification.new do |spec| | ||
spec.add_development_dependency 'parser', '>= 2.3.3.1', '< 3.0' | ||
end | ||
|
||
# good | ||
Gem::Specification.new do |spec| | ||
spec.add_dependency 'parser' | ||
end | ||
|
||
# good | ||
Gem::Specification.new do |spec| | ||
spec.add_development_dependency 'parser' | ||
end |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
Checks that deprecated attributes are not set in a gemspec file. | ||
Removing deprecated attributes allows the user to receive smaller packed gems. | ||
|
||
### Example: | ||
|
||
# bad | ||
Gem::Specification.new do |spec| | ||
spec.name = 'your_cool_gem_name' | ||
spec.test_files = Dir.glob('test/**/*') | ||
end | ||
|
||
# bad | ||
Gem::Specification.new do |spec| | ||
spec.name = 'your_cool_gem_name' | ||
spec.test_files += Dir.glob('test/**/*') | ||
end | ||
|
||
# good | ||
Gem::Specification.new do |spec| | ||
spec.name = 'your_cool_gem_name' | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixes issue running
make image