mirror of
https://github.com/jfmengels/elm-review.git
synced 2024-11-25 10:04:38 +03:00
Re-order declarations
This commit is contained in:
parent
776cb6f293
commit
ac7811dec4
@ -62,6 +62,27 @@ type FilePattern
|
||||
| ExcludeDirectory String
|
||||
|
||||
|
||||
{-| REPLACEME
|
||||
-}
|
||||
include : String -> FilePattern
|
||||
include =
|
||||
Include
|
||||
|
||||
|
||||
{-| REPLACEME
|
||||
-}
|
||||
exclude : String -> FilePattern
|
||||
exclude =
|
||||
Exclude
|
||||
|
||||
|
||||
{-| REPLACEME
|
||||
-}
|
||||
excludeDirectory : String -> FilePattern
|
||||
excludeDirectory =
|
||||
ExcludeDirectory
|
||||
|
||||
|
||||
{-| REPLACEME
|
||||
-}
|
||||
type Summary
|
||||
@ -76,20 +97,6 @@ type alias SummaryInfo =
|
||||
}
|
||||
|
||||
|
||||
{-| REPLACEME
|
||||
-}
|
||||
toStrings : Summary -> { files : List { pattern : String, included : Bool }, excludedDirectories : List String }
|
||||
toStrings (Summary summary) =
|
||||
{ files = summary.strings
|
||||
, excludedDirectories = summary.excludedDirectoriesStrings
|
||||
}
|
||||
|
||||
|
||||
type CompactFilePattern
|
||||
= CompactInclude (List Glob)
|
||||
| CompactExclude (List Glob)
|
||||
|
||||
|
||||
{-| REPLACEME
|
||||
-}
|
||||
compact : List FilePattern -> Result (List String) Summary
|
||||
@ -152,6 +159,11 @@ compactBase filePatterns accSummary =
|
||||
Err (compactErrors rest [ raw ])
|
||||
|
||||
|
||||
type CompactFilePattern
|
||||
= CompactInclude (List Glob)
|
||||
| CompactExclude (List Glob)
|
||||
|
||||
|
||||
compactHelp : List FilePattern -> List Glob -> Bool -> SummaryInfo -> Result (List String) SummaryInfo
|
||||
compactHelp filePatterns accGlobs included accSummary =
|
||||
case filePatterns of
|
||||
@ -224,6 +236,15 @@ compactHelp filePatterns accGlobs included accSummary =
|
||||
Err (compactErrors rest [ raw ])
|
||||
|
||||
|
||||
toDirectory : String -> String
|
||||
toDirectory globStr =
|
||||
if String.endsWith "/" globStr then
|
||||
globStr ++ "**/*"
|
||||
|
||||
else
|
||||
globStr ++ "/**/*"
|
||||
|
||||
|
||||
compactErrors : List FilePattern -> List String -> List String
|
||||
compactErrors filePatterns accGlobStrings =
|
||||
case filePatterns of
|
||||
@ -261,36 +282,6 @@ addRawIncludeExclude string included summary =
|
||||
}
|
||||
|
||||
|
||||
{-| REPLACEME
|
||||
-}
|
||||
include : String -> FilePattern
|
||||
include =
|
||||
Include
|
||||
|
||||
|
||||
{-| REPLACEME
|
||||
-}
|
||||
exclude : String -> FilePattern
|
||||
exclude =
|
||||
Exclude
|
||||
|
||||
|
||||
{-| REPLACEME
|
||||
-}
|
||||
excludeDirectory : String -> FilePattern
|
||||
excludeDirectory =
|
||||
ExcludeDirectory
|
||||
|
||||
|
||||
toDirectory : String -> String
|
||||
toDirectory globStr =
|
||||
if String.endsWith "/" globStr then
|
||||
globStr ++ "**/*"
|
||||
|
||||
else
|
||||
globStr ++ "/**/*"
|
||||
|
||||
|
||||
{-| REPLACEME
|
||||
-}
|
||||
match : { includeByDefault : Bool } -> Summary -> String -> Bool
|
||||
@ -321,3 +312,12 @@ matchHelp includeByDefault filePatterns str =
|
||||
|
||||
else
|
||||
matchHelp includeByDefault rest str
|
||||
|
||||
|
||||
{-| REPLACEME
|
||||
-}
|
||||
toStrings : Summary -> { files : List { pattern : String, included : Bool }, excludedDirectories : List String }
|
||||
toStrings (Summary summary) =
|
||||
{ files = summary.strings
|
||||
, excludedDirectories = summary.excludedDirectoriesStrings
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user