Skip to content

Commit

Permalink
Merge branch 'main' into bug/565-fix-generating-todo-when-todo-file-a…
Browse files Browse the repository at this point in the history
…lready-exists
  • Loading branch information
mrbiggred authored Oct 18, 2023
2 parents 2688546 + 883a92d commit bf8eb75
Show file tree
Hide file tree
Showing 23 changed files with 256 additions and 76 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
ruby-version: [2.6, 2.7, '3.0', 3.1, 3.2, head]
ruby-version: [2.7, '3.0', 3.1, 3.2, head]

runs-on: ${{ matrix.os }}

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
/tmp/
/dont_call_it_tmp/
/vendor/
/.tool-versions
43 changes: 43 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,48 @@
# Changelog

## 1.31.2

* Updates rubocop to [1.52.4](https://github.com/rubocop/rubocop/releases/tag/v1.52.4)
* Updates standard-performance to [v1.2.1](https://github.com/standardrb/standard-performance/releases/tag/v1.2.1)

## 1.31.1

* Updates rubocop to [1.52.2](https://github.com/rubocop/rubocop/releases/tag/v1.52.2)

## 1.31.0

* Updates standard-performance to [v1.2.0](https://github.com/standardrb/standard-performance/releases/tag/v1.2.0)
* Updates rubocop to [1.56.0](https://github.com/rubocop/rubocop/releases/tag/v1.56.0)

## 1.30.1

* Just kidding about about `Standard::PluginSupport`. Moving it to `LintRoller::Support`
to avoid circular dependencies between Standard Ruby and its plugins

## 1.30.0

* Add `Standard::PluginSupport` module of classes designed to make it a little
easier to author plugins. `MergesUpstreamMetadata#merge` will allow a minimal
YAML config (say, `standard-sorbet`'s, which only contains `Enabled` values for
each rule) to merge in any other defaults from a source YAML (e.g.
`rubocop-sorbet`'s which includes `Description`, `VersionAdded`, and so on).
This way that metadata is neither absent at runtime nor duplicated in a standard
plugin that mirrors a rubocop extension

## 1.29.0

* Updates standard-performance to [1.1.0](https://github.com/standardrb/standard-performance/releases/tag/v1.1.0)
* Updates rubocop to [1.52.0](https://github.com/rubocop/rubocop/releases/tag/v1.52.0)
* Enables Style/ExactRegexpMatch, Style/RedundantArrayConstructor, Style/RedundantFilterChain, Style/RedundantRegexpConstructor

## 1.28.5

* Make LSP behave more nicely with nvim-lspconfig [#564](https://github.com/standardrb/standard/pull/564)

## 1.28.4

* Fix [standard-rails#7](https://github.com/standardrb/standard-rails/issues/7#issuecomment-1563505365)

## 1.28.3

* Older ruby support fixes from [@pboling](https://github.com/pboling):
Expand Down
44 changes: 25 additions & 19 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,47 +1,52 @@
PATH
remote: .
specs:
standard (1.28.3)
standard (1.31.2)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.0)
rubocop (~> 1.50.2)
rubocop (~> 1.56.4)
standard-custom (~> 1.0.0)
standard-performance (~> 1.0.1)
standard-performance (~> 1.2)

GEM
remote: https://rubygems.org/
specs:
ast (2.4.2)
base64 (0.1.1)
docile (1.4.0)
gimme (0.5.0)
json (2.6.3)
language_server-protocol (3.17.0.3)
lint_roller (1.0.0)
m (1.6.1)
lint_roller (1.1.0)
m (1.6.2)
method_source (>= 0.6.7)
rake (>= 0.9.2.2)
method_source (1.0.0)
minitest (5.18.0)
minitest (5.20.0)
parallel (1.23.0)
parser (3.2.2.1)
parser (3.2.2.4)
ast (~> 2.4.1)
racc
racc (1.7.1)
rainbow (3.1.1)
rake (13.0.6)
regexp_parser (2.8.0)
rexml (3.2.5)
rubocop (1.50.2)
regexp_parser (2.8.2)
rexml (3.2.6)
rubocop (1.56.4)
base64 (~> 0.1.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.2.0.0)
parser (>= 3.2.2.3)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.28.0, < 2.0)
rubocop-ast (>= 1.28.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.28.1)
rubocop-ast (1.29.0)
parser (>= 3.2.1.0)
rubocop-performance (1.16.0)
rubocop-performance (1.19.1)
rubocop (>= 1.7.0, < 2.0)
rubocop-ast (>= 0.4.0)
ruby-progressbar (1.13.0)
Expand All @@ -51,12 +56,13 @@ GEM
simplecov_json_formatter (~> 0.1)
simplecov-html (0.12.3)
simplecov_json_formatter (0.1.4)
standard-custom (1.0.0)
standard-custom (1.0.2)
lint_roller (~> 1.0)
standard-performance (1.0.1)
lint_roller (~> 1.0)
rubocop-performance (~> 1.16.0)
unicode-display_width (2.4.2)
rubocop (~> 1.50)
standard-performance (1.2.1)
lint_roller (~> 1.1)
rubocop-performance (~> 1.19.1)
unicode-display_width (2.5.0)

PLATFORMS
ruby
Expand Down
40 changes: 38 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ We've added a number of editing guides for getting started:
- [vim](https://github.com/standardrb/standard/wiki/IDE:-vim)
- [neovim](https://github.com/standardrb/standard/wiki/IDE:-neovim)
- [RubyMine](https://www.jetbrains.com/help/ruby/rubocop.html#disable_rubocop)
- [emacs](https://github.com/julianrubisch/flycheck-standardrb)
- [emacs](https://www.flycheck.org/en/latest/languages.html#syntax-checker-ruby-standard)
- [Atom](https://github.com/standardrb/standard/wiki/IDE:-Atom)

If you'd like to help by creating a guide, please draft one [in an
Expand Down Expand Up @@ -450,23 +450,27 @@ default rulesets, just as you would any other gem:
```yaml
require:
- standard
- standard-custom
- standard-performance
- rubocop-performance
inherit_gem:
standard: config/base.yml
standard-performance: config/base.yml
standard-custom: config/base.yml
standard-performance: config/base.yml
```

## Who uses Standard Ruby?

Here are a few examples of Ruby Standard-compliant teams & projects:

* [Test Double](https://testdouble.com/agency)
* [AlchemyCMS](https://alchemy-cms.com)
* [Amazon Web Services](https://aws.amazon.com/)
* [Arrows](https://arrows.to/)
* [Avo Admin](https://avohq.io/)
* [Babylist](https://www.babylist.com/)
* [BLISH](https://blish.cloud)
* [Brand New Box](https://brandnewbox.com)
* [Brave Software](https://github.com/brave-intl/publishers)
* [Collective Idea](https://collectiveidea.com/)
Expand Down Expand Up @@ -504,6 +508,38 @@ If you really want to show off, you can also add a badge to your project's READM
[![Ruby Code Style](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://github.com/standardrb/standard)
```

## Help, I'm seeing an install error!

This section is really only here to feed Google, but if you see an error like
any of the following:

```
ERROR: Could not find a valid gem 'standard' (= 0.0.36) in any repository
```

```
Could not find gem 'standard (= 0.0.36)' in rubygems repository https://rubygems.org/ or installed locally.
```
```
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.
```
This is because on August 18th, 2023, we yanked versions 0.0.1~0.0.36.1 from
[RubyGems.org](https://rubygems.org) for the reasons discussed in [this
issue](https://github.com/standardrb/standard/issues/340). Because these
versions are now over four years old and no longer track supported versions of
Ruby or RuboCop, the correct fix for any of the above errors is probably to
**upgrade to the latest version of Standard Ruby**.
If for whatever reason you need to install one of these versions, you can
change your Gemfile to point to the corresponding git tag from the source
repository:
```ruby
gem "standard", git: "https://github.com/testdouble/standard.git", tag: "v0.0.36"
```

## Code of Conduct

This project follows Test Double's [code of
Expand Down
36 changes: 34 additions & 2 deletions config/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ Bundler/DuplicatedGem:
- '**/Gemfile'
- '**/gems.rb'

Bundler/DuplicatedGroup:
Enabled: false

Bundler/GemComment:
Enabled: false

Expand Down Expand Up @@ -602,6 +605,9 @@ Lint/MissingCopEnableDirective:
Lint/MissingSuper:
Enabled: false

Lint/MixedCaseRange:
Enabled: true

Lint/MixedRegexpCaptureTypes:
Enabled: true

Expand Down Expand Up @@ -668,6 +674,9 @@ Lint/RedundantCopEnableDirective:
Lint/RedundantDirGlobSort:
Enabled: false

Lint/RedundantRegexpQuantifiers:
Enabled: true

Lint/RedundantRequireStatement:
Enabled: true

Expand Down Expand Up @@ -964,7 +973,6 @@ Style/AndOr:

Style/ArgumentsForwarding:
Enabled: true
AllowOnlyRestArgument: true

Style/ArrayCoercion:
Enabled: false
Expand Down Expand Up @@ -1153,6 +1161,8 @@ Style/EvalWithLocation:
Style/EvenOdd:
Enabled: false

Style/ExactRegexpMatch:
Enabled: true
Style/ExpandPathArguments:
Enabled: false

Expand Down Expand Up @@ -1498,6 +1508,9 @@ Style/RandomWithOffset:
Style/RedundantArgument:
Enabled: false

Style/RedundantArrayConstructor:
Enabled: true

Style/RedundantAssignment:
Enabled: true

Expand All @@ -1516,6 +1529,9 @@ Style/RedundantConditional:
Style/RedundantConstantBase:
Enabled: false

Style/RedundantCurrentDirectoryInPath:
Enabled: true

Style/RedundantDoubleSplatHashBraces:
Enabled: true

Expand All @@ -1531,6 +1547,9 @@ Style/RedundantFetchBlock:
Style/RedundantFileExtensionInRequire:
Enabled: true

Style/RedundantFilterChain:
Enabled: false

Style/RedundantFreeze:
Enabled: true

Expand All @@ -1552,9 +1571,15 @@ Style/RedundantParentheses:
Style/RedundantPercentQ:
Enabled: true

Style/RedundantRegexpArgument:
Enabled: true

Style/RedundantRegexpCharacterClass:
Enabled: true

Style/RedundantRegexpConstructor:
Enabled: true

Style/RedundantRegexpEscape:
Enabled: true

Expand Down Expand Up @@ -1596,6 +1621,9 @@ Style/RescueStandardError:
Style/ReturnNil:
Enabled: false

Style/ReturnNilInPredicateMethodDefinition:
Enabled: false

Style/SafeNavigation:
Enabled: true
ConvertCodeThatCanStartToReturnNil: false
Expand Down Expand Up @@ -1760,7 +1788,8 @@ Style/UnlessElse:
Enabled: true

Style/UnlessLogicalOperators:
Enabled: false
Enabled: true
EnforcedStyle: forbid_mixed_logical_operators

Style/UnpackFirst:
Enabled: true
Expand All @@ -1780,6 +1809,9 @@ Style/WhileUntilModifier:
Style/WordArray:
Enabled: false

Style/YAMLFileRead:
Enabled: true

Style/YodaCondition:
Enabled: true
EnforcedStyle: forbid_for_all_comparison_operators
Expand Down
4 changes: 4 additions & 0 deletions config/ruby-1.9.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ Style/Encoding:

Style/HashConversion:
Enabled: false

# Percent delimiters are not supported until Ruby 2.0
Style/PercentLiteralDelimiters:
Enabled: false
4 changes: 4 additions & 0 deletions config/ruby-3.1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ AllCops:

Style/DataInheritance:
Enabled: false

Style/ArgumentsForwarding:
Enabled: true
AllowOnlyRestArgument: true
4 changes: 3 additions & 1 deletion docs/ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ buried.
Starting with version 1.28.0, Standard Ruby introduced plugin support and
refactored how it loads its own rules from one large YAML file into several
plugins. As a result, what was a single `standard` gem is now spread across 3
gems. Here's how it's all organized:
gems.

Here's how it's all organized:

* [standard](https://github.com/standardrb/standard) - The main gem. The one
people install and think of. Because `standard` has a hard dependency on `rubocop`,
Expand Down
Loading

0 comments on commit bf8eb75

Please sign in to comment.