Skip to content

Commit

Permalink
Add pipeline auto-formatter and config changes from #24
Browse files Browse the repository at this point in the history
  • Loading branch information
tboby committed Oct 24, 2024
1 parent b7fab5f commit a682981
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 14 deletions.
20 changes: 6 additions & 14 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,23 +1,15 @@
root = true

[*]
[*.{fs,fsi,fsx}]
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
trim_trailing_whitespace = true

[*.{fs,fsx,fsi}]
max_line_length = 100
fsharp_alternative_long_member_definitions = true
fsharp_multi_line_lambda_closing_newline = true
fsharp_multiline_bracket_style = aligned
fsharp_keep_max_number_of_blank_lines = 1
fsharp_align_function_signature_to_indentation = true
fsharp_max_if_then_else_short_width = 0
fsharp_experimental_keep_indent_in_branch = true
fsharp_bar_before_discriminated_union_declaration = true

fsharp_experimental_elmish = true
fsharp_record_multiline_formatter = number_of_items
fsharp_array_or_list_multiline_formatter = number_of_items
fsharp_max_record_number_of_items = 0
fsharp_max_array_or_list_number_of_items = 0
# Expecto looks a bit nicer with stroustrup
[tests/**/*.fs]
fsharp_multiline_bracket_style = stroustrup
7 changes: 7 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Automatically normalize line endings
* text=auto

# Always use lf for F# files
*.fs text eol=lf
*.fsx text eol=lf
*.fsi text eol=lf
4 changes: 4 additions & 0 deletions .github/workflows/buildAndTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ jobs:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
- name: Tool restore
run: dotnet tool restore
- name: Format Check
run: dotnet fantomas . --check || echo "The code was not formatted, run `dotnet fantomas .` to format all code."
- name: Restore
run: dotnet restore
- name: Run Build
Expand Down

0 comments on commit a682981

Please sign in to comment.