rubocop_todo_corrector 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: e0469c24b40b24ad6fca4beffd146ec75a86e8281fd921583b2d21272a8fe6b5
4
+ data.tar.gz: 71d344067d08cd32030426a584d36d3d86ab7ee68e3286388abee5c1bb94cbcb
5
+ SHA512:
6
+ metadata.gz: 7017b6fbe186c776d52f4e2be3034a6a731b4fee473715bdf452fb4040bf86b4266d7cd228fea91ee5736db11dd86368bf474f52c24f3b0970f952bfab794185
7
+ data.tar.gz: e649442fb1953bc08512196cb597b6c201e47719fa862d0054289b956e3eef739c9467490f6c83e11a27bc88f66d0a1506094ce473483cb62224d2980f2193ad
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,22 @@
1
+ require:
2
+ - rubocop-rake
3
+ - rubocop-rspec
4
+
5
+ AllCops:
6
+ NewCops: enable
7
+ TargetRubyVersion: 3.0
8
+
9
+ Metrics:
10
+ Enabled: false
11
+
12
+ RSpec/ExampleLength:
13
+ Enabled: false
14
+
15
+ RSpec/ImplicitSubject:
16
+ Enabled: false
17
+
18
+ RSpec/NamedSubject:
19
+ Enabled: false
20
+
21
+ Style/Documentation:
22
+ Enabled: false
data/CHANGELOG.md ADDED
@@ -0,0 +1,9 @@
1
+ # Changelog
2
+
3
+ ## Unreleased
4
+
5
+ ## 0.1.0
6
+
7
+ ### Added
8
+
9
+ - Initial release.
@@ -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 r7kamura@gmail.com. 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,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ gemspec
6
+
7
+ gem 'rake'
8
+ gem 'rspec'
9
+ gem 'rubocop'
10
+ gem 'rubocop-rake'
11
+ gem 'rubocop-rspec'
data/Gemfile.lock ADDED
@@ -0,0 +1,68 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ rubocop_todo_corrector (0.1.0)
5
+ bundler
6
+ thor
7
+ yard
8
+
9
+ GEM
10
+ remote: https://rubygems.org/
11
+ specs:
12
+ ast (2.4.2)
13
+ diff-lcs (1.5.0)
14
+ parallel (1.22.1)
15
+ parser (3.1.2.0)
16
+ ast (~> 2.4.1)
17
+ rainbow (3.1.1)
18
+ rake (13.0.6)
19
+ regexp_parser (2.4.0)
20
+ rexml (3.2.5)
21
+ rspec (3.11.0)
22
+ rspec-core (~> 3.11.0)
23
+ rspec-expectations (~> 3.11.0)
24
+ rspec-mocks (~> 3.11.0)
25
+ rspec-core (3.11.0)
26
+ rspec-support (~> 3.11.0)
27
+ rspec-expectations (3.11.0)
28
+ diff-lcs (>= 1.2.0, < 2.0)
29
+ rspec-support (~> 3.11.0)
30
+ rspec-mocks (3.11.1)
31
+ diff-lcs (>= 1.2.0, < 2.0)
32
+ rspec-support (~> 3.11.0)
33
+ rspec-support (3.11.0)
34
+ rubocop (1.29.1)
35
+ parallel (~> 1.10)
36
+ parser (>= 3.1.0.0)
37
+ rainbow (>= 2.2.2, < 4.0)
38
+ regexp_parser (>= 1.8, < 3.0)
39
+ rexml (>= 3.2.5, < 4.0)
40
+ rubocop-ast (>= 1.17.0, < 2.0)
41
+ ruby-progressbar (~> 1.7)
42
+ unicode-display_width (>= 1.4.0, < 3.0)
43
+ rubocop-ast (1.18.0)
44
+ parser (>= 3.1.1.0)
45
+ rubocop-rake (0.6.0)
46
+ rubocop (~> 1.0)
47
+ rubocop-rspec (2.10.0)
48
+ rubocop (~> 1.19)
49
+ ruby-progressbar (1.11.0)
50
+ thor (1.2.1)
51
+ unicode-display_width (2.1.0)
52
+ webrick (1.7.0)
53
+ yard (0.9.27)
54
+ webrick (~> 1.7.0)
55
+
56
+ PLATFORMS
57
+ x86_64-linux
58
+
59
+ DEPENDENCIES
60
+ rake
61
+ rspec
62
+ rubocop
63
+ rubocop-rake
64
+ rubocop-rspec
65
+ rubocop_todo_corrector!
66
+
67
+ BUNDLED WITH
68
+ 2.3.13
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2022 Ryo Nakamura
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,93 @@
1
+ # RubocopTodoCorrector
2
+
3
+ [![test](https://github.com/r7kamura/rubocop_todo_corrector/actions/workflows/test.yml/badge.svg)](https://github.com/r7kamura/rubocop_todo_corrector/actions/workflows/test.yml)
4
+
5
+ Auto-correct offenses defined in .rubocop_todo.yml.
6
+
7
+ ## Installation
8
+
9
+ Install the gem and add to the application's Gemfile by executing:
10
+
11
+ ```
12
+ bundle add rubocop_todo_corrector
13
+ ```
14
+
15
+ If bundler is not being used to manage dependencies, install the gem by executing:
16
+
17
+ ```
18
+ gem install rubocop_todo_corrector
19
+ ```
20
+
21
+ ## Usage
22
+
23
+ ```console
24
+ $ rubocop_todo_corrector
25
+ Commands:
26
+ rubocop_todo_corrector bundle # Run `bundle install` to install RuboCop related gems.
27
+ rubocop_todo_corrector describe --cop-name=COP_NAME # Output Markdown description for specified cop.
28
+ rubocop_todo_corrector generate # Run `rubocop --auto-gen-config` to generate .rubocop_todo.yml.
29
+ rubocop_todo_corrector help [COMMAND] # Describe available commands or one specific command
30
+ rubocop_todo_corrector pick # Pick an auto-correctable Cop from .rubocop_todo.yml.
31
+ rubocop_todo_corrector remove --cop-name=COP_NAME # Remove section with specified cop name from .rubocop_todo.yml.
32
+ ```
33
+
34
+ ### bundle
35
+
36
+ ```console
37
+ $ rubocop_todo_corrector help bundle
38
+ Usage:
39
+ rubocop_todo_corrector bundle
40
+
41
+ Run `bundle install` to install RuboCop related gems.
42
+ ```
43
+
44
+ ### describe
45
+
46
+ ```console
47
+ $ rubocop_todo_corrector help describe
48
+ Usage:
49
+ rubocop_todo_corrector describe --cop-name=COP_NAME
50
+
51
+ Options:
52
+ --cop-name=COP_NAME
53
+
54
+ Output Markdown description for specified cop.
55
+ ```
56
+
57
+ ### generate
58
+
59
+ ```console
60
+ $ rubocop_todo_corrector help generate
61
+ Usage:
62
+ rubocop_todo_corrector generate
63
+
64
+ Run `rubocop --auto-gen-config` to generate .rubocop_todo.yml.
65
+ ```
66
+
67
+ ### pick
68
+
69
+ ```console
70
+ $ rubocop_todo_corrector help pick
71
+ Usage:
72
+ rubocop_todo_corrector pick
73
+
74
+ Options:
75
+ [--mode=MODE]
76
+ # Default: random
77
+ # Possible values: first, last, least_occured, most_occured, random
78
+
79
+ Output an auto-correctable Cop from .rubocop_todo.yml.
80
+ ```
81
+
82
+ ### remove
83
+
84
+ ```console
85
+ $ rubocop_todo_corrector help remove
86
+ Usage:
87
+ rubocop_todo_corrector remove --cop-name=COP_NAME
88
+
89
+ Options:
90
+ --cop-name=COP_NAME
91
+
92
+ Remove section with specified cop name from .rubocop_todo.yml.
93
+ ```
data/Rakefile ADDED
@@ -0,0 +1,12 @@
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]
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ $LOAD_PATH.unshift(File.expand_path('../lib', __dir__))
5
+ require 'rubocop_todo_corrector'
6
+
7
+ RubocopTodoCorrector::Cli.start
@@ -0,0 +1,75 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'pathname'
4
+
5
+ module RubocopTodoCorrector
6
+ class BundleInstaller
7
+ class << self
8
+ # @param [Hash] gem_specifications
9
+ # @param [String] temporary_gemfile_path
10
+ def call(
11
+ gem_specifications:,
12
+ temporary_gemfile_path:
13
+ )
14
+ new(
15
+ gem_specifications: gem_specifications,
16
+ temporary_gemfile_path: temporary_gemfile_path
17
+ ).call
18
+ end
19
+ end
20
+
21
+ def initialize(
22
+ gem_specifications:,
23
+ temporary_gemfile_path:
24
+ )
25
+ @gem_specifications = gem_specifications
26
+ @temporary_gemfile_path = temporary_gemfile_path
27
+ end
28
+
29
+ def call
30
+ make_directory
31
+ write_gemfile
32
+ bundle_install
33
+ end
34
+
35
+ private
36
+
37
+ def bundle_install
38
+ ::Kernel.system(
39
+ { 'BUNDLE_GEMFILE' => @temporary_gemfile_path },
40
+ bundle_install_command
41
+ )
42
+ end
43
+
44
+ # @return [String]
45
+ def bundle_install_command
46
+ 'bundle install'
47
+ end
48
+
49
+ # @return [String]
50
+ def gemfile_content
51
+ [
52
+ "source 'https://rubygems.org'",
53
+ *@gem_specifications.map do |gem_specification|
54
+ format(
55
+ "gem '%<gem_name>s', '%<gem_version>s'",
56
+ gem_specification
57
+ )
58
+ end
59
+ ].join("\n") << "\n"
60
+ end
61
+
62
+ def make_directory
63
+ pathname.parent.mkpath
64
+ end
65
+
66
+ # @return [Pathname]
67
+ def pathname
68
+ @pathname ||= ::Pathname.new(@temporary_gemfile_path)
69
+ end
70
+
71
+ def write_gemfile
72
+ pathname.write(gemfile_content)
73
+ end
74
+ end
75
+ end
@@ -0,0 +1,71 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'thor'
4
+
5
+ module RubocopTodoCorrector
6
+ # Provide CLI sub-commands.
7
+ class Cli < ::Thor
8
+ desc 'bundle', 'Run `bundle install` to install RuboCop related gems.'
9
+ def bundle
10
+ Commands::Bundle.call(
11
+ rubocop_configuration_path: '.rubocop.yml',
12
+ gemfile_lock_path: 'Gemfile.lock',
13
+ temporary_gemfile_path: 'tmp/Gemfile_rubocop_todo_corrector.rb'
14
+ )
15
+ end
16
+
17
+ desc 'describe', 'Output Markdown description for specified cop.'
18
+ option(
19
+ :cop_name,
20
+ type: :string,
21
+ required: true
22
+ )
23
+ def describe
24
+ Commands::Describe.call(
25
+ cop_name: options[:cop_name],
26
+ temporary_gemfile_path: 'tmp/Gemfile_rubocop_todo_corrector.rb'
27
+ )
28
+ end
29
+
30
+ desc 'generate', 'Run `rubocop --auto-gen-config` to generate .rubocop_todo.yml.'
31
+ def generate
32
+ Commands::Generate.call(
33
+ rubocop_todo_path: '.rubocop_todo.yml',
34
+ temporary_gemfile_path: 'tmp/Gemfile_rubocop_todo_corrector.rb'
35
+ )
36
+ end
37
+
38
+ desc 'pick', 'Pick an auto-correctable Cop from .rubocop_todo.yml.'
39
+ option(
40
+ :mode,
41
+ default: 'random',
42
+ enum: %w[
43
+ first
44
+ last
45
+ least_occured
46
+ most_occured
47
+ random
48
+ ],
49
+ type: :string
50
+ )
51
+ def pick
52
+ Commands::Pick.call(
53
+ mode: options[:mode],
54
+ rubocop_todo_path: '.rubocop_todo.yml'
55
+ )
56
+ end
57
+
58
+ desc 'remove', 'Remove section with specified cop name from .rubocop_todo.yml.'
59
+ option(
60
+ :cop_name,
61
+ type: :string,
62
+ required: true
63
+ )
64
+ def remove
65
+ Commands::Remove.call(
66
+ cop_name: options[:cop_name],
67
+ rubocop_todo_path: '.rubocop_todo.yml'
68
+ )
69
+ end
70
+ end
71
+ end
@@ -0,0 +1,64 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RubocopTodoCorrector
4
+ module Commands
5
+ class Bundle
6
+ class << self
7
+ # @param [String] rubocop_configuration_path
8
+ # @param [String] gemfile_lock_path
9
+ # @param [String] temporary_gemfile_path
10
+ def call(
11
+ rubocop_configuration_path:,
12
+ gemfile_lock_path:,
13
+ temporary_gemfile_path:
14
+ )
15
+ new(
16
+ rubocop_configuration_path: rubocop_configuration_path,
17
+ gemfile_lock_path: gemfile_lock_path,
18
+ temporary_gemfile_path: temporary_gemfile_path
19
+ ).call
20
+ end
21
+ end
22
+
23
+ def initialize(
24
+ rubocop_configuration_path:,
25
+ gemfile_lock_path:,
26
+ temporary_gemfile_path:
27
+ )
28
+ @rubocop_configuration_path = rubocop_configuration_path
29
+ @gemfile_lock_path = gemfile_lock_path
30
+ @temporary_gemfile_path = temporary_gemfile_path
31
+ end
32
+
33
+ def call
34
+ BundleInstaller.call(
35
+ gem_specifications: gem_specifications,
36
+ temporary_gemfile_path: @temporary_gemfile_path
37
+ )
38
+ end
39
+
40
+ private
41
+
42
+ # @return [Array<String>]
43
+ def gem_names
44
+ [
45
+ 'rubocop',
46
+ *GemNamesDetector.call(rubocop_configuration_path: @rubocop_configuration_path)
47
+ ]
48
+ end
49
+
50
+ # @return [Array<Hash>]
51
+ def gem_specifications
52
+ gem_names.map do |gem_name|
53
+ {
54
+ gem_name: gem_name,
55
+ gem_version: GemVersionDetector.call(
56
+ gem_name: gem_name,
57
+ gemfile_lock_path: @gemfile_lock_path
58
+ )
59
+ }
60
+ end
61
+ end
62
+ end
63
+ end
64
+ end
@@ -0,0 +1,49 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'yard'
4
+
5
+ module RubocopTodoCorrector
6
+ module Commands
7
+ class Describe
8
+ class << self
9
+ # @param [String] cop_name
10
+ # @param [String] temporary_gemfile_path
11
+ def call(
12
+ cop_name:,
13
+ temporary_gemfile_path:
14
+ )
15
+ new(
16
+ cop_name: cop_name,
17
+ temporary_gemfile_path: temporary_gemfile_path
18
+ ).call
19
+ end
20
+ end
21
+
22
+ def initialize(
23
+ cop_name:,
24
+ temporary_gemfile_path:
25
+ )
26
+ @cop_name = cop_name
27
+ @temporary_gemfile_path = temporary_gemfile_path
28
+ end
29
+
30
+ def call
31
+ cop_source_path = CopSourceDetector.call(
32
+ cop_name: @cop_name,
33
+ temporary_gemfile_path: @temporary_gemfile_path
34
+ )
35
+ return unless cop_source_path
36
+
37
+ cop_document = CopDocumentParser.call(source_path: cop_source_path)
38
+ return unless cop_document
39
+
40
+ description = DescriptionRenderer.call(
41
+ cop_document: cop_document,
42
+ cop_name: @cop_name,
43
+ cop_source_path: cop_source_path
44
+ )
45
+ ::Kernel.puts(description)
46
+ end
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,62 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'pathname'
4
+
5
+ module RubocopTodoCorrector
6
+ module Commands
7
+ class Generate
8
+ class << self
9
+ # @param [String] rubocop_todo_path
10
+ # @param [String] temporary_gemfile_path
11
+ def call(
12
+ rubocop_todo_path:,
13
+ temporary_gemfile_path:
14
+ )
15
+ new(
16
+ rubocop_todo_path: rubocop_todo_path,
17
+ temporary_gemfile_path: temporary_gemfile_path
18
+ ).call
19
+ end
20
+ end
21
+
22
+ def initialize(
23
+ rubocop_todo_path:,
24
+ temporary_gemfile_path:
25
+ )
26
+ @rubocop_todo_path = rubocop_todo_path
27
+ @temporary_gemfile_path = temporary_gemfile_path
28
+ end
29
+
30
+ def call
31
+ ::Kernel.system(
32
+ { 'BUNDLE_GEMFILE' => @temporary_gemfile_path },
33
+ "bundle exec #{rubocop_command}"
34
+ )
35
+ end
36
+
37
+ private
38
+
39
+ # @return [String]
40
+ def rubocop_command
41
+ rubocop_command_from_todo || 'rubocop --auto-gen-config'
42
+ end
43
+
44
+ # @return [String, nil]
45
+ def rubocop_command_from_todo
46
+ return unless rubocop_todo_pathname.exist?
47
+
48
+ RubocopTodoParser.call(content: rubocop_todo_content)[:previous_rubocop_command]
49
+ end
50
+
51
+ # @return [String]
52
+ def rubocop_todo_content
53
+ rubocop_todo_pathname.read
54
+ end
55
+
56
+ # @return [Pathname]
57
+ def rubocop_todo_pathname
58
+ @rubocop_todo_pathname ||= ::Pathname.new(@rubocop_todo_path)
59
+ end
60
+ end
61
+ end
62
+ end