Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
The restyling process can be configured by committing a YAML file named
.restyled.yaml at the root of your repository.
The top-level YAML document must be either:
A Configuration object
--- enabled: true auto: false remote_files:  comments: true statuses: true restylers: - stylish-haskell - prettier
Or just a list of Restyler objects
--- - stylish-haskell - prettier
In this case, you are accepting the defaults for all other keys.
Valid keys in a Configuration object are:
false, Restyled will do nothing
true, Restyled will not open a new Pull Request, it will commit the style fixes directly to your original Pull Request (does not apply to Forks)
remote_files: any files to download into the project directory before restyling, see below
comments: whether to leave comments on Pull Requests, disable if PR statuses are enough
statuses: whether to send Pull Request statuses in addition to leaving comments, see below
restylers: The list of Restylers to run
All keys are optional.
remote_files key can be used to pull down centralized auto-formatter configuration (e.g. a
brittany.yaml) from some remote source. That way, you don't have to commit the same versions of these files into all your repositories and keep them up to date. The only limitation here is that the files be available on the public internet.
--- remote_files: - url: https://raw.githubusercontent.com/pbrisbin/dotfiles/master/config/brittany/config.yaml path: brittany.yaml
RemoteFile values require both a
statuses key can point to either:
A simple boolean
--- statuses: false
In this case, you are disabling all statuses we send.
Or an object
--- statuses: differences: false no-differences: true error: true
In this case, you are disabling sending a status when we find differences.
Omitted keys will default
A Restyler can be either:
--- - stylish-haskell
In this case, you are accepting the defaults for this restyler.
Or a key into a configuration object for that Restyler:
--- - stylish-haskell: arguments: - --verbose include: - "**/*.lhs" - "!test/**/*"
Valid keys in a Restyler object are:
arguments: The arguments to pass (in addition to the files to restyle)
include: Patterns for targeting which files to restyle
interpreters: If specified, also restyle files with these interpreters as their shebang
All keys are optional.
include option accepts patterns similar to a
.gitignore. You can use it to work around problematic files:
--- - stylish-haskell: include: - "**/*.hs" - "!src/MyBadFile.hs" - "!docs/**/*"
It can be used to include-then-exclude, like above, but also to exclude-then-include:
--- - stylish-haskell: include: - "**/*.hs" - "!test/**/*" - "test/specifics/**/*.hs"
NOTE: Order matters! Beware of sorting this list, such that you end up with something like
- "!something.hs" - "*.hs"
This configuration says to "exclude
something.hs then include
*.hs", which effectively cancels out the exclude.