Sha256: 5fed8cfdc7b872a74651db440fb7bd9534013a421fc3804a62ba87c51af2ff97

Contents?: true

Size: 312 Bytes

Versions: 11

Compression:

Stored size: 312 Bytes

Contents

module CC
  module Analyzer
    class IssuePathIsFileValidation < Validation
      def valid?
        File.file?(path)
      end

      def message
        "Path is not a file: '#{path}'"
      end

      private

      def path
        object.fetch("location", {}).fetch("path", "")
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
codeclimate-0.34.1 lib/cc/analyzer/issue_path_is_file_validation.rb
codeclimate-0.34.0 lib/cc/analyzer/issue_path_is_file_validation.rb
codeclimate-0.33.0 lib/cc/analyzer/issue_path_is_file_validation.rb
codeclimate-0.32.1 lib/cc/analyzer/issue_path_is_file_validation.rb
codeclimate-0.32.0 lib/cc/analyzer/issue_path_is_file_validation.rb
codeclimate-0.32.0.rc1 lib/cc/analyzer/issue_path_is_file_validation.rb
codeclimate-0.31.1 lib/cc/analyzer/issue_path_is_file_validation.rb
codeclimate-0.31.0 lib/cc/analyzer/issue_path_is_file_validation.rb
codeclimate-0.30.1 lib/cc/analyzer/issue_path_is_file_validation.rb
codeclimate-0.30.0 lib/cc/analyzer/issue_path_is_file_validation.rb
codeclimate-0.29.0 lib/cc/analyzer/issue_path_is_file_validation.rb