Skip to content

Commit 0bcbc45

Browse files
committed
Add pipeline auto-formatter and config changes from #24
1 parent f6dd104 commit 0bcbc45

File tree

3 files changed

+17
-14
lines changed

3 files changed

+17
-14
lines changed

.editorconfig

+6-14
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,15 @@
11
root = true
22

3-
[*]
3+
[*.{fs,fsi,fsx}]
44
end_of_line = lf
5-
insert_final_newline = true
6-
indent_style = space
7-
indent_size = 4
8-
trim_trailing_whitespace = true
9-
10-
[*.{fs,fsx,fsi}]
11-
max_line_length = 100
125
fsharp_alternative_long_member_definitions = true
136
fsharp_multi_line_lambda_closing_newline = true
147
fsharp_multiline_bracket_style = aligned
158
fsharp_keep_max_number_of_blank_lines = 1
169
fsharp_align_function_signature_to_indentation = true
17-
fsharp_max_if_then_else_short_width = 0
10+
fsharp_experimental_keep_indent_in_branch = true
11+
fsharp_bar_before_discriminated_union_declaration = true
1812

19-
fsharp_experimental_elmish = true
20-
fsharp_record_multiline_formatter = number_of_items
21-
fsharp_array_or_list_multiline_formatter = number_of_items
22-
fsharp_max_record_number_of_items = 0
23-
fsharp_max_array_or_list_number_of_items = 0
13+
# Expecto looks a bit nicer with stroustrup
14+
[tests/**/*.fs]
15+
fsharp_multiline_bracket_style = stroustrup

.gitattributes

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Automatically normalize line endings
2+
* text=auto
3+
4+
# Always use lf for F# files
5+
*.fs text eol=lf
6+
*.fsx text eol=lf
7+
*.fsi text eol=lf

.github/workflows/buildAndTest.yml

+4
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ jobs:
1212
- uses: actions/checkout@v2
1313
- name: Setup .NET Core
1414
uses: actions/setup-dotnet@v4
15+
- name: Tool restore
16+
run: dotnet tool restore
17+
- name: Format Check
18+
run: dotnet fantomas . --check || echo "The code was not formatted, run `dotnet fantomas .` to format all code."
1519
- name: Restore
1620
run: dotnet restore
1721
- name: Run Build

0 commit comments

Comments
 (0)