jfmengels/elm-review/1.0.0

NOTE: the latest version is 2.16.6

Review

Module to configure your review configuration and run it on a source file.

Reviewing

List Rule
-> { path : String
, source : String
}
-> List Error

Review a file and gives back the errors raised by the given rules.

config : List Rule
config =
    [ Some.Rule.rule
    , Some.Other.Rule.rule
    ]


project : Project
project =
    Project.new


errors : List Error
errors =
    review config project sourceCode

Errors

type Error

Represents an error in a file found by a rule.

Note: This should not be confused with Error from the Review.Rule module. Review.Error is created from Review.Rule.Error but contains additional information like the name of the rule that emitted it and the file name.

errorModuleName : Error -> Maybe String

Get the name of the module for which the error occurred.

errorRuleName : Error -> String

Get the name of the rule of an error.

errorMessage : Error -> String

Get the message of an error.

errorDetails : Error -> List String

Get the details of an error.

errorRange : Error -> Range

Get the range of an error.

errorFixes : Error -> Maybe (List Fix)

Get the fixes for an error.