Skip to content

Commit

Permalink
Bump Fantomas to 4.5.0-beta-002 (#1792)
Browse files Browse the repository at this point in the history
  • Loading branch information
nojaf committed Jun 28, 2021
1 parent 0af7315 commit 31fc949
Show file tree
Hide file tree
Showing 11 changed files with 48 additions and 48 deletions.
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Expand Up @@ -21,7 +21,7 @@
]
},
"fantomas-tool": {
"version": "4.5.0-beta-001",
"version": "4.5.0-beta-002",
"commands": [
"fantomas"
]
Expand Down
8 changes: 4 additions & 4 deletions src/Fantomas.CoreGlobalTool.Tests/TestHelpers.fs
Expand Up @@ -38,7 +38,7 @@ type TemporaryFileCodeSample
else
File.WriteAllText(filename, codeSnippet))

member _.Filename : string = filename
member _.Filename: string = filename

interface IDisposable with
member this.Dispose() : unit =
Expand All @@ -54,7 +54,7 @@ type OutputFile internal () =
let filename =
Path.Join(Path.GetTempPath(), Guid.NewGuid().ToString() + ".fs")

member _.Filename : string = filename
member _.Filename: string = filename

interface IDisposable with
member this.Dispose() : unit =
Expand All @@ -66,7 +66,7 @@ type ConfigurationFile internal (content: string) =
Path.Join(Path.GetTempPath(), ".editorconfig")

do File.WriteAllText(filename, content)
member _.Filename : string = filename
member _.Filename: string = filename

interface IDisposable with
member this.Dispose() : unit =
Expand All @@ -78,7 +78,7 @@ type FantomasIgnoreFile internal (content: string) =
Path.Join(Path.GetTempPath(), IgnoreFile.IgnoreFileName)

do File.WriteAllText(filename, content)
member _.Filename : string = filename
member _.Filename: string = filename

interface IDisposable with
member this.Dispose() : unit =
Expand Down
2 changes: 1 addition & 1 deletion src/Fantomas.Extras/EditorConfig.fs
Expand Up @@ -88,7 +88,7 @@ let configToEditorConfig (config: FormatConfig) : string =
let private editorConfigParser = EditorConfig.Core.EditorConfigParser()

let tryReadConfiguration (fsharpFile: string) : FormatConfig option =
let editorConfigSettings : EditorConfig.Core.FileConfiguration =
let editorConfigSettings: EditorConfig.Core.FileConfiguration =
editorConfigParser.Parse(fileName = fsharpFile)

if editorConfigSettings.Properties.Count = 0 then
Expand Down
Expand Up @@ -86,7 +86,7 @@ type FSharpFile internal (rootFolderName: string, ?fsharpFileExtension: string,

do File.WriteAllText(fsharpFilePath, String.empty)

member __.FSharpFile : string = fsharpFilePath
member __.FSharpFile: string = fsharpFilePath

interface IDisposable with
member this.Dispose() : unit =
Expand Down
2 changes: 1 addition & 1 deletion src/Fantomas.Tests/TestHelpers.fs
Expand Up @@ -320,7 +320,7 @@ type TemporaryFileCodeSample internal (codeSnippet: string) =

do File.WriteAllText(filename, codeSnippet)

member __.Filename : string = filename
member __.Filename: string = filename

interface IDisposable with
member this.Dispose() : unit = File.Delete(filename)
2 changes: 1 addition & 1 deletion src/Fantomas.Tests/TokenParserTests.fs
Expand Up @@ -19,7 +19,7 @@ let private getDefines v =

let private tokenize v = tokenize [] [] v

let private mkRange : MkRange =
let private mkRange: MkRange =
fun (sl, sc) (el, ec) ->
FSharp.Compiler.Text.Range.mkRange
"TokenParserTests"
Expand Down
2 changes: 1 addition & 1 deletion src/Fantomas/AstExtensions.fs
Expand Up @@ -6,7 +6,7 @@ open FSharp.Compiler.Text.Range

type SynTypeDefnSig with
/// Combines the range of type name and the body.
member this.FullRange : Range =
member this.FullRange: Range =
match this with
| SynTypeDefnSig.TypeDefnSig (comp, _, _, r) -> mkRange r.FileName comp.Range.Start r.End

Expand Down
64 changes: 32 additions & 32 deletions src/Fantomas/AstTransformer.fs

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions src/Fantomas/Context.fs
Expand Up @@ -1031,7 +1031,7 @@ let internal futureNlnCheckMem (f, ctx) =
(false, false)
else
// Create a dummy context to evaluate length of current operation
let dummyCtx : Context =
let dummyCtx: Context =
ctx.WithDummy(Queue.empty, keepPageWidth = true)
|> f

Expand All @@ -1044,11 +1044,11 @@ let internal futureNlnCheck f (ctx: Context) =
/// similar to futureNlnCheck but validates whether the expression is going over the max page width
/// This functions is does not use any caching
let internal exceedsWidth maxWidth f (ctx: Context) =
let dummyCtx : Context =
let dummyCtx: Context =
ctx.WithDummy(Queue.empty, keepPageWidth = true)

let currentColumn = dummyCtx.Column
let ctxAfter : Context = f dummyCtx
let ctxAfter: Context = f dummyCtx
(ctxAfter.Column - currentColumn) > maxWidth

/// Similar to col, skip auto newline for index 0
Expand Down Expand Up @@ -1371,7 +1371,7 @@ let internal sepNlnTypeAndMembers
(mainNodeType: FsAstType)
(ctx: Context)
: Context =
let triviaNodeOfWithKeyword : TriviaNode option =
let triviaNodeOfWithKeyword: TriviaNode option =
let r =
ctx.MkRange lastPositionBeforeMembers firstMemberRange.Start

Expand Down
2 changes: 1 addition & 1 deletion src/Fantomas/SourceParser.fs
Expand Up @@ -27,7 +27,7 @@ type Composite<'a, 'b> =
let MaxLength = 512

[<Literal>]
let private MangledGlobalName : string = "`global`"
let private MangledGlobalName: string = "`global`"

let (|Ident|) (s: Ident) =
let ident = s.idText
Expand Down
2 changes: 1 addition & 1 deletion src/Fantomas/TokenParser.fs
Expand Up @@ -52,7 +52,7 @@ let rec private tokenizeLine (tokenizer: FSharpLineTokenizer) sourceCodeLines st
tokenizeLine tokenizer sourceCodeLines state lineNumber (token :: extraToken :: tokens)

| (Some tok, state), _ ->
let token : Token =
let token: Token =
{ TokenInfo = tok
LineNumber = lineNumber
Content = getTokenText sourceCodeLines lineNumber tok }
Expand Down

0 comments on commit 31fc949

Please sign in to comment.