rubocop-katalyst 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 270d41d4245c584ce921f76ff815b3516353f11f70deb92c67af2c22a3aa71a2
4
+ data.tar.gz: bdcd5d7dbfc6477eaf15caed118f8acc3085bb2cd7ac708d80ba0fd6129e9c2c
5
+ SHA512:
6
+ metadata.gz: a37d83245eb289e927f65764118532157d7ef50699022e173c30fc87e86eb10f1c11064d091a4553abe9fb67e4d5f8793cc6e567c65d7f48d0a01e948f8720f5
7
+ data.tar.gz: b08c2b3128c5590f0ad1924329994debddc69d3fd368d0e7f3a7f4840b2fa84c00c156b5cef6d2f5bdc88523501f91624dfce79656e8cb09370584a24db15b32
@@ -0,0 +1,13 @@
1
+ version: 2.1
2
+ jobs:
3
+ build:
4
+ docker:
5
+ - image: ruby:2.7.2
6
+ steps:
7
+ - checkout
8
+ - run:
9
+ name: Run the default task
10
+ command: |
11
+ gem install bundler -v 2.2.15
12
+ bundle install
13
+ bundle exec rake
data/.gitignore ADDED
@@ -0,0 +1,11 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+
10
+ # rspec failure tracking
11
+ .rspec_status
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,13 @@
1
+ inherit_from:
2
+ - config/default.yml
3
+
4
+ Metrics/BlockLength:
5
+ Exclude:
6
+ - rubocop-katalyst.gemspec
7
+
8
+ Rails:
9
+ Enabled: false
10
+
11
+ Rails/RakeEnvironment:
12
+ Exclude:
13
+ - Rakefile
data/CHANGELOG.md ADDED
@@ -0,0 +1,6 @@
1
+ ## [0.1.0] - 2021-10-20
2
+
3
+ - Initial release
4
+ - Disable new cops by default
5
+ - Enforce styles within the project
6
+
@@ -0,0 +1,84 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
+
9
+ ## Our Standards
10
+
11
+ Examples of behavior that contributes to a positive environment for our community include:
12
+
13
+ * Demonstrating empathy and kindness toward other people
14
+ * Being respectful of differing opinions, viewpoints, and experiences
15
+ * Giving and gracefully accepting constructive feedback
16
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
+ * Focusing on what is best not just for us as individuals, but for the overall community
18
+
19
+ Examples of unacceptable behavior include:
20
+
21
+ * The use of sexualized language or imagery, and sexual attention or
22
+ advances of any kind
23
+ * Trolling, insulting or derogatory comments, and personal or political attacks
24
+ * Public or private harassment
25
+ * Publishing others' private information, such as a physical or email
26
+ address, without their explicit permission
27
+ * Other conduct which could reasonably be considered inappropriate in a
28
+ professional setting
29
+
30
+ ## Enforcement Responsibilities
31
+
32
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
+
34
+ Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35
+
36
+ ## Scope
37
+
38
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
+
40
+ ## Enforcement
41
+
42
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at matt.redmond@katalyst.com.au. All complaints will be reviewed and investigated promptly and fairly.
43
+
44
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
+
46
+ ## Enforcement Guidelines
47
+
48
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
+
50
+ ### 1. Correction
51
+
52
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
+
54
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
+
56
+ ### 2. Warning
57
+
58
+ **Community Impact**: A violation through a single incident or series of actions.
59
+
60
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
+
62
+ ### 3. Temporary Ban
63
+
64
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
+
66
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
+
68
+ ### 4. Permanent Ban
69
+
70
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
+
72
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
73
+
74
+ ## Attribution
75
+
76
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
+ available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
+
79
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
+
81
+ [homepage]: https://www.contributor-covenant.org
82
+
83
+ For answers to common questions about this code of conduct, see the FAQ at
84
+ https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
data/Gemfile ADDED
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in rubocop-katalyst.gemspec
6
+ gemspec
7
+
8
+ gem "rubocop", "~> 1.7"
9
+ gem "rubocop-performance", "~> 1.11"
10
+ gem "rubocop-rails", "~> 2.12"
11
+ gem "rubocop-rake", "~> 0.6.0"
12
+ gem "rubocop-rspec", "~> 2.5"
13
+
14
+ group :development, :test do
15
+ gem "rake", "~> 13.0"
16
+ gem "rspec", "~> 3.0"
17
+ end
data/Gemfile.lock ADDED
@@ -0,0 +1,89 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ rubocop-katalyst (0.1.8)
5
+ rubocop
6
+ rubocop-performance
7
+ rubocop-rails
8
+ rubocop-rake
9
+ rubocop-rspec
10
+
11
+ GEM
12
+ remote: https://rubygems.org/
13
+ specs:
14
+ activesupport (6.1.4.1)
15
+ concurrent-ruby (~> 1.0, >= 1.0.2)
16
+ i18n (>= 1.6, < 2)
17
+ minitest (>= 5.1)
18
+ tzinfo (~> 2.0)
19
+ zeitwerk (~> 2.3)
20
+ ast (2.4.2)
21
+ concurrent-ruby (1.1.9)
22
+ diff-lcs (1.4.4)
23
+ i18n (1.8.10)
24
+ concurrent-ruby (~> 1.0)
25
+ minitest (5.14.4)
26
+ parallel (1.21.0)
27
+ parser (3.0.2.0)
28
+ ast (~> 2.4.1)
29
+ rack (2.2.3)
30
+ rainbow (3.0.0)
31
+ rake (13.0.6)
32
+ regexp_parser (2.1.1)
33
+ rexml (3.2.5)
34
+ rspec (3.10.0)
35
+ rspec-core (~> 3.10.0)
36
+ rspec-expectations (~> 3.10.0)
37
+ rspec-mocks (~> 3.10.0)
38
+ rspec-core (3.10.1)
39
+ rspec-support (~> 3.10.0)
40
+ rspec-expectations (3.10.1)
41
+ diff-lcs (>= 1.2.0, < 2.0)
42
+ rspec-support (~> 3.10.0)
43
+ rspec-mocks (3.10.2)
44
+ diff-lcs (>= 1.2.0, < 2.0)
45
+ rspec-support (~> 3.10.0)
46
+ rspec-support (3.10.2)
47
+ rubocop (1.21.0)
48
+ parallel (~> 1.10)
49
+ parser (>= 3.0.0.0)
50
+ rainbow (>= 2.2.2, < 4.0)
51
+ regexp_parser (>= 1.8, < 3.0)
52
+ rexml
53
+ rubocop-ast (>= 1.9.1, < 2.0)
54
+ ruby-progressbar (~> 1.7)
55
+ unicode-display_width (>= 1.4.0, < 3.0)
56
+ rubocop-ast (1.11.0)
57
+ parser (>= 3.0.1.1)
58
+ rubocop-performance (1.11.5)
59
+ rubocop (>= 1.7.0, < 2.0)
60
+ rubocop-ast (>= 0.4.0)
61
+ rubocop-rails (2.12.3)
62
+ activesupport (>= 4.2.0)
63
+ rack (>= 1.1)
64
+ rubocop (>= 1.7.0, < 2.0)
65
+ rubocop-rake (0.6.0)
66
+ rubocop (~> 1.0)
67
+ rubocop-rspec (2.5.0)
68
+ rubocop (~> 1.19)
69
+ ruby-progressbar (1.11.0)
70
+ tzinfo (2.0.4)
71
+ concurrent-ruby (~> 1.0)
72
+ unicode-display_width (2.0.0)
73
+ zeitwerk (2.4.2)
74
+
75
+ PLATFORMS
76
+ arm64-darwin-20
77
+
78
+ DEPENDENCIES
79
+ rake (~> 13.0)
80
+ rspec (~> 3.0)
81
+ rubocop (~> 1.7)
82
+ rubocop-katalyst!
83
+ rubocop-performance (~> 1.11)
84
+ rubocop-rails (~> 2.12)
85
+ rubocop-rake (~> 0.6.0)
86
+ rubocop-rspec (~> 2.5)
87
+
88
+ BUNDLED WITH
89
+ 2.2.17
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2021 Matt Redmond
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,58 @@
1
+ # Rubocop::Katalyst
2
+
3
+ [Katalyst's](https://katalyst.com.au) style guide for Ruby and Rails, in gem form. Katalyst does not at present have any custom cops; this is simply a repository for our configuration of the standard cops with Rails, Rake, Performance and RSpec extensions.
4
+
5
+ Cops are broken down by department; a file corresponding to each department can be found in the `config` directory, as well as the `default.yml` file which contains any global configuration and loads the cops. The `.rubocop.yml` file contains the configuration for this particular project as a guide for use in non-Rails environments.
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'rubocop-katalyst', require: false
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle install
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install rubocop-katalyst
22
+
23
+ ## Usage
24
+
25
+ Add the following to your `.rubocop.yml` file:
26
+
27
+ ```yml
28
+ require:
29
+ - rubocop-katalyst
30
+ ```
31
+
32
+ That's it. You're all set to use Katalyst's base code styles. Override what you need in your `.rubocop.yml` file as the project demands.
33
+
34
+ The gem is designed for use with Rails, so if you're using this in a non-Rails environment, you can disable the Rails cops in your configuration file with:
35
+
36
+ ```yml
37
+ Rails:
38
+ Enabled: false
39
+ ```
40
+
41
+
42
+ ## Development
43
+
44
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
45
+
46
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
47
+
48
+ ## Contributing
49
+
50
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/rubocop-katalyst. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/katalyst/rubocop-katalyst/blob/main/CODE_OF_CONDUCT.md).
51
+
52
+ ## License
53
+
54
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
55
+
56
+ ## Code of Conduct
57
+
58
+ Everyone interacting in the Rubocop::Katalyst project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/katalyst/rubocop-katalyst/blob/main/CODE_OF_CONDUCT.md).
data/Rakefile ADDED
@@ -0,0 +1,38 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rspec/core/rake_task"
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ require "rubocop/rake_task"
9
+
10
+ RuboCop::RakeTask.new
11
+
12
+ task default: %i[spec rubocop]
13
+
14
+ RSpec::Core::RakeTask.new(:spec) do |spec|
15
+ spec.pattern = FileList["spec/**/*_spec.rb"]
16
+ end
17
+
18
+ desc "Generate a new cop with a template"
19
+ task :new_cop, [:cop] do |_task, args|
20
+ require "rubocop"
21
+
22
+ cop_name = args.fetch(:cop) do
23
+ warn "usage: bundle exec rake new_cop[Department/Name]"
24
+ exit!
25
+ end
26
+
27
+ github_user = `git config github.user`.chop
28
+ github_user = "your_id" if github_user.empty?
29
+
30
+ generator = RuboCop::Cop::Generator.new(cop_name, github_user)
31
+
32
+ generator.write_source
33
+ generator.write_spec
34
+ generator.inject_require(root_file_path: "lib/rubocop/cop/katalyst_cops.rb")
35
+ generator.inject_config(config_file_path: "config/default.yml")
36
+
37
+ puts generator.todo
38
+ end
data/bin/console ADDED
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require "bundler/setup"
5
+ require "rubocop/katalyst"
6
+
7
+ # You can add fixtures and/or initialization code here to make experimenting
8
+ # with your gem easier. You can also use a different console, if you like.
9
+
10
+ # (If you use this, don't forget to add pry to your Gemfile!)
11
+ # require "pry"
12
+ # Pry.start
13
+
14
+ require "irb"
15
+ IRB.start(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,44 @@
1
+ # Configuration for all cops and global extension configuration
2
+ require:
3
+ - rubocop-performance
4
+ - rubocop-rails
5
+ - rubocop-rake
6
+ - rubocop-rspec
7
+
8
+ inherit_mode:
9
+ merge:
10
+ - Exclude
11
+
12
+ inherit_from:
13
+ - "./rubocop-bundler.yml"
14
+ - "./rubocop-gemspec.yml"
15
+ - "./rubocop-layout.yml"
16
+ - "./rubocop-lint.yml"
17
+ - "./rubocop-metrics.yml"
18
+ - "./rubocop-naming.yml"
19
+ - "./rubocop-performance.yml"
20
+ - "./rubocop-rails.yml"
21
+ - "./rubocop-rspec.yml"
22
+ - "./rubocop-security.yml"
23
+ - "./rubocop-style.yml"
24
+
25
+ AllCops:
26
+ Exclude:
27
+ - ".git/**/*"
28
+ - "node_modules/**/*"
29
+ - Dockerfile
30
+ - docker-compose.yml
31
+ NewCops: disable # review new cops for styleguide before including
32
+ TargetRubyVersion: 2.7
33
+
34
+ Performance:
35
+ Enabled: true
36
+
37
+ Rails:
38
+ Enabled: true
39
+
40
+ Rake:
41
+ Enabled: true
42
+
43
+ RSpec:
44
+ Enabled: true
@@ -0,0 +1,2 @@
1
+ # Bundler configuration overrides
2
+ # https://docs.rubocop.org/rubocop/1.5/cops_bundler.html
@@ -0,0 +1,2 @@
1
+ # Gemspec configuration overrides
2
+ # https://docs.rubocop.org/rubocop/1.5/cops_gemspec.html
@@ -0,0 +1,51 @@
1
+ # Layout configuration overrides
2
+ # https://docs.rubocop.org/rubocop/1.5/cops_layout.html
3
+
4
+ Layout/ConditionPosition:
5
+ Description: >-
6
+ Checks for condition placed in a confusing position relative to
7
+ the keyword.
8
+ StyleGuide: 'https://github.com/rubocop/ruby-style-guide#same-line-condition'
9
+ Enabled: false
10
+
11
+ Layout/DotPosition:
12
+ Description: 'Checks the position of the dot in multi-line method calls.'
13
+ EnforcedStyle: leading
14
+
15
+ Layout/EmptyLineAfterMagicComment:
16
+ Enabled: true
17
+
18
+ Layout/ExtraSpacing:
19
+ Description: 'Do not use unnecessary spacing.'
20
+ Enabled: true
21
+
22
+ Layout/InitialIndentation:
23
+ Description: >-
24
+ Checks the indentation of the first non-blank non-comment line in a file.
25
+ Enabled: false
26
+
27
+ Layout/LineLength:
28
+ Max: 120
29
+
30
+ Layout/MultilineMethodCallIndentation:
31
+ Description: >-
32
+ Checks indentation of method calls with the dot operator
33
+ that span more than one line.
34
+ Enabled: true
35
+ EnforcedStyle: indented_relative_to_receiver
36
+
37
+ Layout/MultilineOperationIndentation:
38
+ Description: >-
39
+ Checks indentation of binary operations that span more than
40
+ one line.
41
+ Enabled: true
42
+ EnforcedStyle: indented
43
+
44
+ Layout/ParameterAlignment:
45
+ Description: 'Here we check if the parameters on a multi-line method call or definition are aligned.'
46
+ StyleGuide: 'https://github.com/rubocop/ruby-style-guide#no-double-indent'
47
+ Enabled: false
48
+
49
+ Layout/HashAlignment:
50
+ EnforcedHashRocketStyle: table
51
+ EnforcedColonStyle: table
@@ -0,0 +1,106 @@
1
+ # Lint configuration overrides
2
+ # https://docs.rubocop.org/rubocop/1.5/cops_lint.html
3
+
4
+ Lint/AmbiguousOperator:
5
+ Description: >-
6
+ Checks for ambiguous operators in the first argument of a
7
+ method invocation without parentheses.
8
+ StyleGuide: 'https://github.com/rubocop/ruby-style-guide#parens-as-args'
9
+ Enabled: false
10
+
11
+ Lint/AmbiguousRegexpLiteral:
12
+ Description: >-
13
+ Checks for ambiguous regexp literals in the first argument of
14
+ a method invocation without parenthesis.
15
+ Enabled: false
16
+
17
+ Lint/AssignmentInCondition:
18
+ Description: "Don't use assignment in conditions."
19
+ StyleGuide: 'https://github.com/rubocop/ruby-style-guide#safe-assignment-in-condition'
20
+ Enabled: false
21
+
22
+ Lint/CircularArgumentReference:
23
+ Description: "Don't refer to the keyword argument in the default value."
24
+ Enabled: false
25
+
26
+ Lint/DeprecatedClassMethods:
27
+ Description: 'Check for deprecated class method calls.'
28
+ Enabled: false
29
+
30
+ Lint/DuplicateHashKey:
31
+ Description: 'Check for duplicate keys in hash literals.'
32
+ Enabled: false
33
+
34
+ Lint/EachWithObjectArgument:
35
+ Description: 'Check for immutable argument given to each_with_object.'
36
+ Enabled: false
37
+
38
+ Lint/ElseLayout:
39
+ Description: 'Check for odd code arrangement in an else block.'
40
+ Enabled: false
41
+
42
+ Lint/FlipFlop:
43
+ Description: 'Checks for flip flops'
44
+ StyleGuide: 'https://github.com/rubocop/ruby-style-guide#no-flip-flops'
45
+ Enabled: false
46
+
47
+ Lint/FormatParameterMismatch:
48
+ Description: 'The number of parameters to format/sprint must match the fields.'
49
+ Enabled: false
50
+
51
+ Lint/SuppressedException:
52
+ Description: "Don't suppress exception."
53
+ StyleGuide: 'https://github.com/rubocop/ruby-style-guide#dont-hide-exceptions'
54
+ Enabled: false
55
+
56
+ Lint/LiteralAsCondition:
57
+ Description: 'Checks of literals used in conditions.'
58
+ Enabled: false
59
+
60
+ Lint/LiteralInInterpolation:
61
+ Description: 'Checks for literals used in interpolation.'
62
+ Enabled: false
63
+
64
+ Lint/Loop:
65
+ Description: >-
66
+ Use Kernel#loop with break rather than begin/end/until or
67
+ begin/end/while for post-loop tests.
68
+ StyleGuide: 'https://github.com/rubocop/ruby-style-guide#loop-with-break'
69
+ Enabled: false
70
+
71
+ Lint/NestedMethodDefinition:
72
+ Description: 'Do not use nested method definitions.'
73
+ StyleGuide: 'https://github.com/rubocop/ruby-style-guide#no-nested-methods'
74
+ Enabled: false
75
+
76
+ Lint/NonLocalExitFromIterator:
77
+ Description: 'Do not use return in iterator to cause non-local exit.'
78
+ Enabled: false
79
+
80
+ Lint/ParenthesesAsGroupedExpression:
81
+ Description: >-
82
+ Checks for method calls with a space before the opening
83
+ parenthesis.
84
+ StyleGuide: 'https://github.com/rubocop/ruby-style-guide#parens-no-spaces'
85
+ Enabled: false
86
+
87
+ Lint/RequireParentheses:
88
+ Description: >-
89
+ Use parentheses in the method call to avoid confusion
90
+ about precedence.
91
+ Enabled: false
92
+
93
+ Lint/UnderscorePrefixedVariableName:
94
+ Description: 'Do not use prefix `_` for a variable that is used.'
95
+ Enabled: false
96
+
97
+ Lint/RedundantCopDisableDirective:
98
+ Description: >-
99
+ Checks for rubocop:disable comments that can be removed.
100
+ Note: this cop is not disabled when disabling all cops.
101
+ It must be explicitly disabled.
102
+ Enabled: false
103
+
104
+ Lint/Void:
105
+ Description: 'Possible use of operator/literal/variable in void context.'
106
+ Enabled: false
@@ -0,0 +1,45 @@
1
+ # Metrics configuration overrides
2
+ # https://docs.rubocop.org/rubocop/1.5/cops_metrics.html
3
+
4
+ Metrics/BlockNesting:
5
+ Description: 'Avoid excessive block nesting'
6
+ StyleGuide: 'https://github.com/rubocop/ruby-style-guide#three-is-the-number-thou-shalt-count'
7
+ Enabled: false
8
+
9
+ Metrics/ClassLength:
10
+ Description: 'Avoid classes longer than 100 lines of code.'
11
+ Enabled: false
12
+
13
+ Metrics/ModuleLength:
14
+ Description: 'Avoid modules longer than 100 lines of code.'
15
+ Enabled: false
16
+
17
+ Metrics/AbcSize:
18
+ Description: >-
19
+ A calculated magnitude based on number of assignments,
20
+ branches, and conditions.
21
+ Enabled: false
22
+
23
+ Metrics/BlockLength:
24
+ CountComments: true # count full line comments?
25
+ Max: 25
26
+ IgnoredMethods: []
27
+ Exclude:
28
+ - "config/environments/*" # rails environment configuration
29
+ - "spec/**/*"
30
+
31
+ Metrics/CyclomaticComplexity:
32
+ Description: >-
33
+ A complexity metric that is strongly correlated to the number
34
+ of test cases needed to validate a method.
35
+ Enabled: false
36
+
37
+ Metrics/MethodLength:
38
+ Description: 'Avoid methods longer than 10 lines of code.'
39
+ StyleGuide: 'https://github.com/rubocop/ruby-style-guide#short-methods'
40
+ Enabled: false
41
+
42
+ Metrics/ParameterLists:
43
+ Description: 'Avoid parameter lists longer than three or four parameters.'
44
+ StyleGuide: 'https://github.com/rubocop/ruby-style-guide#too-many-params'
45
+ Enabled: false