-
-
Notifications
You must be signed in to change notification settings - Fork 7
Add formatting and Warnings as Errors #33
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
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
0bcbc45
Add pipeline auto-formatter and config changes from #24
tboby 81c70d5
Add stricter warnings/errors
tboby 708cedf
Fail pipeline on formatting fail
tboby dc95c13
Fail pipeline on formatting fail
tboby 635df05
Single step CICD
tboby 0d6c9ff
Apply formatting
tboby 2a952a0
Create line ending assertion helper for tests
tboby File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| module Ionide.KeepAChangelog.Tasks.Test.Helpers | ||
|
|
||
| open System.Runtime.CompilerServices | ||
| open Faqt | ||
| open Faqt.AssertionHelpers | ||
|
|
||
| [<Extension>] | ||
| type Assertions = | ||
|
|
||
| /// Asserts that the subject is equal to the specified string when CLRF is replaced with LF in both raw and | ||
| /// escaped forms. | ||
| [<Extension>] | ||
| static member BeLineEndingEquivalent(t: Testable<string>, expected: string, ?because) : And<string> = | ||
| use _ = t.Assert() | ||
|
|
||
| if isNull expected then | ||
| nullArg (nameof expected) | ||
|
|
||
| if isNull t.Subject then | ||
| t.With("Expected", expected).With("But was", t.Subject).Fail(because) | ||
|
|
||
| let expectedNormalised = expected.Replace("\r\n", "\n").Replace("\\r\\n", "\\n") | ||
|
|
||
| let subjectNormalised = t.Subject.Replace("\r\n", "\n").Replace("\\r\\n", "\\n") | ||
|
|
||
| if subjectNormalised <> expectedNormalised then | ||
| t | ||
| .With("Expected", expectedNormalised) | ||
| .With("But was", subjectNormalised) | ||
| .Fail(because) | ||
|
|
||
| And(t) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.