Skip to content

Commit

Permalink
Introduce require directive to load custom checkers
Browse files Browse the repository at this point in the history
  • Loading branch information
toydestroyer authored and djezzzl committed Dec 25, 2024
1 parent 2f11788 commit 45be8e2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/database_consistency/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ def initialize(file_paths = DEFAULT_PATH)
end
extract_configurations(existing_paths)
end

load_custom_checkers
end

def debug?
Expand Down Expand Up @@ -123,5 +125,13 @@ def log_level
settings && settings['log_level']
end
end

def load_custom_checkers
return unless configuration.key?('require') && configuration['require'].is_a?(Array)

configuration['require'].each do |path|
require path
end
end
end
end

0 comments on commit 45be8e2

Please sign in to comment.