We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 158d226 commit 9fc5d1eCopy full SHA for 9fc5d1e
spec/need_kconfig_format_spec.rb
@@ -42,7 +42,7 @@ def load_yaml_with_conditionals(file_path)
42
YAML.load(yaml_content)
43
end
44
45
-def is_erb_file(file_path)
+def erb_file?(file_path)
46
File.foreach(file_path) { |line| return true if line.include?('<%') || line.include?('<%=') }
47
false
48
@@ -53,8 +53,8 @@ def is_erb_file(file_path)
53
.each do |file|
54
begin
55
yaml_data = load_yaml_with_conditionals(file)
56
- # next if yaml_data.nil? || !yaml_data.is_a?(Hash) || is_erb_file(file)
57
- next unless yaml_data.is_a?(Hash) && !is_erb_file(file)
+ # next if yaml_data.nil? || !yaml_data.is_a?(Hash) || erb_file?(file)
+ next unless yaml_data.is_a?(Hash) && !erb_file?(file)
58
59
kconfig_section = yaml_data['need_kconfig']
60
0 commit comments