standard 1.24.3 → 1.25.1

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: cc7f5e2e4baad0d0471e6aba98df29bd5d8bb3db7c4a8fc3557581572a30865b
4
- data.tar.gz: 76083326596e81461fc7cf9664421d4089555d9a3b1a2f8706e2884522379611
3
+ metadata.gz: a1aeeafd87f77c4ff9e85dfb6a1bd37cb31126086348e99e429fedfd09683723
4
+ data.tar.gz: 647e17d2a36f4260e6fb66122f92328b6ad374bc25408b06a4923b75f2b4211d
5
5
  SHA512:
6
- metadata.gz: 47a6281011618bc51cd198c5dad586608d97c64ed05a4146d8549739332d22d70669f24fd9a59e1508c6b1ec6d631387949d589ab97241adf296fd0c2ec5ca22
7
- data.tar.gz: dbca4f6a5c7e0777e93a98f3c6f0f14b4a15210cadcad1c8489f16319e636fe92ee5de19a295389fb3cdec7b73c37bd86510aa7de0b3dd8537f8033766cbd45c
6
+ metadata.gz: 3761917ccc794b141953b287307db706f911d7fba8aaed24222916c50d66fc0c24e24a8e8669ab05e2b3ce2820e2b1094257a963b3b724ce575681ff9dd4a8d8
7
+ data.tar.gz: 50f7c207a9935792796d2ac8fa9797f1afda8062c4ac54482390f62ae46b3d34f5c2a4533dddaad7d12dad8f7201179bf06ea09f1f35d6ff70f8b78396dac63f
data/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.25.1
4
+
5
+ * When in `stdin` mode, don't invoke the RuboCop runner with `parallel: true` to
6
+ avoid an interaction that breaks auto-fixing
7
+ [#530](https://github.com/testdouble/standard/issues/530),
8
+ [#536](https://github.com/testdouble/standard/issues/536)
9
+
10
+ ## 1.25.0
11
+
12
+ * Update rubocop-performance from 1.15.2 to [1.16.0](https://github.com/rubocop/rubocop-performance/releases/tag/v1.16.0)
13
+ * Update rubocop from 1.44.1 to [1.48.1](https://github.com/rubocop/rubocop/releases/tag/v1.48.1)
14
+ * Enabled [Style/DirEmpty](https://docs.rubocop.org/rubocop/cops_style.html#styledirempty)
15
+ * Enabled [Style/RedundantHeredocDelimiterQuotes](https://docs.rubocop.org/rubocop/cops_style.html#styleredundantheredocdelimiterquotes)
16
+
3
17
  ## 1.24.3
4
18
 
5
19
  * _Further_ _further_ _further_ improve `--lsp` server to ignore files correctly
data/Gemfile.lock CHANGED
@@ -1,10 +1,10 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- standard (1.24.3)
4
+ standard (1.25.1)
5
5
  language_server-protocol (~> 3.17.0.2)
6
- rubocop (= 1.44.1)
7
- rubocop-performance (= 1.15.2)
6
+ rubocop (= 1.48.1)
7
+ rubocop-performance (= 1.16.0)
8
8
 
9
9
  GEM
10
10
  remote: https://rubygems.org/
@@ -19,9 +19,9 @@ GEM
19
19
  method_source (>= 0.6.7)
20
20
  rake (>= 0.9.2.2)
21
21
  method_source (1.0.0)
22
- minitest (5.17.0)
22
+ minitest (5.18.0)
23
23
  parallel (1.22.1)
24
- parser (3.2.1.0)
24
+ parser (3.2.1.1)
25
25
  ast (~> 2.4.1)
26
26
  pry (0.14.2)
27
27
  coderay (~> 1.1)
@@ -30,22 +30,22 @@ GEM
30
30
  rake (13.0.6)
31
31
  regexp_parser (2.7.0)
32
32
  rexml (3.2.5)
33
- rubocop (1.44.1)
33
+ rubocop (1.48.1)
34
34
  json (~> 2.3)
35
35
  parallel (~> 1.10)
36
36
  parser (>= 3.2.0.0)
37
37
  rainbow (>= 2.2.2, < 4.0)
38
38
  regexp_parser (>= 1.8, < 3.0)
39
39
  rexml (>= 3.2.5, < 4.0)
40
- rubocop-ast (>= 1.24.1, < 2.0)
40
+ rubocop-ast (>= 1.26.0, < 2.0)
41
41
  ruby-progressbar (~> 1.7)
42
42
  unicode-display_width (>= 2.4.0, < 3.0)
43
- rubocop-ast (1.26.0)
43
+ rubocop-ast (1.27.0)
44
44
  parser (>= 3.2.1.0)
45
- rubocop-performance (1.15.2)
45
+ rubocop-performance (1.16.0)
46
46
  rubocop (>= 1.7.0, < 2.0)
47
47
  rubocop-ast (>= 0.4.0)
48
- ruby-progressbar (1.11.0)
48
+ ruby-progressbar (1.13.0)
49
49
  simplecov (0.22.0)
50
50
  docile (~> 1.1)
51
51
  simplecov-html (~> 0.11)
data/README.md CHANGED
@@ -200,19 +200,6 @@ community conventions higher than personal style. This might not make sense for
200
200
  place for newbies. Setting up clear, automated contributor expectations makes a
201
201
  project healthier.
202
202
 
203
- ## Usage via RuboCop
204
-
205
- If you only want to use Standard's rules while continuing to use RuboCop's CLI
206
- (for example, to continue using your favorite IDE/tooling/workflow with RuboCop
207
- support), you can configure this in your `.rubocop.yml`:
208
-
209
- ```yaml
210
- require: standard
211
-
212
- inherit_gem:
213
- standard: config/base.yml
214
- ```
215
-
216
203
  ## Who uses Ruby Standard Style?
217
204
 
218
205
  Here are a few examples of Ruby Standard-compliant teams & projects:
@@ -242,6 +229,7 @@ Here are a few examples of Ruby Standard-compliant teams & projects:
242
229
  * [Rebase Interactive](https://www.rebaseinteractive.com/)
243
230
  * [Renuo](https://www.renuo.ch/)
244
231
  * [RubyCI](https://ruby.ci)
232
+ * [Teamtailor](https://www.teamtailor.com/)
245
233
  * [thoughtbot](https://thoughtbot.com/)
246
234
 
247
235
  Does your team use Standard? [Add your name to the list](https://github.com/testdouble/standard/edit/main/README.md)!
@@ -430,7 +418,7 @@ and `rake standard` will also execute the default configuration of the
430
418
  `rubocop-rails` gem without needing to invoke `rubocop` separately.
431
419
 
432
420
  For a slightly more complex example, we could add the
433
- [https://github.com/Betterment/betterlint] gem from our friends at
421
+ [betterlint](https://github.com/Betterment/betterlint) gem from our friends at
434
422
  [Betterment](https://www.betterment.com), first by telling Standard where our
435
423
  configuration file is:
436
424
 
@@ -475,11 +463,25 @@ Standard (like `TargetRubyVersion`) or prevent Standard's own rules from running
475
463
  `extend_config`, note that their resulting RuboCop configurations will be merged
476
464
  in order (i.e. last-in-wins).
477
465
 
478
- If you find that Standard's `extend_config` feature doesn't meet your needs,
479
- Evil Martians also maintains [a regularly updated
466
+ ### Usage via RuboCop
467
+
468
+ If you find that Standard's `extend_config` feature doesn't meet your needs or
469
+ if you only want to use Standard's rules while continuing to use RuboCop's CLI
470
+ (e.g., to continue using your favorite IDE/tooling/workflow with RuboCop
471
+ support) Evil Martians also maintains [a regularly updated
480
472
  guide](https://evilmartians.com/chronicles/rubocoping-with-legacy-bring-your-ruby-code-up-to-standard)
481
473
  on how to configure RuboCop to load and execute Standard's ruleset.
482
474
 
475
+ In short, you can configure this in your `.rubocop.yml` to load Standard's
476
+ ruleset like any other gem:
477
+
478
+ ```yaml
479
+ require: standard
480
+
481
+ inherit_gem:
482
+ standard: config/base.yml
483
+ ```
484
+
483
485
  ## How do I change the output?
484
486
 
485
487
  Standard's built-in formatter is intentionally minimal, printing only unfixed
data/config/base.yml CHANGED
@@ -855,6 +855,9 @@ Metrics/BlockNesting:
855
855
  Metrics/ClassLength:
856
856
  Enabled: false
857
857
 
858
+ Metrics/CollectionLiteralLength:
859
+ Enabled: false
860
+
858
861
  Metrics/CyclomaticComplexity:
859
862
  Enabled: false
860
863
 
@@ -1246,6 +1249,9 @@ Style/DefWithParentheses:
1246
1249
  Style/Dir:
1247
1250
  Enabled: true
1248
1251
 
1252
+ Style/DirEmpty:
1253
+ Enabled: true
1254
+
1249
1255
  Style/DisableCopsWithinSourceCodeDirective:
1250
1256
  Enabled: false
1251
1257
 
@@ -1325,6 +1331,9 @@ Style/ExponentialNotation:
1325
1331
  Style/FetchEnvVar:
1326
1332
  Enabled: false
1327
1333
 
1334
+ Style/FileEmpty:
1335
+ Enabled: false
1336
+
1328
1337
  Style/FileRead:
1329
1338
  Enabled: true
1330
1339
 
@@ -1692,6 +1701,9 @@ Style/RedundantFileExtensionInRequire:
1692
1701
  Style/RedundantFreeze:
1693
1702
  Enabled: true
1694
1703
 
1704
+ Style/RedundantHeredocDelimiterQuotes:
1705
+ Enabled: true
1706
+
1695
1707
  Style/RedundantInitialize:
1696
1708
  Enabled: true
1697
1709
 
data/config/ruby-2.3.yml CHANGED
@@ -5,3 +5,6 @@ AllCops:
5
5
 
6
6
  Style/ComparableClamp:
7
7
  Enabled: false
8
+
9
+ Style/DirEmpty:
10
+ Enabled: false
@@ -30,7 +30,8 @@ module Standard
30
30
  diagnostic_provider: true,
31
31
  execute_command_provider: true,
32
32
  text_document_sync: Proto::Interface::TextDocumentSyncOptions.new(
33
- change: Proto::Constant::TextDocumentSyncKind::FULL
33
+ change: Proto::Constant::TextDocumentSyncKind::FULL,
34
+ open_close: true
34
35
  )
35
36
  )
36
37
  ))
@@ -6,7 +6,7 @@ module Standard
6
6
  def call(config)
7
7
  rubocop_runner = RuboCop::CLI::Command::ExecuteRunner.new(
8
8
  RuboCop::CLI::Environment.new(
9
- config.rubocop_options,
9
+ without_parallelizing_in_stdin_mode(config.rubocop_options),
10
10
  config.rubocop_config_store,
11
11
  config.paths
12
12
  )
@@ -14,6 +14,19 @@ module Standard
14
14
 
15
15
  rubocop_runner.run
16
16
  end
17
+
18
+ private
19
+
20
+ # This is a workaround for an issue with how `parallel` and `stdin`
21
+ # interact when invoked in this way. See:
22
+ # https://github.com/testdouble/standard/issues/536
23
+ def without_parallelizing_in_stdin_mode(options)
24
+ if options[:stdin]
25
+ options.delete(:parallel)
26
+ end
27
+
28
+ options
29
+ end
17
30
  end
18
31
  end
19
32
  end
@@ -1,3 +1,3 @@
1
1
  module Standard
2
- VERSION = Gem::Version.new("1.24.3")
2
+ VERSION = Gem::Version.new("1.25.1")
3
3
  end
data/standard.gemspec CHANGED
@@ -19,8 +19,8 @@ Gem::Specification.new do |spec|
19
19
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
20
  spec.require_paths = ["lib"]
21
21
 
22
- spec.add_dependency "rubocop", "1.44.1"
23
- spec.add_dependency "rubocop-performance", "1.15.2"
22
+ spec.add_dependency "rubocop", "1.48.1"
23
+ spec.add_dependency "rubocop-performance", "1.16.0"
24
24
 
25
25
  # not semver: first three are lsp protocol version, last is patch
26
26
  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.24.3
4
+ version: 1.25.1
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-02-11 00:00:00.000000000 Z
11
+ date: 2023-03-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 1.44.1
19
+ version: 1.48.1
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.44.1
26
+ version: 1.48.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rubocop-performance
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 1.15.2
33
+ version: 1.16.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 1.15.2
40
+ version: 1.16.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: language_server-protocol
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -138,7 +138,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
138
138
  - !ruby/object:Gem::Version
139
139
  version: '0'
140
140
  requirements: []
141
- rubygems_version: 3.3.26
141
+ rubygems_version: 3.4.6
142
142
  signing_key:
143
143
  specification_version: 4
144
144
  summary: Ruby Style Guide, with linter & automatic code fixer