mirror of
https://github.com/jfmengels/elm-review.git
synced 2024-08-17 03:50:24 +03:00
Re-order declarations
This commit is contained in:
parent
776cb6f293
commit
ac7811dec4
@ -62,6 +62,27 @@ type FilePattern
|
|||||||
| ExcludeDirectory String
|
| ExcludeDirectory String
|
||||||
|
|
||||||
|
|
||||||
|
{-| REPLACEME
|
||||||
|
-}
|
||||||
|
include : String -> FilePattern
|
||||||
|
include =
|
||||||
|
Include
|
||||||
|
|
||||||
|
|
||||||
|
{-| REPLACEME
|
||||||
|
-}
|
||||||
|
exclude : String -> FilePattern
|
||||||
|
exclude =
|
||||||
|
Exclude
|
||||||
|
|
||||||
|
|
||||||
|
{-| REPLACEME
|
||||||
|
-}
|
||||||
|
excludeDirectory : String -> FilePattern
|
||||||
|
excludeDirectory =
|
||||||
|
ExcludeDirectory
|
||||||
|
|
||||||
|
|
||||||
{-| REPLACEME
|
{-| REPLACEME
|
||||||
-}
|
-}
|
||||||
type Summary
|
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
|
{-| REPLACEME
|
||||||
-}
|
-}
|
||||||
compact : List FilePattern -> Result (List String) Summary
|
compact : List FilePattern -> Result (List String) Summary
|
||||||
@ -152,6 +159,11 @@ compactBase filePatterns accSummary =
|
|||||||
Err (compactErrors rest [ raw ])
|
Err (compactErrors rest [ raw ])
|
||||||
|
|
||||||
|
|
||||||
|
type CompactFilePattern
|
||||||
|
= CompactInclude (List Glob)
|
||||||
|
| CompactExclude (List Glob)
|
||||||
|
|
||||||
|
|
||||||
compactHelp : List FilePattern -> List Glob -> Bool -> SummaryInfo -> Result (List String) SummaryInfo
|
compactHelp : List FilePattern -> List Glob -> Bool -> SummaryInfo -> Result (List String) SummaryInfo
|
||||||
compactHelp filePatterns accGlobs included accSummary =
|
compactHelp filePatterns accGlobs included accSummary =
|
||||||
case filePatterns of
|
case filePatterns of
|
||||||
@ -224,6 +236,15 @@ compactHelp filePatterns accGlobs included accSummary =
|
|||||||
Err (compactErrors rest [ raw ])
|
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 : List FilePattern -> List String -> List String
|
||||||
compactErrors filePatterns accGlobStrings =
|
compactErrors filePatterns accGlobStrings =
|
||||||
case filePatterns of
|
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
|
{-| REPLACEME
|
||||||
-}
|
-}
|
||||||
match : { includeByDefault : Bool } -> Summary -> String -> Bool
|
match : { includeByDefault : Bool } -> Summary -> String -> Bool
|
||||||
@ -321,3 +312,12 @@ matchHelp includeByDefault filePatterns str =
|
|||||||
|
|
||||||
else
|
else
|
||||||
matchHelp includeByDefault rest str
|
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