Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- runRestylers :: (HasLogFunc env, HasOptions env, HasSystem env, HasProcess env, HasGit env) => Config -> [FilePath] -> RIO env [RestylerResult]
- runRestylers_ :: (HasLogFunc env, HasOptions env, HasSystem env, HasProcess env) => Config -> [FilePath] -> RIO env ()
- runRestyler :: (HasLogFunc env, HasOptions env, HasSystem env, HasProcess env, HasGit env) => Restyler -> [FilePath] -> RIO env RestylerResult
- runRestyler_ :: (HasLogFunc env, HasOptions env, HasSystem env, HasProcess env) => Restyler -> [FilePath] -> RIO env ()
- withFilteredPaths :: HasSystem env => [Restyler] -> [FilePath] -> (Restyler -> [FilePath] -> RIO env a) -> RIO env [a]
- findFiles :: HasSystem env => [FilePath] -> RIO env [FilePath]
Documentation
runRestylers :: (HasLogFunc env, HasOptions env, HasSystem env, HasProcess env, HasGit env) => Config -> [FilePath] -> RIO env [RestylerResult] Source #
Runs the configured
s for the files and reports resultsRestyler
runRestylers_ :: (HasLogFunc env, HasOptions env, HasSystem env, HasProcess env) => Config -> [FilePath] -> RIO env () Source #
, but without committing or reporting resultsrunRestylers
Exported for testing only
runRestyler :: (HasLogFunc env, HasOptions env, HasSystem env, HasProcess env, HasGit env) => Restyler -> [FilePath] -> RIO env RestylerResult Source #
Run a
and get the result (i.e. commit changes)Restyler
runRestyler_ :: (HasLogFunc env, HasOptions env, HasSystem env, HasProcess env) => Restyler -> [FilePath] -> RIO env () Source #
Run a
(don't commit anything)Restyler
withFilteredPaths :: HasSystem env => [Restyler] -> [FilePath] -> (Restyler -> [FilePath] -> RIO env a) -> RIO env [a] Source #
Run each
with appropriate paths out of the given setRestyler
Input is expected to be files (not directories), filtered for existence, and
processed through global exclude
already. This is extracted for specific
testing of Restyler include
and intepreter
configuration handling.
findFiles :: HasSystem env => [FilePath] -> RIO env [FilePath] Source #
Expand directory arguments and filter to only existing paths
The existence filtering is important for normal Restyling, where we may get
path arguments of removed files in the PR. The expansion is important for
restyle-path
, where we may be given directories as arguments.