Sha256: c62b39d029b29c0469a89f4688059a12fa984da47972643d1e8ef4e00ae9b24e

Contents?: true

Size: 1.15 KB

Versions: 3

Compression:

Stored size: 1.15 KB

Contents

use Steep::AST::Ignore, RBS::Location

module Steep
  class Source
    class IgnoreRanges
      attr_reader all_ignores: Array[Ignore::t]

      attr_reader error_ignores: Array[Ignore::t]

      attr_reader ignored_ranges: Array[Range[Integer]]

      attr_reader ignored_lines: Hash[Integer, Ignore::IgnoreLine]

      def initialize: (ignores: Array[Ignore::t]) -> void

      # If given diagnostic code at the location is ignored or not
      #
      # Ignore ranges work for location that is completely inside the range.
      # Both the starting point and ending point should be in one range.
      # Only diagnostic (1) is ignored in the following example.
      #
      # ```ruby
      #                         + <2
      # # steep:ignore:start    |
      #                   1> +  +
      #                      +    +
      # # steep:ignore:end        |
      #                           + <3
      # ```
      #
      # Ignore lines work for location that has starting line or ending line.
      #
      def ignore?: (Integer start_line, Integer end_line, String code) -> bool

      def ignore_code?: (Ignore::IgnoreLine, String code) -> bool
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
steep-1.7.0.dev.3 sig/steep/source/ignore_ranges.rbs
steep-1.7.0.dev.2 sig/steep/source/ignore_ranges.rbs
steep-1.7.0.dev.1 sig/steep/source/ignore_ranges.rbs