Skip to content

Commit

Permalink
Check both overlapping keys and quoting
Browse files Browse the repository at this point in the history
- Remove the short circuit evaluation between checking overlapping
  keys and quoting.

Signed-off-by: Hansuk Hong <flavono123@gmail.com>
  • Loading branch information
flavono123 committed Aug 15, 2018
1 parent 7e408ef commit 3f71855
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/yamllint/linter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,10 @@ def check_filename(filename)
def check_data(yaml_data, errors_array)
valid = check_not_empty?(yaml_data, errors_array)
valid &&= check_syntax_valid?(yaml_data, errors_array)
valid &&= check_overlapping_keys?(yaml_data, errors_array)
valid &&= check_quoting_valid?(yaml_data, errors_array)
valid &&= [
check_overlapping_keys?(yaml_data, errors_array),
check_quoting_valid?(yaml_data, errors_array)
].all? {|valid| valid}

valid
end
Expand Down

0 comments on commit 3f71855

Please sign in to comment.