Method: Sfn::Lint::RuleSet#validate_rules!
- Defined in:
- lib/sfn/lint/rule_set.rb
#validate_rules! ⇒ Object
Check that provided rules provider match rule set defined provider
157 158 159 160 161 162 163 164 165 |
# File 'lib/sfn/lint/rule_set.rb', line 157 def validate_rules! non_match = rules.find_all do |rule| rule.provider != provider end unless non_match.empty? raise ArgumentError.new "Rule set defines `#{provider}` as provider but includes rules for " \ "non matching providers. (#{non_match.map(&:provider).map(&:to_s).uniq.sort.join(", ")})" end end |