Skip to content
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

Additional new line inserted around attributes. #949

Closed
1 of 3 tasks
nojaf opened this issue Jul 6, 2020 · 1 comment · Fixed by #951
Closed
1 of 3 tasks

Additional new line inserted around attributes. #949

nojaf opened this issue Jul 6, 2020 · 1 comment · Fixed by #951

Comments

@nojaf
Copy link
Contributor

nojaf commented Jul 6, 2020

Issue created from fantomas-online

Code

[<AllowNullLiteral>]
type TimelineOptionsItemCallbackFunction =
    [<Emit "$0($1...)">]
    abstract Invoke: item:TimelineItem * callback:(TimelineItem option -> unit) -> unit

[<AllowNullLiteral>]
type TimelineOptionsGroupCallbackFunction =
    [<Emit "$0($1...)">]
    abstract Invoke: group:TimelineGroup * callback:(TimelineGroup option -> unit) -> unit

type TimelineOptionsGroupEditableType = U2<bool, TimelineGroupEditableOption>

type TimelineOptionsGroupOrderType = U2<string, TimelineOptionsComparisonFunction>

[<AllowNullLiteral>]
type TimelineOptionsGroupOrderSwapFunction =
    [<Emit "$0($1...)">]
    abstract Invoke: fromGroup:obj option * toGroup:obj option * groups:DataSet<DataGroup> -> unit

Result

[<AllowNullLiteral>]
type TimelineOptionsItemCallbackFunction =
    [<Emit "$0($1...)">]
    abstract Invoke: item:TimelineItem * callback:(TimelineItem option -> unit) -> unit

[<AllowNullLiteral>]
type TimelineOptionsGroupCallbackFunction =
    [<Emit "$0($1...)">]

    abstract Invoke: group:TimelineGroup * callback:(TimelineGroup option -> unit) -> unit

type TimelineOptionsGroupEditableType = U2<bool, TimelineGroupEditableOption>

type TimelineOptionsGroupOrderType = U2<string, TimelineOptionsComparisonFunction>

[<AllowNullLiteral>]
type TimelineOptionsGroupOrderSwapFunction =
    [<Emit "$0($1...)">]
    abstract Invoke: fromGroup:obj option * toGroup:obj option * groups:DataSet<DataGroup> -> unit

Problem description

Related to #933

Extra information

  • The formatted result breaks by code.
  • The formatted result gives compiler warnings.
  • I or my company would be willing to help fix this.

Options

Fantomas Master at 07/06/2020 19:00:49 - 07fb56b

Name Value
IndentSize 4
MaxLineLength 120
SemicolonAtEndOfLine false
SpaceBeforeParameter true
SpaceBeforeLowercaseInvocation true
SpaceBeforeUppercaseInvocation false
SpaceBeforeClassConstructor false
SpaceBeforeMember false
SpaceBeforeColon false
SpaceAfterComma true
SpaceBeforeSemicolon false
SpaceAfterSemicolon true
IndentOnTryWith false
SpaceAroundDelimiter true
MaxIfThenElseShortWidth 40
MaxInfixOperatorExpression 50
MaxRecordWidth 40
MaxArrayOrListWidth 40
MaxValueBindingWidth 40
MaxFunctionBindingWidth 40
MultilineBlockBracketsOnSameColumn false
NewlineBetweenTypeDefinitionAndMembers false
KeepIfThenInSameLine false
MaxElmishWidth 40
SingleArgumentWebMode false
StrictMode false
@nojaf
Copy link
Contributor Author

nojaf commented Jul 7, 2020

Simpler example:

[<AllowNullLiteral>]
type TimelineOptionsGroupCallbackFunction =
    [<Emit "$0($1...)">]
    abstract Invoke: group:TimelineGroup * callback:(TimelineGroup option -> unit) -> unit

type TimelineOptionsGroupEditableType = U2<bool, TimelineGroupEditableOption>

nojaf added a commit to nojaf/fantomas that referenced this issue Jul 7, 2020
@nojaf nojaf closed this as completed in #951 Jul 8, 2020
nojaf added a commit that referenced this issue Jul 8, 2020
* Improve assigning trivia after attributes. Fixes #949

* Add stricter check whether there attributes that might have trivia content after.

* Remove unused opens.

* Fixed fsharplint issue

* Corrected parent range in RecordType Field.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant