class Linters::Configuration
Constants
- DEFAULT_CHECKERS
Attributes
custom_linters[RW]
:reek: Attribute
linters[RW]
:reek: Attribute
settings_path[RW]
:reek: Attribute
Public Class Methods
new()
click to toggle source
# File lib/linters/configuration.rb, line 8 def initialize @custom_linters = {} @settings_path = ENV.fetch('LINTERS_SETTING_PATH', 'config/linter_settings.yml') @linters = ENV.fetch('LINTERS_CHECKERS', load_checkers(@settings_path)) end
Private Instance Methods
load_checkers(path)
click to toggle source
# File lib/linters/configuration.rb, line 16 def load_checkers(path) return DEFAULT_CHECKERS unless File.exist?(path) (YAML.load_file(path)['linters']['checkers'] || DEFAULT_CHECKERS).map(&:to_sym) end