jfmengels/elm-review/2.13.0

NOTE: the latest version is 2.16.6

Review.Options

Configure how elm-review runs.

You should not have to use this when writing a rule. This is only necessary if you wish to run elm-review in a new process like the CLI.

type alias ReviewOptions =
ReviewOptionsInternal

Represents the different options you can use to run the review process.

defaults : ReviewOptions

Somewhat arbitrary default options.

  • Does not enable data extraction
withDataExtraction : Bool -> ReviewOptions -> ReviewOptions

Enable or disable data extraction.

Maybe (List ( String, Value ) -> List ( String, Value ))
-> ReviewOptions
-> ReviewOptions

Add a logger.

withSuppressedErrors : Dict ( String, String ) Int -> ReviewOptions -> ReviewOptions

Add suppressions from the suppressed folder.

withFixes : FixMode -> ReviewOptions -> ReviewOptions

Set the fix mode.

type alias FixMode =
FixMode

Represents whether elm-review should apply fixes found in the reported errors.

fixedDisabled : FixMode

Don't apply fixes.

fixesEnabledWithLimit : Int -> FixMode

Apply the fixes for every error whenever possible, but abort the whole review process once a number of errors have been fixed.

Apply the fixes for every error whenever possible.

( { ruleName : String
, filePath : String
, message : String
, details : List String
, range : Range
}
-> Bool
)
-> ReviewOptions
-> ReviewOptions

Provide a predicate for ignoring fixes to apply. This is useful to ignore previously refused fixes in elm-review --fix.