Sha256: 548a75bed04015dc954778c605c67d93f0a8fac8b862462ab81a6e6a1227f7ba
Contents?: true
Size: 1.14 KB
Versions: 2
Compression:
Stored size: 1.14 KB
Contents
module CC class Config class DefaultAdapter # intentionally not sorted: we want them in a particular order ENGINES = { "structure".freeze => "stable".freeze, "duplication".freeze => "stable".freeze, }.freeze EXCLUDE_PATTERNS = %w[ config/ db/ dist/ features/ **/node_modules/ script/ **/spec/ **/test/ **/tests/ **/vendor/ **/*_test.go **/*.d.ts ].freeze attr_reader :config def initialize(data = {}) @config = data apply_default_excludes apply_default_engines end private def apply_default_engines config["plugins"] ||= {} ENGINES.each do |name, channel| config["plugins"][name] ||= {} unless [true, false].include?(config["plugins"][name]["enabled"]) config["plugins"][name]["enabled"] = true end config["plugins"][name]["channel"] ||= channel end end def apply_default_excludes config["exclude_patterns"] ||= EXCLUDE_PATTERNS end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
codeclimate-0.71.0 | lib/cc/config/default_adapter.rb |
codeclimate-0.70.6 | lib/cc/config/default_adapter.rb |