standard 1.1.4 → 1.2.0

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: ea3e3eeea8d0a22965c0d8941fdb3900a1c9f2ce9f17236ac563b83d336210d9
4
- data.tar.gz: affdc2caea1475c682af82703c28b58fea9dd9e139075999cb712506c8b27851
3
+ metadata.gz: de96f4998ae2981b491d19e8a55ad067238adcd5914fea17e2631052927fc72d
4
+ data.tar.gz: 4e746e2a09d44dab928060da3430321bc8d7ef90e22da6fd5ff289251dac2df1
5
5
  SHA512:
6
- metadata.gz: 88055dca76a2b054cf0b37dffcca6b8b0df5e452d3eb8a5ccc06a50fef13d99c9e9e51b98c2e870190e709911d35b59851ff5f2bf805b039b3938b1d17843c63
7
- data.tar.gz: edde3570c2669443c3eb0ba003919d42ca31c7e60dec8738c463ee705e2c5f7e84268692ce734c8949a03b0b9eda227273d961ad243c29629758747e3ab9e4f5
6
+ metadata.gz: da0555dc50b77bf915c970a39208a999fee1f7d12446ee84778cd99a07aa3e13aa734b02a8de1097a961f9f1d3958028b97718e162ad4745cfbf1c51324e58b7
7
+ data.tar.gz: cf1c90152d448c83e65ecae41ee8ac441a9224368ec759ce8b7e9cfb6f0bd7c071b10a3bfc7f991b9d938db8bdc5bd465889c5e430c0ad2380065c917a723a30
data/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.2.0
4
+
5
+ * Update rubocop from 1.18.4 to [1.19.1](https://github.com/rubocop-hq/rubocop/releases/tag/v1.19.1)
6
+ * Update rubocop-performance from 1.11.4 to [1.11.5](https://github.com/rubocop-hq/rubocop-performance/releases/tag/v1.11.5)
7
+
8
+ ## 1.1.7
9
+
10
+ * Fix an issue with nested generated todos being ignored
11
+ [#311](https://github.com/testdouble/standard/pull/311)
12
+
13
+ ## 1.1.6
14
+
15
+ * Update rubocop from 1.18.3 to [1.18.4](https://github.com/rubocop-hq/rubocop/releases/tag/v1.18.4)
16
+
17
+ ## 1.1.5
18
+
19
+ * Update rubocop from 1.18.2 to [1.18.3](https://github.com/rubocop-hq/rubocop/releases/tag/v1.18.3)
20
+ * Update rubocop-performance from 1.11.3 to [1.11.4](https://github.com/rubocop-hq/rubocop-performance/releases/tag/v1.11.4)
21
+ * Disabled `Performance/DeletePrefix` because it was marked as unsafe.
22
+
3
23
  ## 1.1.4
4
24
 
5
25
  * Update rubocop from 1.18.1 to [1.18.2](https://github.com/rubocop-hq/rubocop/releases/tag/v1.18.2)
data/Gemfile.lock CHANGED
@@ -1,9 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- standard (1.1.4)
5
- rubocop (= 1.18.2)
6
- rubocop-performance (= 1.11.3)
4
+ standard (1.2.0)
5
+ rubocop (= 1.19.1)
6
+ rubocop-performance (= 1.11.5)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
@@ -15,27 +15,27 @@ GEM
15
15
  method_source (1.0.0)
16
16
  minitest (5.14.4)
17
17
  parallel (1.20.1)
18
- parser (3.0.1.1)
18
+ parser (3.0.2.0)
19
19
  ast (~> 2.4.1)
20
20
  pry (0.14.1)
21
21
  coderay (~> 1.1)
22
22
  method_source (~> 1.0)
23
23
  rainbow (3.0.0)
24
- rake (13.0.3)
24
+ rake (13.0.6)
25
25
  regexp_parser (2.1.1)
26
26
  rexml (3.2.5)
27
- rubocop (1.18.2)
27
+ rubocop (1.19.1)
28
28
  parallel (~> 1.10)
29
29
  parser (>= 3.0.0.0)
30
30
  rainbow (>= 2.2.2, < 4.0)
31
31
  regexp_parser (>= 1.8, < 3.0)
32
32
  rexml
33
- rubocop-ast (>= 1.7.0, < 2.0)
33
+ rubocop-ast (>= 1.9.1, < 2.0)
34
34
  ruby-progressbar (~> 1.7)
35
35
  unicode-display_width (>= 1.4.0, < 3.0)
36
- rubocop-ast (1.7.0)
36
+ rubocop-ast (1.10.0)
37
37
  parser (>= 3.0.1.1)
38
- rubocop-performance (1.11.3)
38
+ rubocop-performance (1.11.5)
39
39
  rubocop (>= 1.7.0, < 2.0)
40
40
  rubocop-ast (>= 0.4.0)
41
41
  ruby-progressbar (1.11.0)
@@ -61,4 +61,4 @@ DEPENDENCIES
61
61
  standard!
62
62
 
63
63
  BUNDLED WITH
64
- 2.2.6
64
+ 2.2.22
data/README.md CHANGED
@@ -213,6 +213,7 @@ if you've used StandardJS.)
213
213
  * [JetThoughts](https://www.jetthoughts.com/)
214
214
  * [Oyster](https://www.oysterhr.com/)
215
215
  * [Podia](https://www.podia.com/)
216
+ * [RubyCI](https://ruby.ci)
216
217
  * And that's about it so far!
217
218
 
218
219
  If your team starts using Standard, [send a pull
data/config/base.yml CHANGED
@@ -664,7 +664,7 @@ Performance/Count:
664
664
  Enabled: true
665
665
 
666
666
  Performance/DeletePrefix:
667
- Enabled: true
667
+ Enabled: false
668
668
 
669
669
  Performance/DeleteSuffix:
670
670
  Enabled: false
@@ -32,7 +32,7 @@ module Standard
32
32
  default_ignores: standard_yaml.key?("default_ignores") ? !!standard_yaml["default_ignores"] : true,
33
33
  config_root: yaml_path ? Pathname.new(yaml_path).dirname.to_s : nil,
34
34
  todo_file: todo_path,
35
- todo_ignore_files: todo_yaml["ignore"] || []
35
+ todo_ignore_files: (todo_yaml["ignore"] || []).map { |f| Hash === f ? f.keys.first : f }
36
36
  }
37
37
  end
38
38
 
@@ -10,26 +10,21 @@ module Standard
10
10
  temp_file = Tempfile.new("excluded.txt")
11
11
  begin
12
12
  # Run Rubocop to generate the files with errors into the temp file.
13
- config.rubocop_options[:formatters] = [["files", temp_file.path]]
14
- config.rubocop_options[:format] = "files"
13
+ config.rubocop_options[:formatters] = [["json", temp_file.path]]
15
14
  config.rubocop_options[:out] = temp_file.path
16
15
  exit_code = Runners::Rubocop.new.call(config)
17
16
 
18
- # Read in the files with errors. It will have the absolute paths
19
- # of the files but we only want the relative path.
20
- files_with_errors = temp_file.readlines.map(&:chomp)
21
- files_with_errors.map! do |file|
22
- # Get the relative file path. Don't use the
23
- # relative_path_from method as it will raise an
24
- # error in Ruby 2.4.1 and possibly other versions.
25
- #
26
- # https://bugs.ruby-lang.org/issues/10011
27
- #
28
- file.sub(Dir.pwd + File::SEPARATOR, "")
29
- end
17
+ result = JSON.parse(temp_file.read)
18
+ ignore = result["files"].select { |file|
19
+ file["offenses"].size > 0
20
+ }.map { |file|
21
+ {
22
+ file["path"] => file["offenses"].map { |o| o["cop_name"] }.uniq
23
+ }
24
+ }
30
25
 
31
26
  # Read the files with errors from the temp file.
32
- yaml_format_errors = {"ignore" => files_with_errors}
27
+ yaml_format_errors = {"ignore" => ignore}
33
28
 
34
29
  # Regenerate the todo file.
35
30
  File.open(".standard_todo.yml", "w") do |file|
@@ -1,3 +1,3 @@
1
1
  module Standard
2
- VERSION = Gem::Version.new("1.1.4")
2
+ VERSION = Gem::Version.new("1.2.0")
3
3
  end
data/standard.gemspec CHANGED
@@ -19,6 +19,6 @@ Gem::Specification.new do |spec|
19
19
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
20
  spec.require_paths = ["lib"]
21
21
 
22
- spec.add_dependency "rubocop", "1.18.2"
23
- spec.add_dependency "rubocop-performance", "1.11.3"
22
+ spec.add_dependency "rubocop", "1.19.1"
23
+ spec.add_dependency "rubocop-performance", "1.11.5"
24
24
  end
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.1.4
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Searls
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-07-02 00:00:00.000000000 Z
11
+ date: 2021-08-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 1.18.2
19
+ version: 1.19.1
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.18.2
26
+ version: 1.19.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rubocop-performance
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 1.11.3
33
+ version: 1.11.5
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 1.11.3
40
+ version: 1.11.5
41
41
  description:
42
42
  email:
43
43
  - searls@gmail.com
@@ -109,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  requirements: []
112
- rubygems_version: 3.1.4
112
+ rubygems_version: 3.2.15
113
113
  signing_key:
114
114
  specification_version: 4
115
115
  summary: Ruby Style Guide, with linter & automatic code fixer