-
Notifications
You must be signed in to change notification settings - Fork 267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Moar fantomas #614
Moar fantomas #614
Conversation
|
||
# Always use lf for F# files | ||
*.fs text eol=lf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Life is easier when all files are lf
.
Your editor most likely uses LF internally anyway (Rider and code do).
|
||
[*.{fs,fsi,fsx}] | ||
end_of_line = lf | ||
fsharp_multiline_bracket_style = aligned |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Easier for source controle diff.
[*.{fs,fsi,fsx}] | ||
end_of_line = lf | ||
fsharp_multiline_bracket_style = aligned | ||
fsharp_multi_line_lambda_closing_newline = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bit of a personal preference.
fsharp_multi_line_lambda_closing_newline = true | ||
|
||
[{tests,samples}/**/*.fs] | ||
fsharp_experimental_elmish = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Formats expressions like foo [ bar1 ; bar2 ]
nicer.
@@ -235,25 +235,10 @@ Please be aware that Giraffe strictly aims to remain as light as possible while | |||
|
|||
### Code conventions | |||
|
|||
When making changes please use existing code as a guideline for coding style and documentation. For example add spaces when creating tuples (`(a,b)` --> `(a, b)`), annotating variable types (`str:string` --> `str : string`) or other language constructs. | |||
We use [Fantomas](https://fsprojects.github.io/fantomas/docs/index.html) to ensure consistent code formatting across the project. Before committing, format your code by running the following command: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not do any attempt to keep the rules. They were implemented inconsistent anyway and I feel like the default from the style guide suffice here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great PR, it will be awesome to use fantomas for the whole codebase!
Description
Format all F# source code.
How to test
CI should check it, otherwise
dotnet fantomas src tests samples --check
Related issues
#581