Sha256: 08b1c84a749da9fbda441d65f8d9b0f38651f0ef6bf42c3cb9fda27fd4da2c92

Contents?: true

Size: 310 Bytes

Versions: 7

Compression:

Stored size: 310 Bytes

Contents

module CC
  module Analyzer
    class IssueRelativePathValidation < Validation
      def valid?
        path && !path.start_with?("/")
      end

      def message
        "Path must be relative"
      end

      private

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

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
codeclimate-0.27.2 lib/cc/analyzer/issue_relative_path_validation.rb
codeclimate-0.27.1 lib/cc/analyzer/issue_relative_path_validation.rb
codeclimate-0.27.0 lib/cc/analyzer/issue_relative_path_validation.rb
codeclimate-0.27.0.rc1 lib/cc/analyzer/issue_relative_path_validation.rb
codeclimate-0.26.0 lib/cc/analyzer/issue_relative_path_validation.rb
codeclimate-0.25.1 lib/cc/analyzer/issue_relative_path_validation.rb
codeclimate-0.25.0 lib/cc/analyzer/issue_relative_path_validation.rb