rubocop-eightyfourcodes 0.0.1 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rspec +3 -0
- data/.rubocop.yml +9 -0
- data/CHANGELOG.md +9 -0
- data/Gemfile +9 -3
- data/Gemfile.lock +68 -0
- data/LICENSE.md +7 -5
- data/README.md +13 -61
- data/Rakefile +32 -0
- data/config/default.yml +11 -6
- data/lib/rubocop/cop/{eightyfourcodes → eighty_four_codes}/command_literal_injection.rb +4 -2
- data/lib/rubocop/cop/eighty_four_codes/ensure_redirect.rb +48 -0
- data/lib/rubocop/cop/eighty_four_codes/ruby_version_file.rb +44 -0
- data/lib/rubocop/cop/eightyfourcodes_cops.rb +5 -0
- data/lib/rubocop/eightyfourcodes/inject.rb +5 -1
- data/lib/rubocop/eightyfourcodes/version.rb +1 -4
- data/lib/rubocop/eightyfourcodes.rb +6 -1
- data/lib/rubocop-eightyfourcodes.rb +5 -16
- data/sig/rubocop/eightyfourcodes.rbs +6 -0
- metadata +22 -44
- data/CONTRIBUTING.md +0 -3
- data/lib/rubocop/cop/eightyfourcodes/cop.rb +0 -70
- data/lib/rubocop/eightyfourcodes/concept.rb +0 -34
- data/lib/rubocop/eightyfourcodes/config_formatter.rb +0 -33
- data/lib/rubocop/eightyfourcodes/description_extractor.rb +0 -72
- data/lib/rubocop/eightyfourcodes/example.rb +0 -32
- data/lib/rubocop/eightyfourcodes/example_group.rb +0 -95
- data/lib/rubocop/eightyfourcodes/hook.rb +0 -49
- data/lib/rubocop/eightyfourcodes/language/node_pattern.rb +0 -20
- data/lib/rubocop/eightyfourcodes/language.rb +0 -118
- data/lib/rubocop/eightyfourcodes/top_level_describe.rb +0 -57
- data/lib/rubocop/eightyfourcodes/util.rb +0 -19
- data/lib/rubocop/eightyfourcodes/wording.rb +0 -81
- data/rubocop-eightyfourcodes.gemspec +0 -35
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 19712be6c6408b1056c9c1c664e27d6663fc10a9722e3e185f730241817a25d4
|
4
|
+
data.tar.gz: a85bd64721dbe996d990ec7315da27f0ac6bf7dc7bd92a0ced8db3b6d916ccdd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 42b8a8f7ee06570552cabf4a2172956124ab78ce6f3a1ead118485f490f550a56389966e8c4ce1692b42cc974d0312186caae7384f14e7c96e62e527e816e9ec
|
7
|
+
data.tar.gz: d731529270d4e2ba9601e11baaf9f957e15be5971f8f9128a02eb52a5f2e171ea33158eefeb917207dc243d55ea0acae2149ffb1b9d5691832b1a81590be9b72
|
data/.rspec
ADDED
data/.rubocop.yml
ADDED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 0.0.3 (2024-10-23)
|
4
|
+
|
5
|
+
- Recreated entire project using <https://github.com/rubocop/rubocop-extension-generator>
|
6
|
+
- Added `EnsureRedirect`
|
7
|
+
|
8
|
+
## 0.0.2 (2020-09-24)
|
9
|
+
|
10
|
+
- Added `RubyVersionFile`: Ensure we read Gemfile ruby version from `.ruby-version` file
|
11
|
+
|
3
12
|
## 0.0.1 (2019-09-11)
|
4
13
|
|
5
14
|
- Forked from gitlab-security
|
data/Gemfile
CHANGED
@@ -1,9 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
source 'https://rubygems.org'
|
2
4
|
|
5
|
+
# Specify your gem's dependencies in rubocop-eightyfourcodes.gemspec
|
3
6
|
gemspec
|
4
7
|
|
5
8
|
group :development, :test do
|
6
|
-
gem '
|
7
|
-
gem 'rspec'
|
8
|
-
gem 'rubocop
|
9
|
+
gem 'rake'
|
10
|
+
gem 'rspec'
|
11
|
+
gem 'rubocop'
|
12
|
+
gem 'rubocop-rake'
|
13
|
+
gem 'rubocop-rspec'
|
14
|
+
gem 'yard'
|
9
15
|
end
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,68 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
rubocop-eightyfourcodes (0.0.3)
|
5
|
+
rubocop
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
ast (2.4.2)
|
11
|
+
diff-lcs (1.5.1)
|
12
|
+
json (2.7.2)
|
13
|
+
language_server-protocol (3.17.0.3)
|
14
|
+
parallel (1.26.3)
|
15
|
+
parser (3.3.5.0)
|
16
|
+
ast (~> 2.4.1)
|
17
|
+
racc
|
18
|
+
racc (1.8.1)
|
19
|
+
rainbow (3.1.1)
|
20
|
+
rake (13.2.1)
|
21
|
+
regexp_parser (2.9.2)
|
22
|
+
rspec (3.13.0)
|
23
|
+
rspec-core (~> 3.13.0)
|
24
|
+
rspec-expectations (~> 3.13.0)
|
25
|
+
rspec-mocks (~> 3.13.0)
|
26
|
+
rspec-core (3.13.2)
|
27
|
+
rspec-support (~> 3.13.0)
|
28
|
+
rspec-expectations (3.13.3)
|
29
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
30
|
+
rspec-support (~> 3.13.0)
|
31
|
+
rspec-mocks (3.13.2)
|
32
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
33
|
+
rspec-support (~> 3.13.0)
|
34
|
+
rspec-support (3.13.1)
|
35
|
+
rubocop (1.67.0)
|
36
|
+
json (~> 2.3)
|
37
|
+
language_server-protocol (>= 3.17.0)
|
38
|
+
parallel (~> 1.10)
|
39
|
+
parser (>= 3.3.0.2)
|
40
|
+
rainbow (>= 2.2.2, < 4.0)
|
41
|
+
regexp_parser (>= 2.4, < 3.0)
|
42
|
+
rubocop-ast (>= 1.32.2, < 2.0)
|
43
|
+
ruby-progressbar (~> 1.7)
|
44
|
+
unicode-display_width (>= 2.4.0, < 3.0)
|
45
|
+
rubocop-ast (1.32.3)
|
46
|
+
parser (>= 3.3.1.0)
|
47
|
+
rubocop-rake (0.6.0)
|
48
|
+
rubocop (~> 1.0)
|
49
|
+
rubocop-rspec (3.1.0)
|
50
|
+
rubocop (~> 1.61)
|
51
|
+
ruby-progressbar (1.13.0)
|
52
|
+
unicode-display_width (2.6.0)
|
53
|
+
yard (0.9.37)
|
54
|
+
|
55
|
+
PLATFORMS
|
56
|
+
ruby
|
57
|
+
|
58
|
+
DEPENDENCIES
|
59
|
+
rake
|
60
|
+
rspec
|
61
|
+
rubocop
|
62
|
+
rubocop-eightyfourcodes!
|
63
|
+
rubocop-rake
|
64
|
+
rubocop-rspec
|
65
|
+
yard
|
66
|
+
|
67
|
+
BUNDLED WITH
|
68
|
+
2.5.22
|
data/LICENSE.md
CHANGED
@@ -1,4 +1,6 @@
|
|
1
|
-
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2024 84codes AB
|
2
4
|
|
3
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
6
|
of this software and associated documentation files (the "Software"), to deal
|
@@ -7,13 +9,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
7
9
|
copies of the Software, and to permit persons to whom the Software is
|
8
10
|
furnished to do so, subject to the following conditions:
|
9
11
|
|
10
|
-
The above copyright notice and this permission notice shall be included in
|
11
|
-
copies or substantial portions of the Software.
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
12
14
|
|
13
15
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
16
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
17
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
18
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
19
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
|
-
SOFTWARE.
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
CHANGED
@@ -1,20 +1,16 @@
|
|
1
|
+
# Rubocop::EightyFourCodes
|
2
|
+
|
1
3
|
This is a collection of cops developed and used by 84codes AB
|
2
|
-
This code is based heavily upon the [rubocop-gitlab-security](https://gitlab.com/gitlab-org/rubocop-gitlab-security)
|
3
|
-
code released under the MIT License.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
7
|
-
|
7
|
+
Install the gem and add to the application's Gemfile by executing:
|
8
8
|
|
9
|
-
|
10
|
-
gem install rubocop-eightyfourcodes
|
11
|
-
```
|
9
|
+
bundle add rubocop-eightyfourcodes --require=false
|
12
10
|
|
13
|
-
|
11
|
+
If bundler is not being used to manage dependencies, install the gem by executing:
|
14
12
|
|
15
|
-
|
16
|
-
gem 'rubocop-eightyfourcodes'
|
17
|
-
```
|
13
|
+
gem install rubocop-eightyfourcodes
|
18
14
|
|
19
15
|
## Usage
|
20
16
|
|
@@ -32,64 +28,20 @@ require: rubocop-eightyfourcodes
|
|
32
28
|
Now you can run `rubocop` and it will automatically load the RuboCop eightyfourcodes
|
33
29
|
cops together with the standard cops.
|
34
30
|
|
35
|
-
|
36
|
-
|
37
|
-
```bash
|
38
|
-
rubocop --require rubocop-eightyfourcodes
|
39
|
-
```
|
40
|
-
|
41
|
-
### Rake task
|
31
|
+
## Development
|
42
32
|
|
43
|
-
|
44
|
-
RuboCop::RakeTask.new do |task|
|
45
|
-
task.requires << 'rubocop-eightyfourcodes'
|
46
|
-
end
|
47
|
-
```
|
33
|
+
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.
|
48
34
|
|
49
|
-
|
35
|
+
Use `bundle exec rake 'new_cop[EightyFourCodes/CommandLiteralInjection]'` to generate a new cop.
|
50
36
|
|
51
|
-
|
37
|
+
The [NodePattern Debugger](https://nodepattern.herokuapp.com/) is a very helpful resource when creating new AST matchers.
|
52
38
|
|
53
|
-
|
54
|
-
# Inspect all files
|
55
|
-
AllCops:
|
56
|
-
EightyFourCodes:
|
57
|
-
Patterns:
|
58
|
-
- '.+'
|
59
|
-
```
|
60
|
-
|
61
|
-
```yaml
|
62
|
-
# Inspect only controller files.
|
63
|
-
AllCops:
|
64
|
-
EightyFourCodes:
|
65
|
-
Patterns:
|
66
|
-
- app/controllers/**/*.rb
|
67
|
-
```
|
68
|
-
|
69
|
-
## The Cops
|
70
|
-
|
71
|
-
All cops are located under
|
72
|
-
[`lib/rubocop/cop/eightyfourcodes`](lib/rubocop/cop/eightyfourcodes), and contain
|
73
|
-
examples/documentation.
|
74
|
-
|
75
|
-
In your `.rubocop.yml`, you may treat the eightyfourcodes cops just like any other
|
76
|
-
cop. For example:
|
77
|
-
|
78
|
-
```yaml
|
79
|
-
EightyFourCodes/CommandLiteralInjection:
|
80
|
-
Exclude:
|
81
|
-
- 'spec/**/*'
|
82
|
-
```
|
39
|
+
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).
|
83
40
|
|
84
41
|
## Contributing
|
85
42
|
|
86
|
-
|
87
|
-
2. Create your feature branch (`git checkout -b my-new-feature`)
|
88
|
-
3. Commit your changes (`git commit -am 'Add some feature'`)
|
89
|
-
4. Push to the branch (`git push origin my-new-feature`)
|
90
|
-
5. Create new Merge Request
|
43
|
+
Bug reports and pull requests are welcome on GitHub at <https://github.com/84codes/rubocop-eightyfourcodes>.
|
91
44
|
|
92
45
|
## License
|
93
46
|
|
94
|
-
|
95
|
-
the full text.
|
47
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'bundler/gem_tasks'
|
4
|
+
require 'rspec/core/rake_task'
|
5
|
+
require 'rubocop/rake_task'
|
6
|
+
|
7
|
+
RuboCop::RakeTask.new
|
8
|
+
|
9
|
+
task default: %i[spec rubocop]
|
10
|
+
|
11
|
+
RSpec::Core::RakeTask.new(:spec) do |spec|
|
12
|
+
spec.pattern = FileList['spec/**/*_spec.rb']
|
13
|
+
end
|
14
|
+
|
15
|
+
desc 'Generate a new cop with a template'
|
16
|
+
task :new_cop, [:cop] do |_task, args|
|
17
|
+
require 'rubocop'
|
18
|
+
|
19
|
+
cop_name = args.fetch(:cop) do
|
20
|
+
warn 'usage: bundle exec rake new_cop[Department/Name]'
|
21
|
+
exit!
|
22
|
+
end
|
23
|
+
|
24
|
+
generator = RuboCop::Cop::Generator.new(cop_name)
|
25
|
+
|
26
|
+
generator.write_source
|
27
|
+
generator.write_spec
|
28
|
+
generator.inject_require(root_file_path: 'lib/rubocop/cop/eightyfourcodes_cops.rb')
|
29
|
+
generator.inject_config(config_file_path: 'config/default.yml')
|
30
|
+
|
31
|
+
puts generator.todo
|
32
|
+
end
|
data/config/default.yml
CHANGED
@@ -1,9 +1,14 @@
|
|
1
|
-
|
2
|
-
AllCops:
|
3
|
-
EightyFourCodes:
|
4
|
-
Patterns:
|
5
|
-
- ".+"
|
1
|
+
# Write it!
|
6
2
|
|
7
3
|
EightyFourCodes/CommandLiteralInjection:
|
8
|
-
Description:
|
4
|
+
Description: "Do not include variables command literals"
|
9
5
|
Enabled: true
|
6
|
+
VersionAdded: "0.0.1"
|
7
|
+
EightyFourCodes/RubyVersionFile:
|
8
|
+
Description: "Control Ruby version via .ruby-version"
|
9
|
+
Enabled: true
|
10
|
+
VersionAdded: "0.0.2"
|
11
|
+
EightyFourCodes/EnsureRedirect:
|
12
|
+
Description: "Checks for `redirect` from an `ensure` block"
|
13
|
+
Enabled: true
|
14
|
+
VersionAdded: "0.0.3"
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module RuboCop
|
2
4
|
module Cop
|
3
5
|
module EightyFourCodes
|
@@ -15,8 +17,8 @@ module RuboCop
|
|
15
17
|
# # even better
|
16
18
|
# exec("/bin/ls", shell_escape(filename))
|
17
19
|
#
|
18
|
-
class CommandLiteralInjection <
|
19
|
-
MSG = 'Do not include variables command literals. Use parameters "system(cmd, params)" or exec() instead'
|
20
|
+
class CommandLiteralInjection < Base
|
21
|
+
MSG = 'Do not include variables command literals. Use parameters "system(cmd, params)" or exec() instead'
|
20
22
|
|
21
23
|
def_node_matcher :literal_var?, <<-PATTERN
|
22
24
|
(begin ...)
|
@@ -0,0 +1,48 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module RuboCop
|
4
|
+
module Cop
|
5
|
+
module EightyFourCodes
|
6
|
+
# Checks for `redirect` from an `ensure` block.
|
7
|
+
# `redirect` from an ensure block is a dangerous code smell as it
|
8
|
+
# will take precedence over any exception being raised,
|
9
|
+
# and the exception will be silently thrown away as if it were rescued.
|
10
|
+
#
|
11
|
+
# If you want to rescue some (or all) exceptions, best to do it explicitly
|
12
|
+
#
|
13
|
+
# @example
|
14
|
+
#
|
15
|
+
# # bad
|
16
|
+
# def foo
|
17
|
+
# do_something
|
18
|
+
# ensure
|
19
|
+
# cleanup
|
20
|
+
# redirect "/"
|
21
|
+
# end
|
22
|
+
#
|
23
|
+
#
|
24
|
+
# # good
|
25
|
+
# def foo
|
26
|
+
# begin
|
27
|
+
# do_something
|
28
|
+
# rescue SomeException
|
29
|
+
# # Let's ignore this exception
|
30
|
+
# end
|
31
|
+
# redirect "/"
|
32
|
+
# ensure
|
33
|
+
# cleanup
|
34
|
+
# end
|
35
|
+
class EnsureRedirect < Base
|
36
|
+
MSG = 'Do not redirect from an `ensure` block.'
|
37
|
+
|
38
|
+
def on_ensure(node)
|
39
|
+
# `:send` nodes represent method calls, so we look for send nodes and then check if they are `redirect`
|
40
|
+
node.body&.each_node(:send) do |send_node|
|
41
|
+
# Check if the method name being called is `redirect`
|
42
|
+
add_offense(send_node) if send_node.method?(:redirect)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module RuboCop
|
4
|
+
module Cop
|
5
|
+
module EightyFourCodes
|
6
|
+
# Read Ruby version from a .ruby-version file
|
7
|
+
#
|
8
|
+
# Instead of staticly defining the Ruby runtime version in Gemfile, load it from
|
9
|
+
# a .ruby-version file definition. As this Ruby version file is read by rbenv, chruby etc
|
10
|
+
# it's much easier for the developer to work with multiple projects with different versions.
|
11
|
+
#
|
12
|
+
# @example
|
13
|
+
# # bad
|
14
|
+
# ruby 2.6.6
|
15
|
+
#
|
16
|
+
# # good
|
17
|
+
# ruby File.read('.ruby-version')
|
18
|
+
class RubyVersionFile < Base
|
19
|
+
extend AutoCorrector
|
20
|
+
|
21
|
+
MSG = "Control Ruby version via .ruby-version, fix by replacing with File.read('.ruby-version')"
|
22
|
+
|
23
|
+
RESTRICT_ON_SEND = %i[ruby].freeze
|
24
|
+
|
25
|
+
def_node_matcher :static_version_found?, <<~PATTERN
|
26
|
+
(send nil? :ruby
|
27
|
+
$(str _))
|
28
|
+
PATTERN
|
29
|
+
|
30
|
+
def on_send(node)
|
31
|
+
return unless File.basename(processed_source.file_path).eql?('Gemfile')
|
32
|
+
|
33
|
+
static_version_found?(node) do |source_node, source|
|
34
|
+
message = format(MSG, source: source)
|
35
|
+
|
36
|
+
add_offense(source_node, message: message) do |corrector|
|
37
|
+
corrector.replace(source_node, "File.read('.ruby-version')")
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
@@ -1,3 +1,7 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# The original code is from https://github.com/rubocop/rubocop-rspec/blob/master/lib/rubocop/rspec/inject.rb
|
4
|
+
# See https://github.com/rubocop/rubocop-rspec/blob/master/MIT-LICENSE.md
|
1
5
|
module RuboCop
|
2
6
|
module EightyFourCodes
|
3
7
|
# Because RuboCop doesn't yet support plugins, we have to monkey patch in a
|
@@ -6,7 +10,7 @@ module RuboCop
|
|
6
10
|
def self.defaults!
|
7
11
|
path = CONFIG_DEFAULT.to_s
|
8
12
|
hash = ConfigLoader.send(:load_yaml_configuration, path)
|
9
|
-
config = Config.new(hash, path)
|
13
|
+
config = Config.new(hash, path).tap(&:make_excludes_absolute)
|
10
14
|
puts "configuration from #{path}" if ConfigLoader.debug?
|
11
15
|
config = ConfigLoader.merge_with_default(config, path)
|
12
16
|
ConfigLoader.instance_variable_set(:@default_configuration, config)
|
@@ -1,6 +1,11 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative 'eightyfourcodes/version'
|
4
|
+
|
1
5
|
module RuboCop
|
2
|
-
#
|
6
|
+
# Namespace for EightyFourCodes cops
|
3
7
|
module EightyFourCodes
|
8
|
+
class Error < StandardError; end
|
4
9
|
PROJECT_ROOT = Pathname.new(__dir__).parent.parent.expand_path.freeze
|
5
10
|
CONFIG_DEFAULT = PROJECT_ROOT.join('config', 'default.yml').freeze
|
6
11
|
CONFIG = YAML.safe_load(CONFIG_DEFAULT.read).freeze
|
@@ -1,22 +1,11 @@
|
|
1
|
-
|
2
|
-
require 'yaml'
|
1
|
+
# frozen_string_literal: true
|
3
2
|
|
4
3
|
require 'rubocop'
|
5
4
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
require 'rubocop/eightyfourcodes/top_level_describe'
|
10
|
-
require 'rubocop/eightyfourcodes/wording'
|
11
|
-
require 'rubocop/eightyfourcodes/util'
|
12
|
-
require 'rubocop/eightyfourcodes/language'
|
13
|
-
require 'rubocop/eightyfourcodes/language/node_pattern'
|
14
|
-
require 'rubocop/eightyfourcodes/concept'
|
15
|
-
require 'rubocop/eightyfourcodes/example_group'
|
16
|
-
require 'rubocop/eightyfourcodes/example'
|
17
|
-
require 'rubocop/eightyfourcodes/hook'
|
18
|
-
require 'rubocop/cop/eightyfourcodes/cop'
|
5
|
+
require_relative 'rubocop/eightyfourcodes'
|
6
|
+
require_relative 'rubocop/eightyfourcodes/version'
|
7
|
+
require_relative 'rubocop/eightyfourcodes/inject'
|
19
8
|
|
20
9
|
RuboCop::EightyFourCodes::Inject.defaults!
|
21
10
|
|
22
|
-
|
11
|
+
require_relative 'rubocop/cop/eightyfourcodes_cops'
|
metadata
CHANGED
@@ -1,85 +1,63 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop-eightyfourcodes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anders Bälter
|
8
|
-
|
9
|
-
autorequire:
|
8
|
+
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2024-10-23 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: rubocop
|
16
|
-
requirement: !ruby/object:Gem::Requirement
|
17
|
-
requirements:
|
18
|
-
- - ">="
|
19
|
-
- !ruby/object:Gem::Version
|
20
|
-
version: '0.51'
|
21
|
-
type: :runtime
|
22
|
-
prerelease: false
|
23
|
-
version_requirements: !ruby/object:Gem::Requirement
|
24
|
-
requirements:
|
25
|
-
- - ">="
|
26
|
-
- !ruby/object:Gem::Version
|
27
|
-
version: '0.51'
|
28
|
-
- !ruby/object:Gem::Dependency
|
29
|
-
name: rake
|
30
15
|
requirement: !ruby/object:Gem::Requirement
|
31
16
|
requirements:
|
32
17
|
- - ">="
|
33
18
|
- !ruby/object:Gem::Version
|
34
19
|
version: '0'
|
35
|
-
type: :
|
20
|
+
type: :runtime
|
36
21
|
prerelease: false
|
37
22
|
version_requirements: !ruby/object:Gem::Requirement
|
38
23
|
requirements:
|
39
24
|
- - ">="
|
40
25
|
- !ruby/object:Gem::Version
|
41
26
|
version: '0'
|
42
|
-
description:
|
43
|
-
|
44
|
-
|
27
|
+
description: 'A plugin for the RuboCop code style enforcing & linting tool.
|
28
|
+
|
29
|
+
'
|
45
30
|
email:
|
46
|
-
- anders@
|
47
|
-
- brian@gitlab.com
|
31
|
+
- anders@84codes.com
|
48
32
|
executables: []
|
49
33
|
extensions: []
|
50
34
|
extra_rdoc_files:
|
51
35
|
- LICENSE.md
|
52
36
|
- README.md
|
53
37
|
files:
|
38
|
+
- ".rspec"
|
39
|
+
- ".rubocop.yml"
|
54
40
|
- CHANGELOG.md
|
55
|
-
- CONTRIBUTING.md
|
56
41
|
- Gemfile
|
42
|
+
- Gemfile.lock
|
57
43
|
- LICENSE.md
|
58
44
|
- README.md
|
45
|
+
- Rakefile
|
59
46
|
- config/default.yml
|
60
47
|
- lib/rubocop-eightyfourcodes.rb
|
61
|
-
- lib/rubocop/cop/
|
62
|
-
- lib/rubocop/cop/
|
48
|
+
- lib/rubocop/cop/eighty_four_codes/command_literal_injection.rb
|
49
|
+
- lib/rubocop/cop/eighty_four_codes/ensure_redirect.rb
|
50
|
+
- lib/rubocop/cop/eighty_four_codes/ruby_version_file.rb
|
51
|
+
- lib/rubocop/cop/eightyfourcodes_cops.rb
|
63
52
|
- lib/rubocop/eightyfourcodes.rb
|
64
|
-
- lib/rubocop/eightyfourcodes/concept.rb
|
65
|
-
- lib/rubocop/eightyfourcodes/config_formatter.rb
|
66
|
-
- lib/rubocop/eightyfourcodes/description_extractor.rb
|
67
|
-
- lib/rubocop/eightyfourcodes/example.rb
|
68
|
-
- lib/rubocop/eightyfourcodes/example_group.rb
|
69
|
-
- lib/rubocop/eightyfourcodes/hook.rb
|
70
53
|
- lib/rubocop/eightyfourcodes/inject.rb
|
71
|
-
- lib/rubocop/eightyfourcodes/language.rb
|
72
|
-
- lib/rubocop/eightyfourcodes/language/node_pattern.rb
|
73
|
-
- lib/rubocop/eightyfourcodes/top_level_describe.rb
|
74
|
-
- lib/rubocop/eightyfourcodes/util.rb
|
75
54
|
- lib/rubocop/eightyfourcodes/version.rb
|
76
|
-
-
|
77
|
-
- rubocop-eightyfourcodes.gemspec
|
55
|
+
- sig/rubocop/eightyfourcodes.rbs
|
78
56
|
homepage: https://github.com/84codes/rubocop-eightyfourcodes/
|
79
57
|
licenses:
|
80
58
|
- MIT
|
81
59
|
metadata: {}
|
82
|
-
post_install_message:
|
60
|
+
post_install_message:
|
83
61
|
rdoc_options: []
|
84
62
|
require_paths:
|
85
63
|
- lib
|
@@ -87,15 +65,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
87
65
|
requirements:
|
88
66
|
- - ">="
|
89
67
|
- !ruby/object:Gem::Version
|
90
|
-
version: 2.
|
68
|
+
version: 2.6.0
|
91
69
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
92
70
|
requirements:
|
93
71
|
- - ">="
|
94
72
|
- !ruby/object:Gem::Version
|
95
73
|
version: '0'
|
96
74
|
requirements: []
|
97
|
-
rubygems_version: 3.
|
98
|
-
signing_key:
|
75
|
+
rubygems_version: 3.5.22
|
76
|
+
signing_key:
|
99
77
|
specification_version: 4
|
100
|
-
summary:
|
78
|
+
summary: This is a collection of cops developed and used by 84codes AB.
|
101
79
|
test_files: []
|
data/CONTRIBUTING.md
DELETED