standard 0.4.0 → 0.4.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +30 -0
- data/Gemfile.lock +3 -5
- data/README.md +10 -4
- data/config/base.yml +4 -9
- 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: 66a00109a56907165a97df2ceba38b8575b697890232bc295311dcb9d2adae39
|
4
|
+
data.tar.gz: 398c841fad077613fe1ddfadb000ccafe3bb313243846513c857303e5444d648
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b0300c97dd07f13c0242af3e5276fc48a89abb12b16ec6e22921b5d1dcf3f3112a5adae5ddb976dbed76b3f9438d5256743b7784335d560a3543c88ff20fe00
|
7
|
+
data.tar.gz: 6e851d45878a4705f480c12a4942b962de3034c1c2b8b7c96b336268ec678b3f4fea4658ace3639a03cc1ee3b0e83205da38f8bb9ffdf0f50f72e97a3e9dfb54
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,35 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 0.4.5
|
4
|
+
|
5
|
+
* Disable `Naming/AsciiIdentifiers` for the same reason as mentioned below in
|
6
|
+
0.4.4 (specifically to allow programs written in non-Latin languages to define
|
7
|
+
identifiers)
|
8
|
+
|
9
|
+
## 0.4.4
|
10
|
+
|
11
|
+
* Disable `Naming/MethodName` cop. While `snake_case` is the conventional way to
|
12
|
+
name a Ruby method, the cop is too restrictive in that it also prevents
|
13
|
+
non-ASCII characters from being included in method names
|
14
|
+
|
15
|
+
## 0.4.3
|
16
|
+
|
17
|
+
* Improve output of the todo feature
|
18
|
+
|
19
|
+
## 0.4.2
|
20
|
+
|
21
|
+
* Track Rubocop
|
22
|
+
[0.83.0](https://github.com/rubocop-hq/rubocop/blob/master/CHANGELOG.md#0830-2020-05-11)
|
23
|
+
* Update our default to allow trailing whitespace in heredocs
|
24
|
+
* Disable auto-correct for a cop that changed `:true` to `true`, as that's not
|
25
|
+
safe
|
26
|
+
* Allow comments in empty `when` blocks
|
27
|
+
|
28
|
+
|
29
|
+
## 0.4.1
|
30
|
+
|
31
|
+
* add given/given! as `{}` friendly blocks [#172](https://github.com/testdouble/standard/pull/172)
|
32
|
+
|
3
33
|
## 0.4.0
|
4
34
|
|
5
35
|
* Add `--todo` mode for incremental adoption of Standard to a project ([PR](https://github.com/testdouble/standard/pull/155) by [@mrbiggred](https://github.com/mrbiggred))
|
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.5)
|
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,9 +537,6 @@ Lint/Void:
|
|
537
537
|
Migration/DepartmentName:
|
538
538
|
Enabled: true
|
539
539
|
|
540
|
-
Naming/AsciiIdentifiers:
|
541
|
-
Enabled: true
|
542
|
-
|
543
540
|
Naming/BinaryOperatorParameterName:
|
544
541
|
Enabled: true
|
545
542
|
|
@@ -553,10 +550,6 @@ Naming/HeredocDelimiterCase:
|
|
553
550
|
Enabled: true
|
554
551
|
EnforcedStyle: uppercase
|
555
552
|
|
556
|
-
Naming/MethodName:
|
557
|
-
Enabled: true
|
558
|
-
EnforcedStyle: snake_case
|
559
|
-
|
560
553
|
Naming/BlockParameterName:
|
561
554
|
Enabled: true
|
562
555
|
MinNameLength: 1
|
@@ -667,6 +660,8 @@ Standard/SemanticBlocks:
|
|
667
660
|
# Rails
|
668
661
|
- transaction
|
669
662
|
FunctionalMethods:
|
663
|
+
- given
|
664
|
+
- given!
|
670
665
|
- let
|
671
666
|
- let!
|
672
667
|
- subject
|
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.5
|
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
|
- - ">="
|