standard 1.1.6 → 1.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/Gemfile.lock +1 -1
- data/lib/standard/loads_yaml_config.rb +1 -1
- data/lib/standard/runners/genignore.rb +10 -15
- data/lib/standard/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3817c9b959b345aab28f7811195b4e685e6b7753008e6b87b7baead24913fdc9
|
4
|
+
data.tar.gz: 67f0e62b1076826b09b1078e9e60dd7da184a4f4f285e20f1a15aad59cafa3c2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0206790883999325864cbbb28341c846c63809eb85cf0cdab2b6427f7d97d8df147f80b092f5691a387c79fedeea3a8ba127b46d4ed55f30b9c364e0e763423d'
|
7
|
+
data.tar.gz: 56638828bd4ba34031949d85cb114b632f0167cfccb8d33edeb3b84ed3c2f1e3ca208a42604cf3cc2901d12b9db142457e8c11739187fc7bdb1426417ddbee99
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 1.1.7
|
4
|
+
|
5
|
+
* Fix an issue with nested generated todos being ignored
|
6
|
+
[#311](https://github.com/testdouble/standard/pull/311)
|
7
|
+
|
3
8
|
## 1.1.6
|
4
9
|
|
5
10
|
* Update rubocop from 1.18.3 to [1.18.4](https://github.com/rubocop-hq/rubocop/releases/tag/v1.18.4)
|
data/Gemfile.lock
CHANGED
@@ -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] = [["
|
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
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
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" =>
|
27
|
+
yaml_format_errors = {"ignore" => ignore}
|
33
28
|
|
34
29
|
# Regenerate the todo file.
|
35
30
|
File.open(".standard_todo.yml", "w") do |file|
|
data/lib/standard/version.rb
CHANGED
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
|
+
version: 1.1.7
|
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-
|
11
|
+
date: 2021-07-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|