standard 1.26.0 → 1.28.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/CHANGELOG.md +23 -0
- data/Gemfile +6 -4
- data/Gemfile.lock +15 -12
- data/LICENSE.txt +3 -4
- data/README.md +353 -463
- data/bin/console +0 -4
- data/bin/run +9 -0
- data/config/base.yml +9 -161
- data/config/default.yml +9 -0
- data/config/ruby-2.2.yml +0 -3
- data/config/ruby-2.6.yml +3 -0
- data/config/ruby-3.0.yml +1 -1
- data/config/ruby-3.1.yml +7 -0
- data/docs/ARCHITECTURE.md +31 -0
- data/lib/standard/base/plugin.rb +65 -0
- data/lib/standard/base.rb +8 -0
- data/lib/standard/creates_config_store/assigns_rubocop_yaml.rb +1 -35
- data/lib/standard/creates_config_store/merges_user_config_extensions.rb +21 -51
- data/lib/standard/creates_config_store.rb +2 -0
- data/lib/standard/formatter.rb +1 -1
- data/lib/standard/loads_yaml_config.rb +1 -0
- data/lib/standard/plugin/combines_plugin_configs.rb +15 -0
- data/lib/standard/plugin/creates_runner_context.rb +15 -0
- data/lib/standard/plugin/determines_class_constant.rb +56 -0
- data/lib/standard/plugin/initializes_plugins.rb +23 -0
- data/lib/standard/plugin/merges_plugins_into_rubocop_config.rb +158 -0
- data/lib/standard/plugin/standardizes_configured_plugins.rb +37 -0
- data/lib/standard/plugin.rb +11 -0
- data/lib/standard/railtie.rb +1 -1
- data/lib/standard/runners/help.rb +2 -2
- data/lib/standard/runners/rubocop.rb +1 -1
- data/lib/standard/version.rb +1 -1
- data/lib/standard.rb +5 -2
- data/standard.gemspec +9 -3
- metadata +52 -9
- data/lib/standard/cop/block_single_line_braces.rb +0 -96
data/README.md
CHANGED
@@ -1,293 +1,247 @@
|
|
1
|
-
|
1
|
+
<img src="https://user-images.githubusercontent.com/79303/233717126-9fd13e6d-9a66-4f1c-b40c-fe875cb1d1b4.png" style="width: 100%"/>
|
2
2
|
|
3
|
-
[![Tests](https://github.com/
|
4
|
-
[![Ruby Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://github.com/
|
3
|
+
[![Tests](https://github.com/standardrb/standard/actions/workflows/test.yml/badge.svg)](https://github.com/standardrb/standard/actions/workflows/test.yml)
|
4
|
+
[![Ruby Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://github.com/standardrb/standard)
|
5
5
|
[![Gem Version](https://badge.fury.io/rb/standard.svg)](https://rubygems.org/gems/standard)
|
6
6
|
|
7
|
-
|
8
|
-
|
7
|
+
The `standard` gem brings the ethos of [StandardJS](https://standardjs.com) to
|
8
|
+
Ruby. It's a linter & formatter built on
|
9
|
+
[RuboCop](https://github.com/rubocop/rubocop) and provides an **unconfigurable
|
10
|
+
configuration** to all of RuboCop's built-in rules as well as those included in
|
11
|
+
[rubocop-performance](https://github.com/rubocop/rubocop-performance). It also
|
12
|
+
supports plugins built with
|
13
|
+
[lint_roller](https://github.com/standardrb/lint_roller), like
|
14
|
+
[standard-rails](https://github.com/standardrb/standard-rails).
|
15
|
+
|
16
|
+
Standard Ruby was created and is maintained by the team at [Test
|
17
|
+
Double](https://testdouble.com), because we appreciate the importance of
|
18
|
+
balancing predictably consistent code with preserving developers' autonomy. 💚
|
19
|
+
|
20
|
+
Topics covered in this README:
|
21
|
+
|
22
|
+
* [Wait, what?!](#wait-did-you-say-unconfigurable-configuration)
|
23
|
+
* [Basic usage](#usage)
|
24
|
+
* [Editor & CI integrations](#integrating-standard-into-your-workflow)
|
25
|
+
* [Ignoring errors](#ignoring-errors)
|
26
|
+
* [Configuration options](#configuring-standard)
|
27
|
+
* [Plugins and extensions](#extending-standard)
|
28
|
+
* [Community](#who-uses-standard-ruby)
|
29
|
+
|
30
|
+
## Wait, did you say unconfigurable configuration?
|
31
|
+
|
32
|
+
Yes, Standard is unconfigurable. See, pretty much every developer can agree that
|
33
|
+
automatically identifying and fixing slow, insecure, and error-prone code is a
|
34
|
+
good idea. People also agree it's easier to work in codebases that exhibit a
|
35
|
+
consistent style and format. So, what's the problem? **No two developers will
|
36
|
+
ever agree on what all the rules and format should be.**
|
37
|
+
|
38
|
+
This has resulted in innumerable teams arguing how to configure their linters
|
39
|
+
and formatters over literal decades. Some teams routinely divert time and energy
|
40
|
+
from whatever they're building to reach concensus on where commas should go.
|
41
|
+
Other teams have an overzealous tech lead who sets up everything _his favorite
|
42
|
+
way_ and then imposes his will on others. It's not uncommon to witness
|
43
|
+
passive-aggressive programmers change a contentious rule back-and-forth,
|
44
|
+
resulting in both acrimony and git churn (and acrimony _about_ git churn).
|
45
|
+
Still, most developers give way to whoever cares more, often resulting in an
|
46
|
+
inconsistent configuration that nobody understands and isn't kept up-to-date
|
47
|
+
with changes to their linter and its target language. Whatever the approach,
|
48
|
+
time spent
|
49
|
+
[bikeshedding](https://blog.testdouble.com/posts/2019-09-17-bike-shed-history/)
|
50
|
+
is time wasted.
|
51
|
+
|
52
|
+
**But you can't configure Standard Ruby.** You can take it or leave it. If this
|
53
|
+
seems presumptive, constraining, and brusque: you're right, it usually does feel
|
54
|
+
that way at first. But [since
|
55
|
+
2018](https://www.youtube.com/watch?v=uLyV5hOqGQ8), the Ruby community has
|
56
|
+
debated Standard Ruby's ruleset, ultimately landing us on a
|
57
|
+
[sensible](/config/base.yml)
|
58
|
+
[set](https://github.com/standardrb/standard-performance/blob/main/config/base.yml)
|
59
|
+
of
|
60
|
+
[defaults](https://github.com/standardrb/standard-custom/blob/main/config/base.yml)
|
61
|
+
that—_while no one person's favorite way to format Ruby_—seems to be good enough
|
62
|
+
for most of the ways people use Ruby, most of the time.
|
63
|
+
|
64
|
+
If you adopt Standard Ruby, what's in it for you? Time saved that would've been
|
65
|
+
spent arguing over how to set things up. Also, seamless upgrades: we stay on top
|
66
|
+
of each new RuboCop rule ship an updated configuration on a monthly release
|
67
|
+
cadence. But the best part of adopting Standard as your linter and formatter?
|
68
|
+
You'll spend a whole lot less time thinking about linters and formatters.
|
69
|
+
|
70
|
+
So please, give Standard Ruby a try. If you're like [these
|
71
|
+
folks](#who-uses-standard-ruby), you'll soon realize that the value of a linter
|
72
|
+
is in using one at all and not in the particulars of how it's configured.
|
9
73
|
|
10
|
-
|
11
|
-
project. Just drop it in.
|
12
|
-
* **Automatically format code.** Just run `standardrb --fix` and say goodbye to
|
13
|
-
messy or inconsistent code.
|
14
|
-
* **Catch style issues & programmer errors early.** Save precious code review
|
15
|
-
time by eliminating back-and-forth between reviewer & contributor.
|
74
|
+
## Usage
|
16
75
|
|
17
|
-
|
18
|
-
⚡](https://www.youtube.com/watch?v=uLyV5hOqGQ8) about it.
|
76
|
+
### Install
|
19
77
|
|
20
|
-
|
78
|
+
Getting started is as easy as `gem install standard` or throwing it in your
|
79
|
+
project's Gemfile:
|
21
80
|
|
22
81
|
```ruby
|
23
82
|
gem "standard", group: [:development, :test]
|
24
83
|
```
|
25
84
|
|
26
|
-
|
27
|
-
|
28
|
-
```ruby
|
29
|
-
$ bundle exec standardrb
|
30
|
-
```
|
85
|
+
### Running Standard
|
31
86
|
|
32
|
-
|
33
|
-
flag.
|
87
|
+
Once installed, you can either run it as a CLI or as a Rake task.
|
34
88
|
|
35
|
-
|
36
|
-
|
37
|
-
variant to our default `rake` task after our test command, similar to this:
|
89
|
+
The CLI is called `standardrb` to distinguish it from
|
90
|
+
[StandardJS](https://github.com/standard/standard):
|
38
91
|
|
39
|
-
```ruby
|
40
|
-
task default: [:test, "standard:fix"]
|
41
92
|
```
|
42
|
-
|
43
|
-
## StandardRB — The Rules
|
44
|
-
|
45
|
-
- **2 spaces** – for indentation
|
46
|
-
- **Double quotes for string literals** - because pre-committing to whether
|
47
|
-
you'll need interpolation in a string slows people down
|
48
|
-
- **1.9 hash syntax** - When all the keys in a hash literal are symbols,
|
49
|
-
Standard enforces Ruby 1.9's `{hash: syntax}`
|
50
|
-
- **Braces for single-line blocks** - Require `{`/`}` for one-line blocks, but
|
51
|
-
allow either braces or `do`/`end` for multiline blocks. Like using `do`/`end`
|
52
|
-
for multiline blocks? Prefer `{`/`}` when chaining? A fan of expressing intent
|
53
|
-
with Jim Weirich's [semantic
|
54
|
-
block](http://www.virtuouscode.com/2011/07/26/the-procedurefunction-block-convention-in-ruby/)
|
55
|
-
approach? Standard lets you do you!
|
56
|
-
- **Leading dots on multi-line method chains** - chosen for
|
57
|
-
[these](https://github.com/testdouble/standard/issues/75) reasons.
|
58
|
-
- **Spaces inside blocks, but not hash literals** - In Ruby, the `{` and `}`
|
59
|
-
characters do a lot of heavy lifting. To visually distinguish hash literals
|
60
|
-
from blocks, Standard enforces that (like arrays), no leading or trailing
|
61
|
-
spaces be added to pad hashes
|
62
|
-
- **And a good deal more**
|
63
|
-
|
64
|
-
If you're familiar with [RuboCop](https://github.com/rubocop-hq/rubocop), you
|
65
|
-
can look at Standard's current base configuration in
|
66
|
-
[config/base.yml](/config/base.yml). In lieu of a separate changelog file,
|
67
|
-
significant changes to the configuration will be documented as [GitHub release
|
68
|
-
notes](https://github.com/testdouble/standard/releases).
|
69
|
-
|
70
|
-
## Usage
|
71
|
-
|
72
|
-
Once you've installed Standard, you should be able to use the `standardrb`
|
73
|
-
program. The simplest use case would be checking the style of all Ruby
|
74
|
-
files in the current working directory:
|
75
|
-
|
76
|
-
```bash
|
77
|
-
$ bundle exec standardrb
|
78
|
-
standard: Use Ruby Standard Style (https://github.com/testdouble/standard)
|
79
|
-
standard: Run `standardrb --fix` to potentially fix one problem.
|
80
|
-
/Users/jill/code/cli.rb:31:23: Style/Semicolon: Do not use semicolons to terminate expressions.
|
93
|
+
$ standardrb
|
81
94
|
```
|
82
95
|
|
83
|
-
|
84
|
-
|
85
|
-
`standardrb` instead of your shell:
|
96
|
+
And the Rake task can be run if your Rakefile includes `require
|
97
|
+
"standard/rake"`. This will load the `standard` task, allowing you to run:
|
86
98
|
|
87
|
-
```bash
|
88
|
-
$ bundle exec standardrb "lib/**/*.rb" test
|
89
99
|
```
|
90
|
-
|
91
|
-
**Note:** by default, StandardRB will look for all `*.rb` files (and some other
|
92
|
-
files typically associated with Ruby like `*.gemspec` and `Gemfile`)
|
93
|
-
|
94
|
-
If you want to add Standard to an existing project, but don't want to stop all
|
95
|
-
development until you've fixed every violation in every file, you can create a
|
96
|
-
backlog of to-be-converted files by generating a TODO file:
|
97
|
-
|
98
|
-
```bash
|
99
|
-
$ bundle exec standardrb --generate-todo
|
100
|
+
$ rake standard
|
100
101
|
```
|
101
102
|
|
102
|
-
|
103
|
-
|
104
|
-
|
103
|
+
Either way, Standard will inspect any Ruby files found in the current directory
|
104
|
+
tree. If any errors are found, it'll report them. If your code is
|
105
|
+
standard-compliant, it will get out of your way by quietly exiting code 0.
|
105
106
|
|
106
|
-
|
107
|
-
can also regenerate the TODO file at any time by re-running the above command.
|
107
|
+
### Fixing errors
|
108
108
|
|
109
|
-
|
109
|
+
A majority of Standard's rules can be safely fixed automatically.
|
110
110
|
|
111
|
-
|
112
|
-
|
113
|
-
|
111
|
+
```
|
112
|
+
# CLI
|
113
|
+
$ standard --fix
|
114
114
|
|
115
|
-
|
116
|
-
|
115
|
+
# Rake
|
116
|
+
$ rake standard:fix
|
117
117
|
```
|
118
118
|
|
119
|
-
|
119
|
+
Because we're confident Standard's fixes won't change the behavior of our code,
|
120
|
+
we typically run with fix enabled _all the time_ because it saves us from having
|
121
|
+
to look at and think about problems the computer can solve for us.
|
120
122
|
|
121
|
-
|
122
|
-
$ rake standard # equivalent to running `standardrb`
|
123
|
-
$ rake standard:fix # equivalent to running `standardrb --fix`
|
124
|
-
$ rake standard:fix_unsafely # equivalent to running `standardrb --fix-unsafely`
|
125
|
-
```
|
123
|
+
### Applying unsafe fixes
|
126
124
|
|
127
|
-
|
128
|
-
|
129
|
-
|
125
|
+
There are a number of other rules that can be automatically remedied, but not
|
126
|
+
without the risk of changing your code's behavior. While we wouldn't recommend
|
127
|
+
running it all the time, if the CLI suggests that additional errors can be fixed
|
128
|
+
_unsafely_, here's how to do that:
|
130
129
|
|
131
130
|
```
|
132
|
-
#
|
133
|
-
$
|
131
|
+
# CLI
|
132
|
+
$ standardrb --fix-unsafely
|
134
133
|
|
135
|
-
#
|
136
|
-
$ rake standard
|
134
|
+
# Rake
|
135
|
+
$ rake standard:fix_unsafely
|
137
136
|
```
|
138
137
|
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
Here's an example yaml file with every option set:
|
138
|
+
So long as your code is checked into source control, there's no mortal harm in
|
139
|
+
running with unsafe fixes enabled. If the changes look good to you and your
|
140
|
+
tests pass, then it's probably less error prone than manually editing everything
|
141
|
+
by hand.
|
145
142
|
|
146
|
-
|
147
|
-
fix: true # default: false
|
148
|
-
parallel: true # default: false
|
149
|
-
format: progress # default: Standard::Formatter
|
150
|
-
ruby_version: 2.3.3 # default: RUBY_VERSION
|
151
|
-
default_ignores: false # default: true
|
143
|
+
## Integrating Standard into your workflow
|
152
144
|
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
- Layout/AlignHash
|
158
|
-
```
|
145
|
+
Because code formatting is so integral to programming productivity and linter
|
146
|
+
violations risk becoming bugs if released into production, tools like
|
147
|
+
Standard Ruby are only as useful as their integration into code editors and
|
148
|
+
continuous integration systems.
|
159
149
|
|
160
|
-
|
161
|
-
cannot be found by ascending the current working directory (i.e., against a
|
162
|
-
temporary file buffer in your editor), you can specify the config location with
|
163
|
-
`--config path/to/.standard.yml`. (Similarly, for the `.standard_todo.yml` file,
|
164
|
-
you can specify `--todo path/to/.standard_todo.yml`.)
|
150
|
+
### Editor support
|
165
151
|
|
166
|
-
|
152
|
+
We've added a number of editing guides for getting started:
|
167
153
|
|
168
|
-
|
169
|
-
[
|
170
|
-
|
154
|
+
- [VS Code](https://github.com/standardrb/vscode-standard-ruby)
|
155
|
+
- [vim](https://github.com/standardrb/standard/wiki/IDE:-vim)
|
156
|
+
- [neovim](https://github.com/standardrb/standard/wiki/IDE:-neovim)
|
157
|
+
- [RubyMine](https://www.jetbrains.com/help/ruby/rubocop.html#disable_rubocop)
|
158
|
+
- [emacs](https://github.com/julianrubisch/flycheck-standardrb)
|
159
|
+
- [Atom](https://github.com/standardrb/standard/wiki/IDE:-Atom)
|
171
160
|
|
172
|
-
|
173
|
-
|
174
|
-
|
161
|
+
If you'd like to help by creating a guide, please draft one [in an
|
162
|
+
issue](https://github.com/standardrb/standard/issues/new) and we'll get it
|
163
|
+
added!
|
175
164
|
|
176
|
-
|
165
|
+
#### Language Server Protocol support
|
177
166
|
|
178
|
-
|
179
|
-
|
180
|
-
|
167
|
+
If you don't see your preferred editor above, Standard Ruby also ships with a
|
168
|
+
built-in [language
|
169
|
+
server](https://microsoft.github.io/language-server-protocol/) that many modern
|
170
|
+
editors can support natively, even without a Standard-specific plugin.
|
181
171
|
|
182
|
-
|
183
|
-
maintain multiple hundred-line style configuration files for every module/project
|
184
|
-
they work on. Enough of this madness!
|
172
|
+
You can run the server by supplying the `--lsp` flag:
|
185
173
|
|
186
|
-
|
174
|
+
```
|
175
|
+
standard --lsp
|
176
|
+
```
|
187
177
|
|
188
|
-
|
189
|
-
|
190
|
-
- **Automatically format code.** Just run `standardrb --fix` and say goodbye to
|
191
|
-
messy or inconsistent code.
|
192
|
-
- **Catch style issues & programmer errors early.** Save precious code review
|
193
|
-
time by eliminating back-and-forth between reviewer & contributor.
|
194
|
-
- **Deliberate pace.** We strive to take the hassle of upgrading Rubocop out of each
|
195
|
-
individual team's hands and shoulder it ourselves. We enable about ~20% of new
|
196
|
-
cops and generally choose conservative configurations for them.
|
178
|
+
If your editor offers LSP support, it probably has a place to configure the
|
179
|
+
above command and will subsequently manage the server process for you.
|
197
180
|
|
198
|
-
|
199
|
-
community conventions higher than personal style. This might not make sense for
|
200
|
-
100% of projects and development cultures, however open source can be a hostile
|
201
|
-
place for newbies. Setting up clear, automated contributor expectations makes a
|
202
|
-
project healthier.
|
181
|
+
### CI support
|
203
182
|
|
204
|
-
|
183
|
+
Various continuous integration and quality-checking tools have been made to
|
184
|
+
support Standard Ruby, as well.
|
205
185
|
|
206
|
-
|
186
|
+
* [Github Actions](https://github.com/andrewmcodes/standardrb-action)
|
187
|
+
* [Code Climate](https://github.com/standardrb/standard/wiki/CI:-Code-Climate)
|
188
|
+
* [Pronto](https://github.com/julianrubisch/pronto-standardrb)
|
189
|
+
* [Danger](https://github.com/ashfurrow/danger-rubocop/)
|
207
190
|
|
208
|
-
|
209
|
-
|
210
|
-
* [Arrows](https://arrows.to/)
|
211
|
-
* [Avo Admin](https://avohq.io/)
|
212
|
-
* [Babylist](https://www.babylist.com/)
|
213
|
-
* [Brand New Box](https://brandnewbox.com)
|
214
|
-
* [Brave Software](https://github.com/brave-intl/publishers)
|
215
|
-
* [Collective Idea](https://collectiveidea.com/)
|
216
|
-
* [Culture Foundry](https://www.culturefoundry.com/)
|
217
|
-
* [Elevate Labs](https://elevatelabs.com)
|
218
|
-
* [Envoy](https://www.envoy.com)
|
219
|
-
* [Evil Martians](https://evilmartians.com)
|
220
|
-
* [Firstline](https://firstline.org/)
|
221
|
-
* [Hashrocket](https://hashrocket.com)
|
222
|
-
* [Honeybadger](https://www.honeybadger.io)
|
223
|
-
* [JetThoughts](https://www.jetthoughts.com/)
|
224
|
-
* [Level UP Solutions](https://levups.com)
|
225
|
-
* [Monterail](https://www.monterail.com)
|
226
|
-
* [myRent](https://www.myrent.co.nz)
|
227
|
-
* [Oyster](https://www.oysterhr.com/)
|
228
|
-
* [Planet Argon](https://www.planetargon.com/)
|
229
|
-
* [Podia](https://www.podia.com/)
|
230
|
-
* [Rebase Interactive](https://www.rebaseinteractive.com/)
|
231
|
-
* [Renuo](https://www.renuo.ch/)
|
232
|
-
* [RubyCI](https://ruby.ci)
|
233
|
-
* [Spinal](https://spinalcms.com/)
|
234
|
-
* [Teamtailor](https://www.teamtailor.com/)
|
235
|
-
* [thoughtbot](https://thoughtbot.com/)
|
191
|
+
Of course, no special plugin is necessary to run Standard Ruby in a CI
|
192
|
+
environment, as `standardrb` and `rake standard` work just fine on their own!
|
236
193
|
|
237
|
-
|
194
|
+
### Other tools
|
238
195
|
|
239
|
-
|
196
|
+
These tool integrations are also available:
|
240
197
|
|
241
|
-
|
242
|
-
|
243
|
-
style.
|
198
|
+
* [Guard](https://github.com/JodyVanden/guard-standardrb)
|
199
|
+
* [Spring](https://github.com/lakim/spring-commands-standard)
|
244
200
|
|
245
|
-
|
201
|
+
## Ignoring errors
|
246
202
|
|
247
|
-
|
248
|
-
|
249
|
-
|
203
|
+
While Standard is very strict in how each formatting and linting rule is configured,
|
204
|
+
it's mercifully flexible when you need to ignore a violation to focus on a higher
|
205
|
+
priority (like, say, keeping the build running). There are a number of ways to
|
206
|
+
ignore any errors, with the right answer depending on the situation.
|
250
207
|
|
251
|
-
|
208
|
+
### Ignoring a line with a comment
|
252
209
|
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
whole philosophy of Standard -- it's a bunch of sensible 'just pick something'
|
259
|
-
opinions. Hopefully, users see the value in that over defending their own
|
260
|
-
opinions.
|
210
|
+
Individual lines can be ignored with a comment directive at the end of the line.
|
211
|
+
As an example, the line `text = 'hi'` violates two rules,
|
212
|
+
[Lint/UselessAssignment](https://docs.rubocop.org/rubocop/cops_lint.html#lintuselessassignment)
|
213
|
+
and
|
214
|
+
[Style/StringLiterals](https://docs.rubocop.org/rubocop/cops_style.html#stylestringliterals).
|
261
215
|
|
262
|
-
|
263
|
-
you could spend your time solving! :P
|
216
|
+
You could ignore one, both, or all errors with the following comments:
|
264
217
|
|
265
|
-
|
218
|
+
```ruby
|
219
|
+
# Disable one error but keep Lint/UselessAssignment
|
220
|
+
text = 'hi' # standard:disable Style/StringLiterals
|
266
221
|
|
267
|
-
|
222
|
+
# Disable both errors explicitly
|
223
|
+
text = 'hi' # standard:disable Style/StringLiterals, Lint/UselessAssignment
|
268
224
|
|
269
|
-
|
270
|
-
|
225
|
+
# Disable all errors on the line with "all"
|
226
|
+
text = "hi" # standard:disable all
|
227
|
+
```
|
271
228
|
|
272
|
-
|
273
|
-
will also perform fixes, even if they run the risk of altering program behavior.
|
274
|
-
If you read your git diffs closely and have good tests, this is often okay, but
|
275
|
-
YMMV… it's called unsafe for a reason!
|
229
|
+
### Ignoring multiple lines with comments
|
276
230
|
|
277
|
-
|
231
|
+
Similarly to individual lines, you can also disable multiple lines by wrapping
|
232
|
+
them in comments that disable and re-enable them:
|
278
233
|
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
234
|
+
```ruby
|
235
|
+
# standard:disable Style/StringLiterals, Lint/UselessAssignment
|
236
|
+
text = "hi"
|
237
|
+
puts 'bye'
|
238
|
+
# standard:enable Style/StringLiterals, Lint/UselessAssignment
|
239
|
+
```
|
285
240
|
|
286
|
-
|
241
|
+
### Ignoring entire files and globs
|
287
242
|
|
288
|
-
|
289
|
-
|
290
|
-
list of files and globs that should be excluded:
|
243
|
+
You can ignore entire files and file patterns by adding them to `ignore:` in
|
244
|
+
your project's `.standard.yml` file:
|
291
245
|
|
292
246
|
```yaml
|
293
247
|
ignore:
|
@@ -295,159 +249,173 @@ ignore:
|
|
295
249
|
- 'a/whole/directory/**/*'
|
296
250
|
```
|
297
251
|
|
298
|
-
|
299
|
-
[here](https://github.com/testdouble/standard/blob/main/lib/standard/creates_config_store/configures_ignored_paths.rb#L3-L13)
|
252
|
+
### Ignoring specific rules in files and globs
|
300
253
|
|
301
|
-
|
302
|
-
|
303
|
-
In rare cases, you'll need to break a rule and hide the warning generated by
|
304
|
-
Standard.
|
305
|
-
|
306
|
-
Ruby Standard Style uses [RuboCop](https://github.com/rubocop-hq/rubocop)
|
307
|
-
under-the-hood and you can hide warnings as you normally would if you used
|
308
|
-
RuboCop directly.
|
309
|
-
|
310
|
-
To ignore only certain rules from certain globs (not recommended, but maybe your
|
311
|
-
test suite uses a non-standardable DSL, you can specify an array of RuboCop
|
312
|
-
rules to ignore for a particular glob:
|
254
|
+
For a given file or glob, you can even ignore only specific rules by nesting an
|
255
|
+
array of the rules you'd like to ignore:
|
313
256
|
|
314
257
|
```yaml
|
315
258
|
ignore:
|
316
259
|
- 'test/**/*':
|
317
|
-
- Layout/
|
260
|
+
- Layout/AlignHash
|
318
261
|
```
|
319
262
|
|
320
|
-
|
321
|
-
|
322
|
-
You can also use special comments to disable all or certain rules within your
|
323
|
-
source code.
|
263
|
+
### Ignoring every violation and converting them into a todo list
|
324
264
|
|
325
|
-
|
265
|
+
If you're adopting Standard in a large codebase and you don't want to convert
|
266
|
+
everything all at once, you can work incrementally by generating a "todo" file
|
267
|
+
which will cause Standard to ignore every violation present in each file of the
|
268
|
+
codebase.
|
326
269
|
|
327
|
-
|
328
|
-
|
329
|
-
|
270
|
+
This way, you can gradually work through the todo list, removing ignore
|
271
|
+
directives and fixing any associated errors, while also being alerted to any
|
272
|
+
regressions if they're introduced into the project.
|
330
273
|
|
331
|
-
|
274
|
+
Here are the commands you might run to get started:
|
332
275
|
|
333
276
|
```
|
334
|
-
|
277
|
+
# Start by clearing any auto-fixable errors:
|
278
|
+
$ standardrb --fix
|
279
|
+
|
280
|
+
# Generate a `.standard_todo.yml' to work from
|
281
|
+
$ standardrb --generate-todo
|
335
282
|
```
|
336
283
|
|
337
|
-
|
284
|
+
## Configuring Standard
|
338
285
|
|
339
|
-
|
340
|
-
|
341
|
-
```
|
286
|
+
While the rules aren't configurable, Standard offers a number of options that
|
287
|
+
can be configured as CLI flags and YAML properties.
|
342
288
|
|
343
|
-
|
344
|
-
suppress the error and Standard would succeed.
|
289
|
+
### CLI flags
|
345
290
|
|
346
|
-
|
347
|
-
open and closing directives like this:
|
291
|
+
The easiest way to summarize the available CLI flags is to invoke `standardrb -h`:
|
348
292
|
|
349
|
-
```ruby
|
350
|
-
# standard:disable Layout/IndentationWidth
|
351
|
-
def foo
|
352
|
-
123
|
353
|
-
end
|
354
|
-
# standard:enable Layout/IndentationWidth
|
355
293
|
```
|
294
|
+
Usage: standardrb [--fix] [--lsp] [-vh] [--format <name>] [--] [FILE]...
|
356
295
|
|
357
|
-
|
358
|
-
substitute its name for "all". This line actually triggers three different
|
359
|
-
violations, so we can suppress them like this:
|
296
|
+
Options:
|
360
297
|
|
361
|
-
|
362
|
-
|
363
|
-
|
298
|
+
--fix Apply automatic fixes that we're confident won't break your code
|
299
|
+
--fix-unsafely Apply even more fixes, including some that may change code behavior
|
300
|
+
--no-fix Do not automatically fix failures
|
301
|
+
--format <name> Format output with any RuboCop formatter (e.g. "json")
|
302
|
+
--generate-todo Create a .standard_todo.yml that lists all the files that contain errors
|
303
|
+
--lsp Start a LSP server listening on STDIN
|
304
|
+
-v, --version Print the version of Standard
|
305
|
+
-V, --verbose-version Print the version of Standard and its dependencies.
|
306
|
+
-h, --help Print this message
|
307
|
+
FILE Files to lint [default: ./]
|
364
308
|
|
365
|
-
|
309
|
+
Standard also forwards most CLI arguments to RuboCop. To see them, run:
|
366
310
|
|
367
|
-
|
368
|
-
|
369
|
-
that's MRI 2.3 and newer. While Standard can't avoid this runtime requirement,
|
370
|
-
it does allow you to lint codebases that target Ruby versions older than 2.3 by
|
371
|
-
narrowing the ruleset somewhat.
|
311
|
+
$ rubocop --help
|
312
|
+
```
|
372
313
|
|
373
|
-
Standard
|
374
|
-
|
375
|
-
down, you can specify `ruby_version` in `.standard.yml`.
|
314
|
+
If you run Standard via Rake, you can specify your CLI flags in an environment
|
315
|
+
variable named `STANDARDOPTS` like so:
|
376
316
|
|
377
317
|
```
|
378
|
-
|
318
|
+
$ rake standard STANDARDOPTS="--format progress"
|
379
319
|
```
|
380
320
|
|
381
|
-
|
382
|
-
[testdouble/suture](https://github.com/testdouble/suture/blob/main/.standard.yml)
|
383
|
-
for an example.
|
321
|
+
### YAML options
|
384
322
|
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
the runtime, RuboCop may behave in surprising or inconsistent ways.
|
323
|
+
In addition to CLI flags, Standard will search for a `.standard.yml` file
|
324
|
+
(ascending to parent directories if the current working directory doesn't
|
325
|
+
contain one). If you find yourself repeatedly running Standard with the same
|
326
|
+
CLI options, it probably makes more sense to set it once in a YAML file:
|
390
327
|
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
328
|
+
```yaml
|
329
|
+
fix: true # default: false
|
330
|
+
parallel: true # default: false
|
331
|
+
format: progress # default: Standard::Formatter
|
332
|
+
ruby_version: 3.0 # default: RUBY_VERSION
|
333
|
+
default_ignores: false # default: true
|
396
334
|
|
397
|
-
|
335
|
+
ignore: # default: []
|
336
|
+
- 'vendor/**/*'
|
398
337
|
|
399
|
-
|
400
|
-
|
401
|
-
YAML](https://docs.rubocop.org/rubocop/configuration.html) files and
|
402
|
-
`.standard.yml` using the "extend_config` setting.
|
338
|
+
plugins: # default: []
|
339
|
+
- standard-rails
|
403
340
|
|
404
|
-
|
405
|
-
|
341
|
+
extend_config: # default: []
|
342
|
+
- .standard_ext.yml
|
343
|
+
```
|
406
344
|
|
407
|
-
|
408
|
-
# .standard.yml
|
345
|
+
#### Configuring ruby_version
|
409
346
|
|
410
|
-
|
411
|
-
|
412
|
-
|
347
|
+
One notable YAML setting is `ruby_version`, which allows you to set the **oldest
|
348
|
+
version of Ruby the project needs to support** [RuboCop's `TargetRubyVersion`
|
349
|
+
setting](https://docs.rubocop.org/rubocop/configuration.html#setting-the-target-ruby-version)
|
350
|
+
explicitly. Because this value is inferred from any `.ruby-version`,
|
351
|
+
`.tool-versions`, `Gemfile.lock`, and `*.gemspec` files that might be present,
|
352
|
+
most applications won't need to set this.
|
413
353
|
|
414
|
-
|
354
|
+
However, gems and libraries that support older versions of Ruby will want
|
355
|
+
to lock the `ruby-version:` explicitly in their `.standard.yml` file to ensure
|
356
|
+
new rules don't break old rubies:
|
415
357
|
|
416
358
|
```yaml
|
417
|
-
|
418
|
-
|
419
|
-
require:
|
420
|
-
- rubocop-rails
|
359
|
+
ruby_version: 2.7
|
421
360
|
```
|
422
361
|
|
423
|
-
|
424
|
-
and `rake standard` will also execute the default configuration of the
|
425
|
-
`rubocop-rails` gem without needing to invoke `rubocop` separately.
|
362
|
+
## Extending Standard
|
426
363
|
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
configuration file is:
|
364
|
+
Standard includes two extension mechanisms: plugins and configuration
|
365
|
+
extensions. While neither can _change_ the rules configured out-of-the-box by
|
366
|
+
Standard, they can define, require, and configure _additional_ RuboCop rules.
|
431
367
|
|
432
|
-
|
433
|
-
|
368
|
+
Both are "first-in-wins", meaning once a rule is configured by a plugin or
|
369
|
+
extension, it can't be changed or reconfigured by a later plugin or extension.
|
370
|
+
This way, each Standard plugin you add becomes a de facto "standard" of its
|
371
|
+
own. Plugins have precedence over extensions as they are loaded first.
|
434
372
|
|
435
|
-
|
436
|
-
|
373
|
+
### Plugins
|
374
|
+
|
375
|
+
Adding a plugin to your project is as easy as adding it to your Gemfile and
|
376
|
+
specifying it in `.standard.yml` in the root of your project. For example, after
|
377
|
+
installing [standard-rails](https://github.com/standardrb/standard-rails), you
|
378
|
+
can configure it by adding it to `plugins`:
|
379
|
+
|
380
|
+
```yaml
|
381
|
+
plugins:
|
382
|
+
- standard-rails
|
437
383
|
```
|
438
384
|
|
439
|
-
|
440
|
-
|
385
|
+
Each plugin can be passed configuration options by specifying them in a nested
|
386
|
+
hash. For example, `standard-rails` allows you to configure its rules for
|
387
|
+
a particular version of Rails (though this will usually be detected for you
|
388
|
+
automatically):
|
441
389
|
|
442
|
-
```
|
443
|
-
|
390
|
+
```yaml
|
391
|
+
plugins:
|
392
|
+
- standard-rails:
|
393
|
+
target_rails_version: 7.0
|
394
|
+
```
|
444
395
|
|
396
|
+
You can develop your own plugins, too! Check out the
|
397
|
+
[lint_roller](https://github.com/standardrb/lint_roller) gem to learn how. For a
|
398
|
+
simple example, you can look at
|
399
|
+
[standard-custom](https://github.com/standardrb/standard-custom), which is one
|
400
|
+
of the default plugins included by Standard.
|
401
|
+
|
402
|
+
### Extended config files
|
403
|
+
|
404
|
+
Of course, you may want to add more rules without going to the trouble
|
405
|
+
of packaging them in a plugin gem. For cases like this, you can define one or
|
406
|
+
more [RuboCop configuration
|
407
|
+
files](https://docs.rubocop.org/rubocop/configuration.html) and then list them
|
408
|
+
in your `.standard.yml` file under `extend_config`.
|
409
|
+
|
410
|
+
For example, after installing the
|
411
|
+
[betterlint](https://github.com/Betterment/betterlint) gem from our friends at
|
412
|
+
[Betterment](https://www.betterment.com), we could create a RuboCop config
|
413
|
+
file named `.betterlint.yml`:
|
414
|
+
|
415
|
+
```yaml
|
445
416
|
require:
|
446
417
|
- rubocop/cop/betterment.rb
|
447
418
|
|
448
|
-
AllCops:
|
449
|
-
DisabledByDefault: true
|
450
|
-
|
451
419
|
Betterment/UnscopedFind:
|
452
420
|
Enabled: true
|
453
421
|
|
@@ -455,157 +423,79 @@ Betterment/UnscopedFind:
|
|
455
423
|
- SystemConfiguration
|
456
424
|
```
|
457
425
|
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
in order (i.e. last-in-wins).
|
472
|
-
|
473
|
-
### Usage via RuboCop
|
474
|
-
|
475
|
-
If you find that Standard's `extend_config` feature doesn't meet your needs or
|
476
|
-
if you only want to use Standard's rules while continuing to use RuboCop's CLI
|
477
|
-
(e.g., to continue using your favorite IDE/tooling/workflow with RuboCop
|
478
|
-
support) Evil Martians also maintains [a regularly updated
|
426
|
+
And then reference it in our `.standard.yml`:
|
427
|
+
|
428
|
+
```yml
|
429
|
+
extend_config:
|
430
|
+
- .betterlint.yml
|
431
|
+
```
|
432
|
+
|
433
|
+
### Running Standard's rules via RuboCop
|
434
|
+
|
435
|
+
If you find that neither plugins or configuration extensions meet your needs or
|
436
|
+
if you have some other reason to run Standard's rules with RuboCop's CLI (e.g.,
|
437
|
+
to continue using your favorite IDE/tooling/workflow with RuboCop support) Evil
|
438
|
+
Martians also maintains [a regularly updated
|
479
439
|
guide](https://evilmartians.com/chronicles/rubocoping-with-legacy-bring-your-ruby-code-up-to-standard)
|
480
440
|
on how to configure RuboCop to load and execute Standard's ruleset.
|
481
441
|
|
482
|
-
In short, you can configure this in your `.rubocop.yml` to load Standard's
|
483
|
-
|
442
|
+
In short, you can configure this in your `.rubocop.yml` to load Standard's three
|
443
|
+
default rulesets, just as you would any other gem:
|
484
444
|
|
485
445
|
```yaml
|
486
|
-
require:
|
446
|
+
require:
|
447
|
+
- standard
|
448
|
+
- rubocop-performance
|
487
449
|
|
488
450
|
inherit_gem:
|
489
451
|
standard: config/base.yml
|
452
|
+
standard-performance: config/base.yml
|
453
|
+
standard-custom: config/base.yml
|
490
454
|
```
|
491
455
|
|
492
|
-
##
|
493
|
-
|
494
|
-
Standard's built-in formatter is intentionally minimal, printing only unfixed
|
495
|
-
failures or (when successful) printing nothing at all. If you'd like to use a
|
496
|
-
different formatter, you can specify any of RuboCop's built-in formatters or
|
497
|
-
write your own.
|
498
|
-
|
499
|
-
For example, if you'd like to see colorful progress dots, you can either run
|
500
|
-
Standard with:
|
501
|
-
|
502
|
-
```
|
503
|
-
$ bundle exec standardrb --format progress
|
504
|
-
Inspecting 15 files
|
505
|
-
...............
|
506
|
-
|
507
|
-
15 files inspected, no offenses detected
|
508
|
-
```
|
509
|
-
|
510
|
-
Or, in your project's `.standard.yml` file, specify:
|
456
|
+
## Who uses Standard Ruby?
|
511
457
|
|
512
|
-
|
513
|
-
format: progress
|
514
|
-
```
|
515
|
-
|
516
|
-
Refer to RuboCop's [documentation on
|
517
|
-
formatters](https://rubocop.readthedocs.io/en/latest/formatters/) for more
|
518
|
-
information.
|
519
|
-
|
520
|
-
## How do I run Standard in my editor?
|
521
|
-
|
522
|
-
It can be very handy to know about failures while editing to shorten the
|
523
|
-
feedback loop.
|
524
|
-
|
525
|
-
### Language Server Protocol support
|
526
|
-
|
527
|
-
To provide immediate feedback of Standard violations and support autofixing
|
528
|
-
of your code while avoiding the performance cost of starting and stopping the
|
529
|
-
`standardrb` binary repeatedly, Standard Ruby ships with a built-in [Language
|
530
|
-
Server Protocol](https://microsoft.github.io/language-server-protocol/) server,
|
531
|
-
which is powered by the [language_server-protocol
|
532
|
-
gem](https://github.com/mtsmfm/language_server-protocol-ruby) and can be
|
533
|
-
activated from the command line with the `--lsp` flag.
|
534
|
-
|
535
|
-
Most likely, you'd instantiate this server indirectly in your editor's
|
536
|
-
configuration, as can be demonstrated easily with
|
537
|
-
[neovim](https://github.com/testdouble/standard/wiki/IDE:-neovim).
|
538
|
-
Theoretically, this feature could be leveraged by a purpose-built editor plugin
|
539
|
-
to performantly format and fix your code. (If you're looking for a project, we'd
|
540
|
-
love to see one created for VS Code!)
|
458
|
+
Here are a few examples of Ruby Standard-compliant teams & projects:
|
541
459
|
|
542
|
-
|
460
|
+
* [Test Double](https://testdouble.com/agency)
|
461
|
+
* [Amazon Web Services](https://aws.amazon.com/)
|
462
|
+
* [Arrows](https://arrows.to/)
|
463
|
+
* [Avo Admin](https://avohq.io/)
|
464
|
+
* [Babylist](https://www.babylist.com/)
|
465
|
+
* [Brand New Box](https://brandnewbox.com)
|
466
|
+
* [Brave Software](https://github.com/brave-intl/publishers)
|
467
|
+
* [Collective Idea](https://collectiveidea.com/)
|
468
|
+
* [Culture Foundry](https://www.culturefoundry.com/)
|
469
|
+
* [Elevate Labs](https://elevatelabs.com)
|
470
|
+
* [Envoy](https://www.envoy.com)
|
471
|
+
* [Evil Martians](https://evilmartians.com)
|
472
|
+
* [Firstline](https://firstline.org/)
|
473
|
+
* [Hashrocket](https://hashrocket.com)
|
474
|
+
* [Honeybadger](https://www.honeybadger.io)
|
475
|
+
* [JetThoughts](https://www.jetthoughts.com/)
|
476
|
+
* [Level UP Solutions](https://levups.com)
|
477
|
+
* [Monterail](https://www.monterail.com)
|
478
|
+
* [myRent](https://www.myrent.co.nz)
|
479
|
+
* [OBLSK](https://oblsk.com/)
|
480
|
+
* [Oyster](https://www.oysterhr.com/)
|
481
|
+
* [Planet Argon](https://www.planetargon.com/)
|
482
|
+
* [PLT4M](https://plt4m.com/)
|
483
|
+
* [Podia](https://www.podia.com/)
|
484
|
+
* [Rebase Interactive](https://www.rebaseinteractive.com/)
|
485
|
+
* [Renuo](https://www.renuo.ch/)
|
486
|
+
* [RubyCI](https://ruby.ci)
|
487
|
+
* [Spinal](https://spinalcms.com/)
|
488
|
+
* [Teamtailor](https://www.teamtailor.com/)
|
489
|
+
* [thoughtbot](https://thoughtbot.com/)
|
543
490
|
|
544
|
-
|
545
|
-
- [emacs (via flycheck)](https://github.com/julianrubisch/flycheck-standardrb)
|
546
|
-
- [RubyMine](https://www.jetbrains.com/help/ruby/rubocop.html#disable_rubocop)
|
547
|
-
- [vim (via ALE)](https://github.com/testdouble/standard/wiki/IDE:-vim)
|
548
|
-
- [neovim (via LSP)](https://github.com/testdouble/standard/wiki/IDE:-neovim)
|
549
|
-
- [VS Code](https://github.com/testdouble/standard/wiki/IDE:-vscode)
|
550
|
-
|
551
|
-
## Why aren't `frozen_string_literal: true` magic comments enforced?
|
552
|
-
|
553
|
-
Standard does not take a stance on whether you should plaster a
|
554
|
-
[frozen_string_literal magic
|
555
|
-
comment](https://docs.ruby-lang.org/en/3.0/doc/syntax/comments_rdoc.html#label-Magic+Comments)
|
556
|
-
directive at the top of every file. Enforcing use of the comment became popular
|
557
|
-
when it was believed that string literals would be frozen by default in a future
|
558
|
-
version of Ruby, but [according to
|
559
|
-
Matz](https://bugs.ruby-lang.org/issues/11473#note-53) there are no (longer any)
|
560
|
-
such plans.
|
561
|
-
|
562
|
-
Aside from one's personal opinion on the degree to which the comment is an
|
563
|
-
eyesore, the decision to include the magic comment at the top of every file
|
564
|
-
listing ought to be made based on the performance characteristics of each
|
565
|
-
project (e.g. whether it defines a significant number of string literals,
|
566
|
-
whether the commensurate memory usage is a material constraint, whether the code
|
567
|
-
is run as a one-off command or a long-lived server application). These tend to
|
568
|
-
indicate whether the magic comment might lead to meaningful reductions in memory
|
569
|
-
usage.
|
570
|
-
|
571
|
-
Because Standard is intended to be used as a default for every kind of Ruby
|
572
|
-
file—from shell scripts to Rails apps—it wouldn't be appropriate for Standard to
|
573
|
-
either enforce or preclude the magic comment. Instead, you might consider
|
574
|
-
either:
|
575
|
-
|
576
|
-
* Measuring memory performance by enabling frozen string literals as
|
577
|
-
the default at runtime (with `RUBYOPT=--enable-frozen-string-literal`)
|
578
|
-
* Introducing the
|
579
|
-
[magic_frozen_string_literal](https://github.com/Invoca/magic_frozen_string_literal)
|
580
|
-
gem to your build, which will automatically ensure that the comment is
|
581
|
-
prepended for every applicable file in your project
|
582
|
-
|
583
|
-
## How often is Standard updated?
|
584
|
-
|
585
|
-
We aim to update Standard once a month, in the first week of the month. In between releases, we'll be considering RuboCop updates, RuboCop Performance updates, and community contributions.
|
586
|
-
|
587
|
-
## Does Standard work with [Insert other tool name here]?
|
588
|
-
|
589
|
-
Maybe! Start by searching the repository to see if there's an existing issue
|
590
|
-
open for the tool you're interested in. That aside, here are other known
|
591
|
-
integrations aside from editor plugins:
|
592
|
-
|
593
|
-
* [Code Climate](https://github.com/testdouble/standard/wiki/CI:-Code-Climate)
|
594
|
-
* [Pronto](https://github.com/julianrubisch/pronto-standardrb)
|
595
|
-
* [Spring](https://github.com/lakim/spring-commands-standard)
|
596
|
-
* [Guard](https://github.com/JodyVanden/guard-standardrb)
|
597
|
-
* [Danger](https://github.com/ashfurrow/danger-rubocop/)
|
491
|
+
Does your team use Standard? [Add your name to the list](https://github.com/standardrb/standard/edit/main/README.md)!
|
598
492
|
|
599
|
-
|
493
|
+
If you really want to show off, you can also add a badge to your project's README, like this one:
|
600
494
|
|
601
|
-
|
495
|
+
[![Ruby Code Style](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://github.com/standardrb/standard)
|
602
496
|
|
603
|
-
```
|
604
|
-
|
605
|
-
$ cd standard
|
606
|
-
$ gem install bundler # if working with ruby version below 2.6.0
|
607
|
-
$ bundle install
|
608
|
-
$ bundle exec rake # to run test suite
|
497
|
+
```md
|
498
|
+
[![Ruby Code Style](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://github.com/standardrb/standard)
|
609
499
|
```
|
610
500
|
|
611
501
|
## Code of Conduct
|