浏览代码

chore(rubocop): allow use of `YAML.load` for `_mapdata.rb` [skip ci]

* Automated using https://github.com/myii/ssf-formula/pull/296
tags/v1.7.5
Daniel Dehennin 4 年前
父节点
当前提交
6dbba14a29
没有帐户链接到提交者的电子邮件
共有 5 个文件被更改,包括 7 次插入4 次删除
  1. +3
    -0
      .rubocop.yml
  2. +1
    -1
      test/integration/v3000-py2/controls/_mapdata.rb
  3. +1
    -1
      test/integration/v3000-py3/controls/_mapdata.rb
  4. +1
    -1
      test/integration/v3001-py3/controls/_mapdata.rb
  5. +1
    -1
      test/integration/v3002-py3/controls/_mapdata.rb

+ 3
- 0
.rubocop.yml 查看文件

- describe - describe
# Increase from default of `25` # Increase from default of `25`
Max: 30 Max: 30
Security/YAMLLoad:
Exclude:
- test/integration/**/_mapdata.rb


# Any offenses that should be fixed, e.g. collected via. `rubocop --auto-gen-config` # Any offenses that should be fixed, e.g. collected via. `rubocop --auto-gen-config`

+ 1
- 1
test/integration/v3000-py2/controls/_mapdata.rb 查看文件

mapdata_file_path = "_mapdata/#{platform_finger}.yaml" mapdata_file_path = "_mapdata/#{platform_finger}.yaml"
# Load the mapdata from profile, into a YAML structure # Load the mapdata from profile, into a YAML structure
# https://docs.chef.io/inspec/profiles/#profile-files # https://docs.chef.io/inspec/profiles/#profile-files
mapdata_file_yaml = YAML.safe_load(inspec.profile.file(mapdata_file_path))
mapdata_file_yaml = YAML.load(inspec.profile.file(mapdata_file_path))
# Dump the YAML back into a string for comparison # Dump the YAML back into a string for comparison
mapdata_file_dump = YAML.dump(mapdata_file_yaml) mapdata_file_dump = YAML.dump(mapdata_file_yaml)



+ 1
- 1
test/integration/v3000-py3/controls/_mapdata.rb 查看文件

mapdata_file_path = "_mapdata/#{platform_finger}.yaml" mapdata_file_path = "_mapdata/#{platform_finger}.yaml"
# Load the mapdata from profile, into a YAML structure # Load the mapdata from profile, into a YAML structure
# https://docs.chef.io/inspec/profiles/#profile-files # https://docs.chef.io/inspec/profiles/#profile-files
mapdata_file_yaml = YAML.safe_load(inspec.profile.file(mapdata_file_path))
mapdata_file_yaml = YAML.load(inspec.profile.file(mapdata_file_path))
# Dump the YAML back into a string for comparison # Dump the YAML back into a string for comparison
mapdata_file_dump = YAML.dump(mapdata_file_yaml) mapdata_file_dump = YAML.dump(mapdata_file_yaml)



+ 1
- 1
test/integration/v3001-py3/controls/_mapdata.rb 查看文件

mapdata_file_path = "_mapdata/#{platform_finger}.yaml" mapdata_file_path = "_mapdata/#{platform_finger}.yaml"
# Load the mapdata from profile, into a YAML structure # Load the mapdata from profile, into a YAML structure
# https://docs.chef.io/inspec/profiles/#profile-files # https://docs.chef.io/inspec/profiles/#profile-files
mapdata_file_yaml = YAML.safe_load(inspec.profile.file(mapdata_file_path))
mapdata_file_yaml = YAML.load(inspec.profile.file(mapdata_file_path))
# Dump the YAML back into a string for comparison # Dump the YAML back into a string for comparison
mapdata_file_dump = YAML.dump(mapdata_file_yaml) mapdata_file_dump = YAML.dump(mapdata_file_yaml)



+ 1
- 1
test/integration/v3002-py3/controls/_mapdata.rb 查看文件

mapdata_file_path = "_mapdata/#{platform_finger}.yaml" mapdata_file_path = "_mapdata/#{platform_finger}.yaml"
# Load the mapdata from profile, into a YAML structure # Load the mapdata from profile, into a YAML structure
# https://docs.chef.io/inspec/profiles/#profile-files # https://docs.chef.io/inspec/profiles/#profile-files
mapdata_file_yaml = YAML.safe_load(inspec.profile.file(mapdata_file_path))
mapdata_file_yaml = YAML.load(inspec.profile.file(mapdata_file_path))
# Dump the YAML back into a string for comparison # Dump the YAML back into a string for comparison
mapdata_file_dump = YAML.dump(mapdata_file_yaml) mapdata_file_dump = YAML.dump(mapdata_file_yaml)



正在加载...
取消
保存