Module

Whine.Muting

Package
purescript-whine-core
Repository
collegevine/purescript-whine

#MutedRange Source

data MutedRange

Constructors

#mutedRanges Source

mutedRanges :: { lines :: Array String } -> Map RuleId (Array MutedRange)

Given lines of a code file, finds ranges and/or lines marked with #disable/#enable directives, and returns those ranges grouped by rule.

For example:

-- #disable SomeRule
foo -- #disable AnotherRule
bar
-- #enable SomeRule
baz
qux -- #disable SomeRule

Would return:

{
  SomeRule: [MutedRange 0 3, MutedLine 5],
  AnotherRule: [MutedLine 1]
}