app/services/scenarios_fetch_service.rb
Assignment Branch Condition size for fetch_all is too high. [18.71/15] Open
Open
def self.fetch_all
clone_or_pull_git_repo
found_scenarios = [] # Keep a running list of scenarios we found
Find.find(yaml_folder('tests')).each do |filename|
- Read upRead up
- Exclude checks
This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric
Prefer using YAML.safe_load
over YAML.load
. Open
Open
scenarios_list = YAML.load(File.read(filename))
- Read upRead up
- Exclude checks
This cop checks for the use of YAML class methods which have potential security issues leading to remote code execution when loading from an untrusted source.
Example:
# bad
YAML.load("--- foo")
# good
YAML.safe_load("--- foo")
YAML.dump("foo")