rubocop-notarize 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +12 -0
- data/.rspec +3 -0
- data/.rubocop.yml +16 -0
- data/.ruby-version +1 -0
- data/Gemfile +12 -0
- data/Gemfile.lock +78 -0
- data/README.md +36 -0
- data/Rakefile +30 -0
- data/bin/console +15 -0
- data/bin/setup +8 -0
- data/config/default.yml +29 -0
- data/lib/rubocop/cop/notarize_cops.rb +8 -0
- data/lib/rubocop/cop/performance/disable_reload.rb +35 -0
- data/lib/rubocop/cop/performance/require_file_open_block.rb +31 -0
- data/lib/rubocop/cop/security/disable_chdir.rb +37 -0
- data/lib/rubocop/cop/sidekiq/require_sidekiq_testing_inline_block.rb +31 -0
- data/lib/rubocop/cop/style/disable_programmatic_enum_value.rb +48 -0
- data/lib/rubocop/cop/style/graph_camelize.rb +48 -0
- data/lib/rubocop/notarize/inject.rb +20 -0
- data/lib/rubocop/notarize/version.rb +7 -0
- data/lib/rubocop/notarize.rb +16 -0
- data/lib/rubocop-notarize.rb +11 -0
- data/rubocop-notarize.gemspec +25 -0
- metadata +81 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 9e88427bedb060da993a5298de0e254c37464dc06f9872e9cc1a168028cb19aa
|
4
|
+
data.tar.gz: 4d6e4110abad01aefd90c6c65024f56c4cc86dd7e11cd1de1a6dda9dcf3adb6a
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: ec74d694353490b849ce5b71a93a8b0d1587c4cde410a7c8b4070ce65cc4276643799272a7a7557480ec3d53c8c22ecd4fb0270167e7a30c1affd28673a28353
|
7
|
+
data.tar.gz: df7ab0e1f2c20d5d136f2db6c657e60eaa52e20f705a3f2a6ffaa7d961e0a1e94213b47311125c6b7d10ee1297377d184789c57f9834b536535fc959786eb732
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.rubocop.yml
ADDED
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
3.2.2
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,78 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
rubocop-notarize (0.1.7)
|
5
|
+
rubocop (>= 0.92)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
ast (2.4.2)
|
11
|
+
base64 (0.1.1)
|
12
|
+
diff-lcs (1.5.0)
|
13
|
+
json (2.6.3)
|
14
|
+
language_server-protocol (3.17.0.3)
|
15
|
+
parallel (1.23.0)
|
16
|
+
parser (3.2.2.3)
|
17
|
+
ast (~> 2.4.1)
|
18
|
+
racc
|
19
|
+
racc (1.7.1)
|
20
|
+
rainbow (3.1.1)
|
21
|
+
rake (13.0.6)
|
22
|
+
regexp_parser (2.8.1)
|
23
|
+
rexml (3.2.6)
|
24
|
+
rspec (3.12.0)
|
25
|
+
rspec-core (~> 3.12.0)
|
26
|
+
rspec-expectations (~> 3.12.0)
|
27
|
+
rspec-mocks (~> 3.12.0)
|
28
|
+
rspec-core (3.12.2)
|
29
|
+
rspec-support (~> 3.12.0)
|
30
|
+
rspec-expectations (3.12.3)
|
31
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
32
|
+
rspec-support (~> 3.12.0)
|
33
|
+
rspec-mocks (3.12.6)
|
34
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
35
|
+
rspec-support (~> 3.12.0)
|
36
|
+
rspec-support (3.12.1)
|
37
|
+
rubocop (1.56.4)
|
38
|
+
base64 (~> 0.1.1)
|
39
|
+
json (~> 2.3)
|
40
|
+
language_server-protocol (>= 3.17.0)
|
41
|
+
parallel (~> 1.10)
|
42
|
+
parser (>= 3.2.2.3)
|
43
|
+
rainbow (>= 2.2.2, < 4.0)
|
44
|
+
regexp_parser (>= 1.8, < 3.0)
|
45
|
+
rexml (>= 3.2.5, < 4.0)
|
46
|
+
rubocop-ast (>= 1.28.1, < 2.0)
|
47
|
+
ruby-progressbar (~> 1.7)
|
48
|
+
unicode-display_width (>= 2.4.0, < 3.0)
|
49
|
+
rubocop-ast (1.29.0)
|
50
|
+
parser (>= 3.2.1.0)
|
51
|
+
rubocop-capybara (2.19.0)
|
52
|
+
rubocop (~> 1.41)
|
53
|
+
rubocop-factory_bot (2.24.0)
|
54
|
+
rubocop (~> 1.33)
|
55
|
+
rubocop-rake (0.6.0)
|
56
|
+
rubocop (~> 1.0)
|
57
|
+
rubocop-rspec (2.24.1)
|
58
|
+
rubocop (~> 1.33)
|
59
|
+
rubocop-capybara (~> 2.17)
|
60
|
+
rubocop-factory_bot (~> 2.22)
|
61
|
+
ruby-progressbar (1.13.0)
|
62
|
+
unicode-display_width (2.4.2)
|
63
|
+
|
64
|
+
PLATFORMS
|
65
|
+
ruby
|
66
|
+
|
67
|
+
DEPENDENCIES
|
68
|
+
rake
|
69
|
+
rspec
|
70
|
+
rubocop-notarize!
|
71
|
+
rubocop-rake
|
72
|
+
rubocop-rspec
|
73
|
+
|
74
|
+
RUBY VERSION
|
75
|
+
ruby 3.2.2p53
|
76
|
+
|
77
|
+
BUNDLED WITH
|
78
|
+
2.4.20
|
data/README.md
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
# Rubocop::Notarize
|
2
|
+
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/rubocop/notarize`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'rubocop-notarize', github: 'notarize/rubocop-notarize'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle install
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install rubocop-notarize
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
TODO: Write usage instructions here
|
26
|
+
|
27
|
+
## Development
|
28
|
+
|
29
|
+
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.
|
30
|
+
|
31
|
+
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 tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
|
+
|
33
|
+
## Contributing
|
34
|
+
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/rubocop-notarize.
|
36
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,30 @@
|
|
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
|
+
task default: :spec
|
9
|
+
|
10
|
+
RSpec::Core::RakeTask.new(:spec) do |spec|
|
11
|
+
spec.pattern = FileList['spec/**/*_spec.rb']
|
12
|
+
end
|
13
|
+
|
14
|
+
desc 'Generate a new cop with a template'
|
15
|
+
task :new_cop, [:cop] do |_task, args|
|
16
|
+
require 'rubocop'
|
17
|
+
|
18
|
+
cop_name = args.fetch(:cop) do
|
19
|
+
warn 'usage: bundle exec rake new_cop[Department/Name]'
|
20
|
+
exit!
|
21
|
+
end
|
22
|
+
|
23
|
+
generator = RuboCop::Cop::Generator.new(cop_name)
|
24
|
+
generator.write_source
|
25
|
+
generator.write_spec
|
26
|
+
generator.inject_require(root_file_path: 'lib/rubocop/cop/notarize_cops.rb')
|
27
|
+
generator.inject_config(config_file_path: 'config/default.yml')
|
28
|
+
|
29
|
+
puts generator.todo
|
30
|
+
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/notarize'
|
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
data/config/default.yml
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
Performance/DisableReload:
|
2
|
+
Description: 'Disallow users to call .reload on an ActiveRecord object'
|
3
|
+
Enabled: true
|
4
|
+
VersionAdded: '0.1.5'
|
5
|
+
|
6
|
+
Performance/RequireFileOpenBlock:
|
7
|
+
Description: 'Enforce opening files with a block to ensure the file gets closed.'
|
8
|
+
Enabled: true
|
9
|
+
VersionAdded: '0.1.5'
|
10
|
+
|
11
|
+
Security/DisableChdir:
|
12
|
+
Description: 'Disallow users to call chdir with a block'
|
13
|
+
Enabled: true
|
14
|
+
VersionAdded: '0.1.7'
|
15
|
+
|
16
|
+
Sidekiq/RequireSidekiqTestingInlineBlock:
|
17
|
+
Description: 'Prevent Sidekiq Testing settings from leaking into other specs'
|
18
|
+
Enabled: true
|
19
|
+
VersionAdded: '0.1.6'
|
20
|
+
|
21
|
+
Style/DisableProgrammaticEnumValue:
|
22
|
+
Description: 'Disallow users to create enums with an each_value statement'
|
23
|
+
Enabled: true
|
24
|
+
VersionAdded: '0.1.5'
|
25
|
+
|
26
|
+
Style/GraphCamelize:
|
27
|
+
Description: 'Do not use the GraphQL camelize option as we always want the default value (true).'
|
28
|
+
Enabled: true
|
29
|
+
VersionAdded: '0.1.5'
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative 'performance/disable_reload'
|
4
|
+
require_relative 'performance/require_file_open_block'
|
5
|
+
require_relative 'style/disable_programmatic_enum_value'
|
6
|
+
require_relative 'style/graph_camelize'
|
7
|
+
require_relative 'sidekiq/require_sidekiq_testing_inline_block'
|
8
|
+
require_relative 'security/disable_chdir'
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module RuboCop
|
4
|
+
module Cop
|
5
|
+
module Performance
|
6
|
+
# Limit use of reloads
|
7
|
+
# If you want to update an association then append/pop off the association in memory
|
8
|
+
# If you want to
|
9
|
+
# @example EnforcedStyle: bar (default)
|
10
|
+
# # Description of the `bar` style.
|
11
|
+
#
|
12
|
+
# # bad
|
13
|
+
# Book.create(shelf_id: shelf.id)
|
14
|
+
# shelf.reload.books
|
15
|
+
#
|
16
|
+
# # good
|
17
|
+
# book = Book.create(shelf_id: shelf.id)
|
18
|
+
# shelf.books << book
|
19
|
+
#
|
20
|
+
class DisableReload < Base
|
21
|
+
MSG = 'Update the model in memory instead of calling .reload'
|
22
|
+
|
23
|
+
def_node_matcher :reload_call?, <<~PATTERN
|
24
|
+
(send (...) :reload)
|
25
|
+
PATTERN
|
26
|
+
|
27
|
+
def on_send(node)
|
28
|
+
return unless reload_call?(node)
|
29
|
+
|
30
|
+
add_offense(node)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module RuboCop
|
4
|
+
module Cop
|
5
|
+
module Performance
|
6
|
+
# Enforce passing a block to File.open to ensure the file is closed after use.
|
7
|
+
#
|
8
|
+
# @example RequireFileOpenBlock: true (default)
|
9
|
+
#
|
10
|
+
# # bad
|
11
|
+
# file = File.open(file_path)
|
12
|
+
# body = file.read
|
13
|
+
# file.close
|
14
|
+
#
|
15
|
+
# # good
|
16
|
+
# body = File.open(file_path) { |file| file.read }
|
17
|
+
#
|
18
|
+
class RequireFileOpenBlock < Base
|
19
|
+
MSG = 'Use File.open with a block to ensure the file is closed after use.'
|
20
|
+
|
21
|
+
def_node_matcher :open_call?, <<~PATTERN
|
22
|
+
(send (...) :open ...)
|
23
|
+
PATTERN
|
24
|
+
|
25
|
+
def on_send(node)
|
26
|
+
add_offense(node) if open_call?(node) && !node.parent.is_a?(RuboCop::AST::BlockNode)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module RuboCop
|
4
|
+
module Cop
|
5
|
+
module Security
|
6
|
+
# Block usage of Dir.chdir due to its thread unsafe nature
|
7
|
+
#
|
8
|
+
# @example BlockChdir: true (default)
|
9
|
+
#
|
10
|
+
# # bad
|
11
|
+
# Dir.chdir(...) do
|
12
|
+
# ...
|
13
|
+
# end
|
14
|
+
#
|
15
|
+
# # bad
|
16
|
+
# chdir ... do
|
17
|
+
# ...
|
18
|
+
# end
|
19
|
+
#
|
20
|
+
# # good
|
21
|
+
# Use exact path or create and call method in target dir instead
|
22
|
+
#
|
23
|
+
class DisableChdir < Base
|
24
|
+
MSG = 'Avoid using Dir.chdir due to thread safety issues'
|
25
|
+
|
26
|
+
def_node_matcher :chdir?, <<~PATTERN
|
27
|
+
(send {(const nil? :Dir) nil?} :chdir _)
|
28
|
+
PATTERN
|
29
|
+
|
30
|
+
def on_block(node)
|
31
|
+
return unless chdir?(node.send_node)
|
32
|
+
add_offense(node)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module RuboCop
|
4
|
+
module Cop
|
5
|
+
module Sidekiq
|
6
|
+
# Enforce passing a block to Sidekiq::Testing.inline! to ensure setting does not leak to other specs
|
7
|
+
# (https://github.com/sidekiq/sidekiq/wiki/Testing#testing-workers-inline)
|
8
|
+
#
|
9
|
+
# @example RequireSidekiqTestingInlineBlock: true (default)
|
10
|
+
#
|
11
|
+
# # bad
|
12
|
+
# Sidekiq::Testing.inline!
|
13
|
+
# described_class.call
|
14
|
+
#
|
15
|
+
# # good
|
16
|
+
# Sidekiq::Testing.inline! { described_class.call }
|
17
|
+
#
|
18
|
+
class RequireSidekiqTestingInlineBlock < Base
|
19
|
+
MSG = 'Use Sidekiq::Testing.inline! with a block to ensure setting does not leak'
|
20
|
+
|
21
|
+
def_node_matcher :open_call?, <<~PATTERN
|
22
|
+
(send (...) :inline! ...)
|
23
|
+
PATTERN
|
24
|
+
|
25
|
+
def on_send(node)
|
26
|
+
add_offense(node) if open_call?(node) && !node.parent.is_a?(RuboCop::AST::BlockNode)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module RuboCop
|
4
|
+
module Cop
|
5
|
+
module Style
|
6
|
+
# Do not assign GraphQL Enums programmatically.
|
7
|
+
# Doing so obfuscates changes to clients that break when new Enums are added.
|
8
|
+
#
|
9
|
+
# @example DisableProgrammaticEnumValue:
|
10
|
+
#
|
11
|
+
# # bad
|
12
|
+
# RubyEnum.each_value { |type| enum_value type }
|
13
|
+
#
|
14
|
+
# # good
|
15
|
+
# enum_value RubyEnum::TYPE
|
16
|
+
class DisableProgrammaticEnumValue < Base
|
17
|
+
MSG = 'Do not assign graphql enums programmatically.'
|
18
|
+
|
19
|
+
def_node_matcher :each_value?, <<~PATTERN
|
20
|
+
(send (...) :each_value)
|
21
|
+
PATTERN
|
22
|
+
|
23
|
+
def_node_matcher :each?, <<~PATTERN
|
24
|
+
(send (...) :each)
|
25
|
+
PATTERN
|
26
|
+
|
27
|
+
def on_block(node)
|
28
|
+
return unless each_value?(node.send_node) || each?(node.send_node)
|
29
|
+
return unless invalid_children?(node.body)
|
30
|
+
|
31
|
+
add_offense(node)
|
32
|
+
end
|
33
|
+
|
34
|
+
private
|
35
|
+
|
36
|
+
def invalid_children?(node)
|
37
|
+
return false unless node.is_a?(::AST::Node)
|
38
|
+
|
39
|
+
if node.send_type?
|
40
|
+
%i[enum_value value].include?(node.method_name)
|
41
|
+
else
|
42
|
+
node.children.any? { |child| invalid_children?(child) }
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module RuboCop
|
4
|
+
module Cop
|
5
|
+
module Style
|
6
|
+
# Do not use the GraphQL camelize option as we always want the default value (true).
|
7
|
+
#
|
8
|
+
# @example GraphCamelize: true (default)
|
9
|
+
#
|
10
|
+
# # bad
|
11
|
+
# field :updated_at, String, null: true, camelize: false
|
12
|
+
#
|
13
|
+
# # good
|
14
|
+
# field :updated_at, String, null: true
|
15
|
+
#
|
16
|
+
class GraphCamelize < Base
|
17
|
+
extend AutoCorrector
|
18
|
+
|
19
|
+
MSG = 'Do not use the camelize option.'
|
20
|
+
RESTRICT_ON_SEND = %i[argument field].freeze
|
21
|
+
INCORRECT_OPTION = 'camelize'
|
22
|
+
|
23
|
+
def on_send(node)
|
24
|
+
node.children.each do |argument|
|
25
|
+
next unless argument.respond_to?(:type) && argument.type == :hash
|
26
|
+
|
27
|
+
argument.children.each do |pair|
|
28
|
+
next unless pair.key.value.to_s == INCORRECT_OPTION
|
29
|
+
|
30
|
+
add_offense(pair) do |corrector|
|
31
|
+
corrector.remove(get_range_to_remove(pair))
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
private
|
38
|
+
|
39
|
+
def get_range_to_remove(node)
|
40
|
+
left_node = node.left_sibling || node.parent&.left_sibling
|
41
|
+
begin_pos = left_node&.source_range&.end_pos || node.source_range.begin_pos
|
42
|
+
end_pos = node.source_range.end_pos
|
43
|
+
Parser::Source::Range.new(node.source_range.source_buffer, begin_pos, end_pos)
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# The original code is from https://github.com/rubocop-hq/rubocop-rspec/blob/master/lib/rubocop/rspec/inject.rb
|
4
|
+
# See https://github.com/rubocop-hq/rubocop-rspec/blob/master/MIT-LICENSE.md
|
5
|
+
module RuboCop
|
6
|
+
module Notarize
|
7
|
+
# Because RuboCop doesn't yet support plugins, we have to monkey patch in a
|
8
|
+
# bit of our configuration.
|
9
|
+
module Inject
|
10
|
+
def self.defaults!
|
11
|
+
path = CONFIG_DEFAULT.to_s
|
12
|
+
hash = ConfigLoader.send(:load_yaml_configuration, path)
|
13
|
+
config = Config.new(hash, path).tap(&:make_excludes_absolute)
|
14
|
+
puts "configuration from #{path}" if ConfigLoader.debug?
|
15
|
+
config = ConfigLoader.merge_with_default(config, path)
|
16
|
+
ConfigLoader.instance_variable_set(:@default_configuration, config)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'rubocop/notarize/version'
|
4
|
+
require 'yaml'
|
5
|
+
|
6
|
+
module RuboCop
|
7
|
+
module Notarize
|
8
|
+
class Error < StandardError; end
|
9
|
+
# Your code goes here...
|
10
|
+
PROJECT_ROOT = Pathname.new(__dir__).parent.parent.expand_path.freeze
|
11
|
+
CONFIG_DEFAULT = PROJECT_ROOT.join('config', 'default.yml').freeze
|
12
|
+
CONFIG = YAML.safe_load(CONFIG_DEFAULT.read).freeze
|
13
|
+
|
14
|
+
private_constant(:CONFIG_DEFAULT, :PROJECT_ROOT)
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'rubocop'
|
4
|
+
|
5
|
+
require_relative 'rubocop/notarize'
|
6
|
+
require_relative 'rubocop/notarize/version'
|
7
|
+
require_relative 'rubocop/notarize/inject'
|
8
|
+
|
9
|
+
RuboCop::Notarize::Inject.defaults!
|
10
|
+
|
11
|
+
require_relative 'rubocop/cop/notarize_cops'
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative 'lib/rubocop/notarize/version'
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = 'rubocop-notarize'
|
7
|
+
spec.version = RuboCop::Notarize::VERSION
|
8
|
+
spec.authors = ['Arturo Gonzalez', 'Matthew Murphy', 'Jérémie Charrier']
|
9
|
+
|
10
|
+
spec.summary = 'Create Linting rules for Notarize platform'
|
11
|
+
spec.description = 'Custom linting rules for Notarize Ruby platform'
|
12
|
+
spec.required_ruby_version = Gem::Requirement.new('>= 3.2.2')
|
13
|
+
|
14
|
+
# Specify which files should be added to the gem when it is released.
|
15
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
16
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
17
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
18
|
+
end
|
19
|
+
spec.bindir = 'exe'
|
20
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
21
|
+
spec.require_paths = ['lib']
|
22
|
+
|
23
|
+
spec.add_runtime_dependency 'rubocop', '>= 0.92'
|
24
|
+
spec.metadata['rubygems_mfa_required'] = 'true'
|
25
|
+
end
|
metadata
ADDED
@@ -0,0 +1,81 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rubocop-notarize
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.7
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Arturo Gonzalez
|
8
|
+
- Matthew Murphy
|
9
|
+
- Jérémie Charrier
|
10
|
+
autorequire:
|
11
|
+
bindir: exe
|
12
|
+
cert_chain: []
|
13
|
+
date: 2024-01-12 00:00:00.000000000 Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: rubocop
|
17
|
+
requirement: !ruby/object:Gem::Requirement
|
18
|
+
requirements:
|
19
|
+
- - ">="
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0.92'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
requirements:
|
26
|
+
- - ">="
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
version: '0.92'
|
29
|
+
description: Custom linting rules for Notarize Ruby platform
|
30
|
+
email:
|
31
|
+
executables: []
|
32
|
+
extensions: []
|
33
|
+
extra_rdoc_files: []
|
34
|
+
files:
|
35
|
+
- ".gitignore"
|
36
|
+
- ".rspec"
|
37
|
+
- ".rubocop.yml"
|
38
|
+
- ".ruby-version"
|
39
|
+
- Gemfile
|
40
|
+
- Gemfile.lock
|
41
|
+
- README.md
|
42
|
+
- Rakefile
|
43
|
+
- bin/console
|
44
|
+
- bin/setup
|
45
|
+
- config/default.yml
|
46
|
+
- lib/rubocop-notarize.rb
|
47
|
+
- lib/rubocop/cop/notarize_cops.rb
|
48
|
+
- lib/rubocop/cop/performance/disable_reload.rb
|
49
|
+
- lib/rubocop/cop/performance/require_file_open_block.rb
|
50
|
+
- lib/rubocop/cop/security/disable_chdir.rb
|
51
|
+
- lib/rubocop/cop/sidekiq/require_sidekiq_testing_inline_block.rb
|
52
|
+
- lib/rubocop/cop/style/disable_programmatic_enum_value.rb
|
53
|
+
- lib/rubocop/cop/style/graph_camelize.rb
|
54
|
+
- lib/rubocop/notarize.rb
|
55
|
+
- lib/rubocop/notarize/inject.rb
|
56
|
+
- lib/rubocop/notarize/version.rb
|
57
|
+
- rubocop-notarize.gemspec
|
58
|
+
homepage:
|
59
|
+
licenses: []
|
60
|
+
metadata:
|
61
|
+
rubygems_mfa_required: 'true'
|
62
|
+
post_install_message:
|
63
|
+
rdoc_options: []
|
64
|
+
require_paths:
|
65
|
+
- lib
|
66
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
67
|
+
requirements:
|
68
|
+
- - ">="
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: 3.2.2
|
71
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
requirements: []
|
77
|
+
rubygems_version: 3.4.10
|
78
|
+
signing_key:
|
79
|
+
specification_version: 4
|
80
|
+
summary: Create Linting rules for Notarize platform
|
81
|
+
test_files: []
|