standard 1.28.5 → 1.30.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9cacd9a7826b5f1ba936886338d0da0c09fc0c6ce117b080bc790d1f9e5e7640
4
- data.tar.gz: bbcc3b1ad40d9d40b96b0ba497fde48ed827cb0a54083b582a84021f85ed36ea
3
+ metadata.gz: b17c9efa5e16ef81d493ca9044fb993a0d7c7deac41d30fbf659017267921573
4
+ data.tar.gz: 5168903cd15b8733663ee2de10965128e9621c095b9e31ec8edf27836eccaa18
5
5
  SHA512:
6
- metadata.gz: 635184ab9f254a00940b37189ebdf2dacec5edc385af855efab0abf4723ef649b7fe1790fce79287a0e5114fdc791559723ec1a5c16031c00631c89a57634f63
7
- data.tar.gz: '07148ca7aecc5c9b08763bea32623dafdf222f1c9366dc52dd6238ed32a2288cdbbfa188999e615b3c668501958dbfb7f1765e9c6229d3ad09c8de6a35c4f820'
6
+ metadata.gz: 054b9c7768a59c0c90719083f2c3e03f5579926ff2a4d80bd564971a4d922041f67666a7eaad57b46edf119eff9fecf0d2878efa010a656e6c9d1564718b032f
7
+ data.tar.gz: c57756fc025f736248cc725222196599dbe43c4efc8c093dddfac557335dd7fd273f85f233803d631f7492091295719a1cf23823083889105ae911b7dea90715
@@ -16,7 +16,7 @@ jobs:
16
16
  strategy:
17
17
  matrix:
18
18
  os: [ubuntu-latest]
19
- ruby-version: [2.6, 2.7, '3.0', 3.1, 3.2, head]
19
+ ruby-version: [2.7, '3.0', 3.1, 3.2, head]
20
20
 
21
21
  runs-on: ${{ matrix.os }}
22
22
 
data/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.30.0
4
+
5
+ * Add `Standard::PluginSupport` module of classes designed to make it a little
6
+ easier to author plugins. `MergesUpstreamMetadata#merge` will allow a minimal
7
+ YAML config (say, `standard-sorbet`'s, which only contains `Enabled` values for
8
+ each rule) to merge in any other defaults from a source YAML (e.g.
9
+ `rubocop-sorbet`'s which includes `Description`, `VersionAdded`, and so on).
10
+ This way that metadata is neither absent at runtime nor duplicated in a standard
11
+ plugin that mirrors a rubocop extension
12
+
13
+ ## 1.29.0
14
+
15
+ * Updates standard-performance to [1.1.0](https://github.com/standardrb/standard-performance/releases/tag/v1.1.0)
16
+ * Updates rubocop to [1.52.0](https://github.com/rubocop/rubocop/releases/tag/v1.52.0)
17
+ * Enables Style/ExactRegexpMatch, Style/RedundantArrayConstructor, Style/RedundantFilterChain, Style/RedundantRegexpConstructor
18
+
3
19
  ## 1.28.5
4
20
 
5
21
  * Make LSP behave more nicely with nvim-lspconfig [#564](https://github.com/standardrb/standard/pull/564)
data/Gemfile.lock CHANGED
@@ -1,12 +1,12 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- standard (1.28.5)
4
+ standard (1.30.0)
5
5
  language_server-protocol (~> 3.17.0.2)
6
6
  lint_roller (~> 1.0)
7
- rubocop (~> 1.50.2)
7
+ rubocop (~> 1.52.0)
8
8
  standard-custom (~> 1.0.0)
9
- standard-performance (~> 1.0.1)
9
+ standard-performance (~> 1.1.0)
10
10
 
11
11
  GEM
12
12
  remote: https://rubygems.org/
@@ -23,25 +23,27 @@ GEM
23
23
  method_source (1.0.0)
24
24
  minitest (5.18.0)
25
25
  parallel (1.23.0)
26
- parser (3.2.2.1)
26
+ parser (3.2.2.3)
27
27
  ast (~> 2.4.1)
28
+ racc
29
+ racc (1.7.1)
28
30
  rainbow (3.1.1)
29
31
  rake (13.0.6)
30
- regexp_parser (2.8.0)
32
+ regexp_parser (2.8.1)
31
33
  rexml (3.2.5)
32
- rubocop (1.50.2)
34
+ rubocop (1.52.1)
33
35
  json (~> 2.3)
34
36
  parallel (~> 1.10)
35
- parser (>= 3.2.0.0)
37
+ parser (>= 3.2.2.3)
36
38
  rainbow (>= 2.2.2, < 4.0)
37
39
  regexp_parser (>= 1.8, < 3.0)
38
40
  rexml (>= 3.2.5, < 4.0)
39
41
  rubocop-ast (>= 1.28.0, < 2.0)
40
42
  ruby-progressbar (~> 1.7)
41
43
  unicode-display_width (>= 2.4.0, < 3.0)
42
- rubocop-ast (1.28.1)
44
+ rubocop-ast (1.29.0)
43
45
  parser (>= 3.2.1.0)
44
- rubocop-performance (1.16.0)
46
+ rubocop-performance (1.18.0)
45
47
  rubocop (>= 1.7.0, < 2.0)
46
48
  rubocop-ast (>= 0.4.0)
47
49
  ruby-progressbar (1.13.0)
@@ -51,11 +53,11 @@ GEM
51
53
  simplecov_json_formatter (~> 0.1)
52
54
  simplecov-html (0.12.3)
53
55
  simplecov_json_formatter (0.1.4)
54
- standard-custom (1.0.0)
56
+ standard-custom (1.0.1)
55
57
  lint_roller (~> 1.0)
56
- standard-performance (1.0.1)
58
+ standard-performance (1.1.0)
57
59
  lint_roller (~> 1.0)
58
- rubocop-performance (~> 1.16.0)
60
+ rubocop-performance (~> 1.18.0)
59
61
  unicode-display_width (2.4.2)
60
62
 
61
63
  PLATFORMS
data/config/base.yml CHANGED
@@ -1153,6 +1153,8 @@ Style/EvalWithLocation:
1153
1153
  Style/EvenOdd:
1154
1154
  Enabled: false
1155
1155
 
1156
+ Style/ExactRegexpMatch:
1157
+ Enabled: true
1156
1158
  Style/ExpandPathArguments:
1157
1159
  Enabled: false
1158
1160
 
@@ -1498,6 +1500,9 @@ Style/RandomWithOffset:
1498
1500
  Style/RedundantArgument:
1499
1501
  Enabled: false
1500
1502
 
1503
+ Style/RedundantArrayConstructor:
1504
+ Enabled: true
1505
+
1501
1506
  Style/RedundantAssignment:
1502
1507
  Enabled: true
1503
1508
 
@@ -1531,6 +1536,9 @@ Style/RedundantFetchBlock:
1531
1536
  Style/RedundantFileExtensionInRequire:
1532
1537
  Enabled: true
1533
1538
 
1539
+ Style/RedundantFilterChain:
1540
+ Enabled: false
1541
+
1534
1542
  Style/RedundantFreeze:
1535
1543
  Enabled: true
1536
1544
 
@@ -1555,6 +1563,9 @@ Style/RedundantPercentQ:
1555
1563
  Style/RedundantRegexpCharacterClass:
1556
1564
  Enabled: true
1557
1565
 
1566
+ Style/RedundantRegexpConstructor:
1567
+ Enabled: true
1568
+
1558
1569
  Style/RedundantRegexpEscape:
1559
1570
  Enabled: true
1560
1571
 
data/config/ruby-1.9.yml CHANGED
@@ -5,3 +5,7 @@ Style/Encoding:
5
5
 
6
6
  Style/HashConversion:
7
7
  Enabled: false
8
+
9
+ # Percent delimiters are not supported until Ruby 2.0
10
+ Style/PercentLiteralDelimiters:
11
+ Enabled: false
data/docs/ARCHITECTURE.md CHANGED
@@ -8,7 +8,9 @@ buried.
8
8
  Starting with version 1.28.0, Standard Ruby introduced plugin support and
9
9
  refactored how it loads its own rules from one large YAML file into several
10
10
  plugins. As a result, what was a single `standard` gem is now spread across 3
11
- gems. Here's how it's all organized:
11
+ gems.
12
+
13
+ Here's how it's all organized:
12
14
 
13
15
  * [standard](https://github.com/standardrb/standard) - The main gem. The one
14
16
  people install and think of. Because `standard` has a hard dependency on `rubocop`,
@@ -0,0 +1,23 @@
1
+ module Standard
2
+ module PluginSupport
3
+ class MergesUpstreamMetadata
4
+ def merge(plugin_yaml, upstream_yaml)
5
+ common_upstream_values = upstream_yaml.select { |key| plugin_yaml.key?(key) }
6
+
7
+ plugin_yaml.merge(common_upstream_values) { |key, plugin_value, upstream_value|
8
+ if plugin_value.is_a?(Hash) && upstream_value.is_a?(Hash)
9
+ plugin_value.merge(upstream_value) { |sub_key, plugin_sub_value, upstream_sub_value|
10
+ if plugin_value.key?(sub_key)
11
+ plugin_sub_value
12
+ else
13
+ upstream_sub_value
14
+ end
15
+ }
16
+ else
17
+ plugin_value
18
+ end
19
+ }
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1 @@
1
+ require "standard/plugin_support/merges_upstream_metadata"
@@ -1,3 +1,3 @@
1
1
  module Standard
2
- VERSION = Gem::Version.new("1.28.5")
2
+ VERSION = Gem::Version.new("1.30.0")
3
3
  end
data/lib/standard.rb CHANGED
@@ -11,6 +11,6 @@ require "standard/cli"
11
11
  require "standard/railtie" if defined?(Rails) && defined?(Rails::Railtie)
12
12
 
13
13
  require "standard/formatter"
14
- require "standard/cop/block_single_line_braces"
15
14
 
16
15
  require "standard/plugin"
16
+ require "standard/plugin_support"
data/standard.gemspec CHANGED
@@ -23,11 +23,11 @@ Gem::Specification.new do |spec|
23
23
  spec.require_paths = ["lib"]
24
24
  spec.metadata["rubygems_mfa_required"] = "true"
25
25
 
26
- spec.add_dependency "rubocop", "~> 1.50.2"
26
+ spec.add_dependency "rubocop", "~> 1.52.0"
27
27
 
28
28
  spec.add_dependency "lint_roller", "~> 1.0"
29
29
  spec.add_dependency "standard-custom", "~> 1.0.0"
30
- spec.add_dependency "standard-performance", "~> 1.0.1"
30
+ spec.add_dependency "standard-performance", "~> 1.1.0"
31
31
 
32
32
  # not semver: first three are lsp protocol version, last is patch
33
33
  spec.add_dependency "language_server-protocol", "~> 3.17.0.2"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: standard
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.28.5
4
+ version: 1.30.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Searls
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-05-31 00:00:00.000000000 Z
11
+ date: 2023-07-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.50.2
19
+ version: 1.52.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 1.50.2
26
+ version: 1.52.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: lint_roller
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 1.0.1
61
+ version: 1.1.0
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 1.0.1
68
+ version: 1.1.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: language_server-protocol
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -148,6 +148,8 @@ files:
148
148
  - lib/standard/plugin/initializes_plugins.rb
149
149
  - lib/standard/plugin/merges_plugins_into_rubocop_config.rb
150
150
  - lib/standard/plugin/standardizes_configured_plugins.rb
151
+ - lib/standard/plugin_support.rb
152
+ - lib/standard/plugin_support/merges_upstream_metadata.rb
151
153
  - lib/standard/railtie.rb
152
154
  - lib/standard/rake.rb
153
155
  - lib/standard/resolves_yaml_option.rb
@@ -182,7 +184,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
182
184
  - !ruby/object:Gem::Version
183
185
  version: '0'
184
186
  requirements: []
185
- rubygems_version: 3.4.10
187
+ rubygems_version: 3.4.14
186
188
  signing_key:
187
189
  specification_version: 4
188
190
  summary: Ruby Style Guide, with linter & automatic code fixer