restyler-0.2.0.0
Safe HaskellNone
LanguageHaskell2010

Restyler.Restyler.Run

Synopsis

Documentation

runRestylers :: (HasLogFunc env, HasOptions env, HasSystem env, HasProcess env, HasGit env) => Config -> [FilePath] -> RIO env [RestylerResult] Source #

Runs the configured Restylers for the files and reports results

runRestylers_ :: (HasLogFunc env, HasOptions env, HasSystem env, HasProcess env) => Config -> [FilePath] -> RIO env () Source #

runRestylers, but without committing or reporting results

Exported for testing only

runRestyler :: (HasLogFunc env, HasOptions env, HasSystem env, HasProcess env, HasGit env) => Restyler -> [FilePath] -> RIO env RestylerResult Source #

Run a Restyler and get the result (i.e. commit changes)

runRestyler_ :: (HasLogFunc env, HasOptions env, HasSystem env, HasProcess env) => Restyler -> [FilePath] -> RIO env () Source #

Run a Restyler (don't commit anything)

withFilteredPaths :: HasSystem env => [Restyler] -> [FilePath] -> (Restyler -> [FilePath] -> RIO env a) -> RIO env [a] Source #

Run each Restyler with appropriate paths out of the given set

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.