def check
header, *config_sections = documented_general_config
non_nested_accessors =
expected_accessors.reject do |a|
config_sections.any? { |section| /\.#{a}\./.match?(section[0]) }
end
non_nested_accessors.each do |accessor|
config_header = "#### `config.#{accessor}`"
unless config_sections.any? { |section| section[0] == config_header }
checker.errors << "Missing configuration: #{config_header}"
config_sections << [config_header, "", "FIXME", ""]
end
end
new_config = header + config_sections.sort_by { |section| section[0].split("`")[1] }.flatten
return if new_config == checker.doc.general_config
checker.errors << "General Configuration is not alphabetical"
checker.doc.general_config = new_config
end