@@ -96,7 +96,7 @@ class Domain < Checkable
96
96
should_be_a_record? cname_to_github_user_domain? cname_to_domain_to_pages?
97
97
cname_to_pages_dot_github_dot_com? cname_to_fastly?
98
98
pointed_to_github_pages_ip? non_github_pages_ip_present? pages_domain?
99
- served_by_pages? valid? reason valid_domain? https?
99
+ served_by_pages? valid? reason warnings valid_domain? https?
100
100
enforces_https? https_error https_eligible? caa_error dns_zone_soa? dns_zone_ns?
101
101
] . freeze
102
102
@@ -113,6 +113,7 @@ def initialize(host, nameservers: :default)
113
113
@nameservers = nameservers
114
114
@resolver = GitHubPages ::HealthCheck ::Resolver . new ( self . host ,
115
115
:nameservers => nameservers )
116
+ @warnings = { }
116
117
end
117
118
118
119
# Runs all checks, raises an error if invalid
@@ -126,12 +127,17 @@ def check!
126
127
raise Errors ::InvalidCNAMEError . new :domain => self if invalid_cname?
127
128
raise Errors ::InvalidAAAARecordError . new :domain => self if invalid_aaaa_record?
128
129
raise Errors ::NotServedByPagesError . new :domain => self unless served_by_pages?
129
- raise Errors ::WildcardRecordError . new ( :domain => self , :parent_domain => parent_domain ) if maybe_wildcard?
130
+
131
+ warnings [ Errors ::WildCardRecordError ] = Errors ::WildcardRecordError . new ( :domain => self , :parent_domain => parent_domain ) if maybe_wildcard?
130
132
131
133
true
132
134
end
133
135
# rubocop:enable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
134
136
137
+ def warnings
138
+ @warnings . values
139
+ end
140
+
135
141
def deprecated_ip?
136
142
return @deprecated_ip if defined? @deprecated_ip
137
143
0 commit comments