Sha256: ca24fc4e7a34d53be84c346be0ff4f85ccb3df22277835ce3fb38696474e545f

Contents?: true

Size: 526 Bytes

Versions: 3

Compression:

Stored size: 526 Bytes

Contents

require 'yaml'

require 'hound/tools/template'

module Hound
  module Tools
    class HoundOverrides
      include Template

      def initialize
        super('.hound/overrides.yml')
      end

      private

      def _validate(content)
        config = YAML.load(content)
        cops = config['AllCops']
        fail InvalidTemplate, 'No AllCops section' unless cops

        # TODO: not tested
        fail InvalidTemplate, "Detected 'inherited_from' section" if config.key?('inherited_from')
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
hound-tools-0.0.6 lib/hound/tools/hound_overrides.rb
hound-tools-0.0.5 lib/hound/tools/hound_overrides.rb
hound-tools-0.0.4 lib/hound/tools/hound_overrides.rb