standard 1.30.1 → 1.31.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: 8c00678665803420723c8674b59d3c618e2164a9e469946ccccabed971f56149
4
- data.tar.gz: 738c3f9610cb74a41aac35aec29348e6282b6f8018ed83dd80f831e723081e39
3
+ metadata.gz: 002e91f1a7cc58f3bb2134d4195d2ad5be941842ce37374ddfddac9c5b7a975c
4
+ data.tar.gz: 3025493f6232f3619cda1ef5b3df3f5b295e3dc0987b1c973980e2cd27c000cf
5
5
  SHA512:
6
- metadata.gz: 69eb144ed7790c19699edaf481ab4caf3b3805039ef94b180d711846767a352cdb87cdc71daeafd5240a78b6cda85573ee248605257d05641046d3a22165667a
7
- data.tar.gz: 7ea6b6cd83b1768181ab075fa7f408281da76b22dff644c2ff1e7425543a8606a2a0f6ee81b59f69e46bcab53d0c176caa2d7034bc6dc16f57bb893797ffaa38
6
+ metadata.gz: a684388cf7f73ccb34252d06a4917a503f6d18f5c891bc65b265182a5da2ef7942ff6a4e2a305a2e12335395912e7fd065d0d342b69f2eb1fa3b52498e507a4f
7
+ data.tar.gz: 36c3b05697342e8df9ec59a2a21f8aced1f28bbc5dc46ceaa0d7521a0beb162211644e7ba40377a2ac7d8c0d1044dd834dabf1d3da6a6e8377a4b091a2fb9afd
data/.gitignore CHANGED
@@ -8,3 +8,4 @@
8
8
  /tmp/
9
9
  /dont_call_it_tmp/
10
10
  /vendor/
11
+ /.tool-versions
data/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.31.1
4
+
5
+ * Updates rubocop to [1.52.2](https://github.com/rubocop/rubocop/releases/tag/v1.52.2)
6
+
7
+ ## 1.31.0
8
+
9
+ * Updates standard-performance to [v1.2.0](https://github.com/standardrb/standard-performance/releases/tag/v1.2.0)
10
+ * Updates rubocop to [1.56.0](https://github.com/rubocop/rubocop/releases/tag/v1.56.0)
11
+
3
12
  ## 1.30.1
4
13
 
5
14
  * Just kidding about about `Standard::PluginSupport`. Moving it to `LintRoller::Support`
data/Gemfile.lock CHANGED
@@ -1,27 +1,28 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- standard (1.30.1)
4
+ standard (1.31.1)
5
5
  language_server-protocol (~> 3.17.0.2)
6
6
  lint_roller (~> 1.0)
7
- rubocop (~> 1.52.0)
7
+ rubocop (~> 1.56.2)
8
8
  standard-custom (~> 1.0.0)
9
- standard-performance (~> 1.1.0)
9
+ standard-performance (~> 1.2)
10
10
 
11
11
  GEM
12
12
  remote: https://rubygems.org/
13
13
  specs:
14
14
  ast (2.4.2)
15
+ base64 (0.1.1)
15
16
  docile (1.4.0)
16
17
  gimme (0.5.0)
17
18
  json (2.6.3)
18
19
  language_server-protocol (3.17.0.3)
19
- lint_roller (1.0.0)
20
+ lint_roller (1.1.0)
20
21
  m (1.6.1)
21
22
  method_source (>= 0.6.7)
22
23
  rake (>= 0.9.2.2)
23
24
  method_source (1.0.0)
24
- minitest (5.18.0)
25
+ minitest (5.19.0)
25
26
  parallel (1.23.0)
26
27
  parser (3.2.2.3)
27
28
  ast (~> 2.4.1)
@@ -30,20 +31,22 @@ GEM
30
31
  rainbow (3.1.1)
31
32
  rake (13.0.6)
32
33
  regexp_parser (2.8.1)
33
- rexml (3.2.5)
34
- rubocop (1.52.1)
34
+ rexml (3.2.6)
35
+ rubocop (1.56.2)
36
+ base64 (~> 0.1.1)
35
37
  json (~> 2.3)
38
+ language_server-protocol (>= 3.17.0)
36
39
  parallel (~> 1.10)
37
40
  parser (>= 3.2.2.3)
38
41
  rainbow (>= 2.2.2, < 4.0)
39
42
  regexp_parser (>= 1.8, < 3.0)
40
43
  rexml (>= 3.2.5, < 4.0)
41
- rubocop-ast (>= 1.28.0, < 2.0)
44
+ rubocop-ast (>= 1.28.1, < 2.0)
42
45
  ruby-progressbar (~> 1.7)
43
46
  unicode-display_width (>= 2.4.0, < 3.0)
44
47
  rubocop-ast (1.29.0)
45
48
  parser (>= 3.2.1.0)
46
- rubocop-performance (1.18.0)
49
+ rubocop-performance (1.19.0)
47
50
  rubocop (>= 1.7.0, < 2.0)
48
51
  rubocop-ast (>= 0.4.0)
49
52
  ruby-progressbar (1.13.0)
@@ -53,11 +56,12 @@ GEM
53
56
  simplecov_json_formatter (~> 0.1)
54
57
  simplecov-html (0.12.3)
55
58
  simplecov_json_formatter (0.1.4)
56
- standard-custom (1.0.1)
59
+ standard-custom (1.0.2)
57
60
  lint_roller (~> 1.0)
58
- standard-performance (1.1.0)
59
- lint_roller (~> 1.0)
60
- rubocop-performance (~> 1.18.0)
61
+ rubocop (~> 1.50)
62
+ standard-performance (1.2.0)
63
+ lint_roller (~> 1.1)
64
+ rubocop-performance (~> 1.19.0)
61
65
  unicode-display_width (2.4.2)
62
66
 
63
67
  PLATFORMS
data/README.md CHANGED
@@ -450,12 +450,14 @@ default rulesets, just as you would any other gem:
450
450
  ```yaml
451
451
  require:
452
452
  - standard
453
+ - standard-custom
454
+ - standard-performance
453
455
  - rubocop-performance
454
456
 
455
457
  inherit_gem:
456
458
  standard: config/base.yml
457
- standard-performance: config/base.yml
458
459
  standard-custom: config/base.yml
460
+ standard-performance: config/base.yml
459
461
  ```
460
462
 
461
463
  ## Who uses Standard Ruby?
@@ -463,10 +465,12 @@ inherit_gem:
463
465
  Here are a few examples of Ruby Standard-compliant teams & projects:
464
466
 
465
467
  * [Test Double](https://testdouble.com/agency)
468
+ * [AlchemyCMS](https://alchemy-cms.com)
466
469
  * [Amazon Web Services](https://aws.amazon.com/)
467
470
  * [Arrows](https://arrows.to/)
468
471
  * [Avo Admin](https://avohq.io/)
469
472
  * [Babylist](https://www.babylist.com/)
473
+ * [BLISH](https://blish.cloud)
470
474
  * [Brand New Box](https://brandnewbox.com)
471
475
  * [Brave Software](https://github.com/brave-intl/publishers)
472
476
  * [Collective Idea](https://collectiveidea.com/)
@@ -504,6 +508,38 @@ If you really want to show off, you can also add a badge to your project's READM
504
508
  [![Ruby Code Style](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://github.com/standardrb/standard)
505
509
  ```
506
510
 
511
+ ## Help, I'm seeing an install error!
512
+
513
+ This section is really only here to feed Google, but if you see an error like
514
+ any of the following:
515
+
516
+ ```
517
+ ERROR: Could not find a valid gem 'standard' (= 0.0.36) in any repository
518
+ ```
519
+
520
+ ```
521
+ Could not find gem 'standard (= 0.0.36)' in rubygems repository https://rubygems.org/ or installed locally.
522
+ ```
523
+
524
+ ```
525
+ Your bundle is locked to standard (0.0.36) from rubygems repository https://rubygems.org/ or installed locally, but that version can no longer be found in that source. That means the author of standard (0.0.36) has removed it. You'll need to update your bundle to a version other than standard (0.0.36) that hasn't been removed in order to install.
526
+ ```
527
+
528
+ This is because on August 18th, 2023, we yanked versions 0.0.1~0.0.36.1 from
529
+ [RubyGems.org](https://rubygems.org) for the reasons discussed in [this
530
+ issue](https://github.com/standardrb/standard/issues/340). Because these
531
+ versions are now over four years old and no longer track supported versions of
532
+ Ruby or RuboCop, the correct fix for any of the above errors is probably to
533
+ **upgrade to the latest version of Standard Ruby**.
534
+
535
+ If for whatever reason you need to install one of these versions, you can
536
+ change your Gemfile to point to the corresponding git tag from the source
537
+ repository:
538
+
539
+ ```ruby
540
+ gem "standard", git: "https://github.com/testdouble/standard.git", tag: "v0.0.36"
541
+ ```
542
+
507
543
  ## Code of Conduct
508
544
 
509
545
  This project follows Test Double's [code of
data/config/base.yml CHANGED
@@ -5,6 +5,9 @@ Bundler/DuplicatedGem:
5
5
  - '**/Gemfile'
6
6
  - '**/gems.rb'
7
7
 
8
+ Bundler/DuplicatedGroup:
9
+ Enabled: false
10
+
8
11
  Bundler/GemComment:
9
12
  Enabled: false
10
13
 
@@ -602,6 +605,9 @@ Lint/MissingCopEnableDirective:
602
605
  Lint/MissingSuper:
603
606
  Enabled: false
604
607
 
608
+ Lint/MixedCaseRange:
609
+ Enabled: true
610
+
605
611
  Lint/MixedRegexpCaptureTypes:
606
612
  Enabled: true
607
613
 
@@ -668,6 +674,9 @@ Lint/RedundantCopEnableDirective:
668
674
  Lint/RedundantDirGlobSort:
669
675
  Enabled: false
670
676
 
677
+ Lint/RedundantRegexpQuantifiers:
678
+ Enabled: true
679
+
671
680
  Lint/RedundantRequireStatement:
672
681
  Enabled: true
673
682
 
@@ -964,7 +973,6 @@ Style/AndOr:
964
973
 
965
974
  Style/ArgumentsForwarding:
966
975
  Enabled: true
967
- AllowOnlyRestArgument: true
968
976
 
969
977
  Style/ArrayCoercion:
970
978
  Enabled: false
@@ -1521,6 +1529,9 @@ Style/RedundantConditional:
1521
1529
  Style/RedundantConstantBase:
1522
1530
  Enabled: false
1523
1531
 
1532
+ Style/RedundantCurrentDirectoryInPath:
1533
+ Enabled: true
1534
+
1524
1535
  Style/RedundantDoubleSplatHashBraces:
1525
1536
  Enabled: true
1526
1537
 
@@ -1560,6 +1571,9 @@ Style/RedundantParentheses:
1560
1571
  Style/RedundantPercentQ:
1561
1572
  Enabled: true
1562
1573
 
1574
+ Style/RedundantRegexpArgument:
1575
+ Enabled: true
1576
+
1563
1577
  Style/RedundantRegexpCharacterClass:
1564
1578
  Enabled: true
1565
1579
 
@@ -1607,6 +1621,9 @@ Style/RescueStandardError:
1607
1621
  Style/ReturnNil:
1608
1622
  Enabled: false
1609
1623
 
1624
+ Style/ReturnNilInPredicateMethodDefinition:
1625
+ Enabled: false
1626
+
1610
1627
  Style/SafeNavigation:
1611
1628
  Enabled: true
1612
1629
  ConvertCodeThatCanStartToReturnNil: false
@@ -1771,7 +1788,8 @@ Style/UnlessElse:
1771
1788
  Enabled: true
1772
1789
 
1773
1790
  Style/UnlessLogicalOperators:
1774
- Enabled: false
1791
+ Enabled: true
1792
+ EnforcedStyle: forbid_mixed_logical_operators
1775
1793
 
1776
1794
  Style/UnpackFirst:
1777
1795
  Enabled: true
@@ -1791,6 +1809,9 @@ Style/WhileUntilModifier:
1791
1809
  Style/WordArray:
1792
1810
  Enabled: false
1793
1811
 
1812
+ Style/YAMLFileRead:
1813
+ Enabled: true
1814
+
1794
1815
  Style/YodaCondition:
1795
1816
  Enabled: true
1796
1817
  EnforcedStyle: forbid_for_all_comparison_operators
data/config/ruby-3.1.yml CHANGED
@@ -5,3 +5,7 @@ AllCops:
5
5
 
6
6
  Style/DataInheritance:
7
7
  Enabled: false
8
+
9
+ Style/ArgumentsForwarding:
10
+ Enabled: true
11
+ AllowOnlyRestArgument: true
data/docs/UPGRADING.md ADDED
@@ -0,0 +1,31 @@
1
+ # Upgrading Standard
2
+
3
+ Since standard now encompasses both a tool itself and a series of plug-ins it makes sense to first update the standard plug-ins and then the standard tool itself. Each plug-in is a configuration for its corresponding rubocop plug-in.
4
+
5
+ The official standard plug-ins that are included in standard are:
6
+
7
+ - **Standard Performance:** corresponding to rubocop-performance
8
+ - **Standard Custom:** for custom cops created for standard
9
+
10
+ ## Updating Standard Plugins
11
+
12
+ 1. Update Rubocop plugin in the gemspec file and gem file.
13
+ 1. Keep standard in the gem file up-to-date. This will bring any testing utilities in standard into the plug-in repository.
14
+ 1. Run bundle exec rake to run the tests
15
+ 1. Configure any cops that need to be configured so that the tests pass
16
+ 1. Update the change log to the best of your ability and title it as unreleased
17
+ 1. Make your commit for these updates and push to the main branch
18
+ 1. Update the version in version.rb and update the version in the Changelog replacing the word “Unreleased”
19
+ 1. Run bundle to write the new version number to the lock file
20
+ 1. Run bundle exec release to release the gem to RubyGems and create the version git tag. Push the tag to GitHub.
21
+
22
+ ## Updating Standard
23
+
24
+ 1. Update Rubocop as well as Standard Performance in the gemspec file and gem file.
25
+ 1. Run bundle exec rake to run the tests
26
+ 1. Configure any cops that need to be configured so that the tests pass
27
+ 1. Update the change log to the best of your ability and title it as unreleased
28
+ 1. Make your commit for these updates and push to the main branch
29
+ 1. Update the version in version.rb and update the version in the Changelog replacing the word “Unreleased”
30
+ 1. Run bundle to write the new version number to the lock file
31
+ 1. Run bundle exec release to release the gem to RubyGems and create the version git tag. Push the tag to GitHub.
@@ -27,7 +27,10 @@ module Standard
27
27
  @writer.write(id: request[:id], result: Proto::Interface::InitializeResult.new(
28
28
  capabilities: Proto::Interface::ServerCapabilities.new(
29
29
  document_formatting_provider: true,
30
- diagnostic_provider: true,
30
+ diagnostic_provider: LanguageServer::Protocol::Interface::DiagnosticOptions.new(
31
+ inter_file_dependencies: false,
32
+ workspace_diagnostics: false
33
+ ),
31
34
  text_document_sync: Proto::Interface::TextDocumentSyncOptions.new(
32
35
  change: Proto::Constant::TextDocumentSyncKind::FULL,
33
36
  open_close: true
@@ -1,3 +1,3 @@
1
1
  module Standard
2
- VERSION = Gem::Version.new("1.30.1")
2
+ VERSION = Gem::Version.new("1.31.1")
3
3
  end
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.52.0"
26
+ spec.add_dependency "rubocop", "~> 1.56.2"
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.1.0"
30
+ spec.add_dependency "standard-performance", "~> 1.2"
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.30.1
4
+ version: 1.31.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-07-07 00:00:00.000000000 Z
11
+ date: 2023-09-08 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.52.0
19
+ version: 1.56.2
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.52.0
26
+ version: 1.56.2
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.1.0
61
+ version: '1.2'
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.1.0
68
+ version: '1.2'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: language_server-protocol
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -120,6 +120,7 @@ files:
120
120
  - docs/ARCHITECTURE.md
121
121
  - docs/NEW_RUBIES.md
122
122
  - docs/RELEASE.md
123
+ - docs/UPGRADING.md
123
124
  - exe/standardrb
124
125
  - lib/standard.rb
125
126
  - lib/standard/base.rb
@@ -182,7 +183,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
182
183
  - !ruby/object:Gem::Version
183
184
  version: '0'
184
185
  requirements: []
185
- rubygems_version: 3.4.14
186
+ rubygems_version: 3.3.3
186
187
  signing_key:
187
188
  specification_version: 4
188
189
  summary: Ruby Style Guide, with linter & automatic code fixer