mirror of
https://github.com/jfmengels/elm-review.git
synced 2024-08-17 12:00:29 +03:00
Add Rule.ruleKnowsAboutIgnoredFiles
This commit is contained in:
parent
95ad869ad7
commit
8b2b29ebba
@ -23,7 +23,7 @@ module Review.Rule exposing
|
||||
, ReviewError, errorRuleName, errorMessage, errorDetails, errorRange, errorFixes, errorFilePath, errorTarget
|
||||
, ignoreErrorsForDirectories, ignoreErrorsForFiles, filterErrorsForFiles
|
||||
, withDataExtractor, preventExtract
|
||||
, reviewV3, reviewV2, review, ProjectData, ruleName, ruleProvidesFixes, withRuleId, getConfigurationError
|
||||
, reviewV3, reviewV2, review, ProjectData, ruleName, ruleProvidesFixes, ruleKnowsAboutIgnoredFiles, withRuleId, getConfigurationError
|
||||
, Required, Forbidden
|
||||
)
|
||||
|
||||
@ -284,7 +284,7 @@ find the tools to extract data below.
|
||||
|
||||
# Running rules
|
||||
|
||||
@docs reviewV3, reviewV2, review, ProjectData, ruleName, ruleProvidesFixes, withRuleId, getConfigurationError
|
||||
@docs reviewV3, reviewV2, review, ProjectData, ruleName, ruleProvidesFixes, ruleKnowsAboutIgnoredFiles, withRuleId, getConfigurationError
|
||||
|
||||
|
||||
# Internals
|
||||
@ -860,6 +860,21 @@ ruleProvidesFixes (Rule rule) =
|
||||
rule.providesFixes
|
||||
|
||||
|
||||
{-| Indicates whether the rule knows about which files are ignored.
|
||||
|
||||
You should not have to use this when writing a rule.
|
||||
|
||||
-}
|
||||
ruleKnowsAboutIgnoredFiles : Rule -> Bool
|
||||
ruleKnowsAboutIgnoredFiles (Rule rule) =
|
||||
-- TODO Breaking change: This should be an internal detail, not shown to the user
|
||||
let
|
||||
(RequestedData requestedData) =
|
||||
rule.requestedData
|
||||
in
|
||||
requestedData.ignoredFiles
|
||||
|
||||
|
||||
{-| Assign an id to a rule. This id should be unique.
|
||||
|
||||
config =
|
||||
|
Loading…
Reference in New Issue
Block a user