standard 0.4.1 → 0.4.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +32 -0
- data/Gemfile.lock +3 -5
- data/README.md +10 -4
- data/config/base.yml +2 -12
- data/lib/standard/formatter.rb +4 -1
- data/lib/standard/version.rb +1 -1
- data/standard.gemspec +2 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8da9b4adf5c100176f57c6d2e7958d3bdc9d20a842cba35fd24d4e680da26496
|
4
|
+
data.tar.gz: 1bd30e7a596ebaf537daab145a25f6a76a28e2b537a54b0b2f78fca2217841da
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e6c532d9a59e84e8e66dc4348b2517e2aabf26fc9c41d1fe52e81432d39824e44be70d306e059dfef5a3206c027fdceaea5c74eca7f93943dd3b7d6e8fa4904e
|
7
|
+
data.tar.gz: 8db3ea4abffa747c89ebbde1c0bd870fc16384d4bb9d5ebb42785ecac843a9893ac8cf4c67dca4a0218b553a8aa9f4f817f882331f68ab741b294300212e83f6
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,37 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 0.4.6
|
4
|
+
|
5
|
+
* Disable `Naming/BinaryOperatorParameterName` because (when non-ascii method
|
6
|
+
names are used), it incorrectly identifies them as being `+()` operator
|
7
|
+
overrides (overly aggressive)
|
8
|
+
|
9
|
+
## 0.4.5
|
10
|
+
|
11
|
+
* Disable `Naming/AsciiIdentifiers` for the same reason as mentioned below in
|
12
|
+
0.4.4 (specifically to allow programs written in non-Latin languages to define
|
13
|
+
identifiers)
|
14
|
+
|
15
|
+
## 0.4.4
|
16
|
+
|
17
|
+
* Disable `Naming/MethodName` cop. While `snake_case` is the conventional way to
|
18
|
+
name a Ruby method, the cop is too restrictive in that it also prevents
|
19
|
+
non-ASCII characters from being included in method names
|
20
|
+
|
21
|
+
## 0.4.3
|
22
|
+
|
23
|
+
* Improve output of the todo feature
|
24
|
+
|
25
|
+
## 0.4.2
|
26
|
+
|
27
|
+
* Track Rubocop
|
28
|
+
[0.83.0](https://github.com/rubocop-hq/rubocop/blob/master/CHANGELOG.md#0830-2020-05-11)
|
29
|
+
* Update our default to allow trailing whitespace in heredocs
|
30
|
+
* Disable auto-correct for a cop that changed `:true` to `true`, as that's not
|
31
|
+
safe
|
32
|
+
* Allow comments in empty `when` blocks
|
33
|
+
|
34
|
+
|
3
35
|
## 0.4.1
|
4
36
|
|
5
37
|
* add given/given! as `{}` friendly blocks [#172](https://github.com/testdouble/standard/pull/172)
|
data/Gemfile.lock
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
standard (0.4.
|
5
|
-
rubocop (~> 0.
|
4
|
+
standard (0.4.6)
|
5
|
+
rubocop (~> 0.83.0)
|
6
6
|
rubocop-performance (~> 1.5.2)
|
7
7
|
|
8
8
|
GEM
|
@@ -12,7 +12,6 @@ GEM
|
|
12
12
|
coderay (1.1.2)
|
13
13
|
docile (1.3.2)
|
14
14
|
gimme (0.5.0)
|
15
|
-
jaro_winkler (1.5.4)
|
16
15
|
method_source (0.9.2)
|
17
16
|
minitest (5.14.0)
|
18
17
|
parallel (1.19.1)
|
@@ -24,8 +23,7 @@ GEM
|
|
24
23
|
rainbow (3.0.0)
|
25
24
|
rake (13.0.1)
|
26
25
|
rexml (3.2.4)
|
27
|
-
rubocop (0.
|
28
|
-
jaro_winkler (~> 1.5.1)
|
26
|
+
rubocop (0.83.0)
|
29
27
|
parallel (~> 1.10)
|
30
28
|
parser (>= 2.7.0.1)
|
31
29
|
rainbow (>= 2.2.2, < 4.0)
|
data/README.md
CHANGED
@@ -47,7 +47,7 @@ flag.
|
|
47
47
|
- **Leading dots on multi-line method chains** - chosen for
|
48
48
|
[these](https://github.com/testdouble/standard/issues/75) reasons.
|
49
49
|
- **Spaces inside blocks, but not hash literals** - In Ruby, the `{` and `}`
|
50
|
-
characters do a lot of heavy lifting. To visually distinguish
|
50
|
+
characters do a lot of heavy lifting. To visually distinguish hash literals
|
51
51
|
from blocks, Standard enforces that (like arrays), no leading or trailing
|
52
52
|
spaces be added to pad hashes
|
53
53
|
- **And a good deal more**
|
@@ -134,7 +134,7 @@ $ rake standard STANDARDOPTS="lib \"app/**/*\""
|
|
134
134
|
## What you might do if you're clever
|
135
135
|
|
136
136
|
If you want or need to configure Standard, there are a _handful_ of options
|
137
|
-
|
137
|
+
available by creating a `.standard.yml` file in the root of your project.
|
138
138
|
|
139
139
|
Here's an example yaml file with every option set:
|
140
140
|
|
@@ -163,7 +163,7 @@ Similarly, for the `.standard_todo.yml` file, you can specify `--todo path/to/.s
|
|
163
163
|
|
164
164
|
Because StandardRB is essentially a wrapper on top of
|
165
165
|
[RuboCop](https://github.com/rubocop-hq/rubocop), it will actually forward the
|
166
|
-
vast majority of CLI and ENV arguments
|
166
|
+
vast majority of CLI and ENV arguments to RuboCop.
|
167
167
|
|
168
168
|
You can see a list of
|
169
169
|
[RuboCop](https://docs.rubocop.org/en/latest/basic_usage/#other-useful-command-line-flags)'s
|
@@ -257,7 +257,12 @@ problems are fixable, but some errors must be fixed manually.
|
|
257
257
|
|
258
258
|
## Can I override the `fix: true` config setting?
|
259
259
|
|
260
|
-
Also yes! You can use `standardrb --no-fix`. Not `fix`ing is the default
|
260
|
+
Also yes! You can use `standardrb --no-fix`. Not `fix`ing is the default
|
261
|
+
behavior, but this flag will override the `fix: true` setting in your
|
262
|
+
[`.standard.yml` config](#what-you-might-do-if-youre-clever).
|
263
|
+
This is especially useful for checking your project's compliance with
|
264
|
+
`standardrb` in CI environments while keeping the `fix: true` option enabled
|
265
|
+
locally.
|
261
266
|
|
262
267
|
## How do I ignore files?
|
263
268
|
|
@@ -377,6 +382,7 @@ from editor plugins:
|
|
377
382
|
|
378
383
|
* [Pronto](https://github.com/julianrubisch/pronto-standardrb)
|
379
384
|
* [Spring](https://github.com/lakim/spring-commands-standard)
|
385
|
+
* [Guard](https://github.com/JodyVanden/guard-standardrb)
|
380
386
|
|
381
387
|
## Contributing
|
382
388
|
|
data/config/base.yml
CHANGED
@@ -312,7 +312,7 @@ Layout/TrailingEmptyLines:
|
|
312
312
|
|
313
313
|
Layout/TrailingWhitespace:
|
314
314
|
Enabled: true
|
315
|
-
AllowInHeredoc:
|
315
|
+
AllowInHeredoc: true
|
316
316
|
|
317
317
|
Lint/AmbiguousOperator:
|
318
318
|
Enabled: true
|
@@ -329,7 +329,6 @@ Lint/BigDecimalNew:
|
|
329
329
|
|
330
330
|
Lint/BooleanSymbol:
|
331
331
|
Enabled: true
|
332
|
-
AutoCorrect: true
|
333
332
|
|
334
333
|
Lint/CircularArgumentReference:
|
335
334
|
Enabled: true
|
@@ -367,6 +366,7 @@ Lint/EmptyInterpolation:
|
|
367
366
|
|
368
367
|
Lint/EmptyWhen:
|
369
368
|
Enabled: true
|
369
|
+
AllowComments: true
|
370
370
|
|
371
371
|
Lint/EnsureReturn:
|
372
372
|
Enabled: true
|
@@ -537,12 +537,6 @@ Lint/Void:
|
|
537
537
|
Migration/DepartmentName:
|
538
538
|
Enabled: true
|
539
539
|
|
540
|
-
Naming/AsciiIdentifiers:
|
541
|
-
Enabled: true
|
542
|
-
|
543
|
-
Naming/BinaryOperatorParameterName:
|
544
|
-
Enabled: true
|
545
|
-
|
546
540
|
Naming/ClassAndModuleCamelCase:
|
547
541
|
Enabled: true
|
548
542
|
|
@@ -553,10 +547,6 @@ Naming/HeredocDelimiterCase:
|
|
553
547
|
Enabled: true
|
554
548
|
EnforcedStyle: uppercase
|
555
549
|
|
556
|
-
Naming/MethodName:
|
557
|
-
Enabled: true
|
558
|
-
EnforcedStyle: snake_case
|
559
|
-
|
560
550
|
Naming/BlockParameterName:
|
561
551
|
Enabled: true
|
562
552
|
MinNameLength: 1
|
data/lib/standard/formatter.rb
CHANGED
@@ -17,6 +17,10 @@ module Standard
|
|
17
17
|
@any_uncorrected_offenses = false
|
18
18
|
end
|
19
19
|
|
20
|
+
def started(_target_files)
|
21
|
+
print_todo_warning
|
22
|
+
end
|
23
|
+
|
20
24
|
def file_finished(file, offenses)
|
21
25
|
return unless (uncorrected_offenses = offenses.reject(&:corrected?)).any?
|
22
26
|
@any_uncorrected_offenses = true
|
@@ -30,7 +34,6 @@ module Standard
|
|
30
34
|
end
|
31
35
|
|
32
36
|
def finished(_)
|
33
|
-
print_todo_warning
|
34
37
|
print_call_for_feedback if @any_uncorrected_offenses
|
35
38
|
end
|
36
39
|
|
data/lib/standard/version.rb
CHANGED
data/standard.gemspec
CHANGED
@@ -7,6 +7,7 @@ Gem::Specification.new do |spec|
|
|
7
7
|
spec.version = Standard::VERSION
|
8
8
|
spec.authors = ["Justin Searls"]
|
9
9
|
spec.email = ["searls@gmail.com"]
|
10
|
+
spec.required_ruby_version = ">= 2.4.0"
|
10
11
|
|
11
12
|
spec.summary = "Ruby Style Guide, with linter & automatic code fixer"
|
12
13
|
spec.homepage = "https://github.com/testdouble/standard"
|
@@ -18,7 +19,7 @@ Gem::Specification.new do |spec|
|
|
18
19
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
19
20
|
spec.require_paths = ["lib"]
|
20
21
|
|
21
|
-
spec.add_dependency "rubocop", "~> 0.
|
22
|
+
spec.add_dependency "rubocop", "~> 0.83.0"
|
22
23
|
spec.add_dependency "rubocop-performance", "~> 1.5.2"
|
23
24
|
|
24
25
|
spec.add_development_dependency "bundler"
|
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: 0.4.
|
4
|
+
version: 0.4.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Searls
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-05-
|
11
|
+
date: 2020-05-25 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: 0.
|
19
|
+
version: 0.83.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: 0.
|
26
|
+
version: 0.83.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rubocop-performance
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -181,7 +181,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
181
181
|
requirements:
|
182
182
|
- - ">="
|
183
183
|
- !ruby/object:Gem::Version
|
184
|
-
version:
|
184
|
+
version: 2.4.0
|
185
185
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
186
186
|
requirements:
|
187
187
|
- - ">="
|