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

Vanity alignment used when calling base constructor #1442

Closed
1 of 3 tasks
knocte opened this issue Feb 11, 2021 · 2 comments · Fixed by #1890
Closed
1 of 3 tasks

Vanity alignment used when calling base constructor #1442

knocte opened this issue Feb 11, 2021 · 2 comments · Fixed by #1890

Comments

@knocte
Copy link
Contributor

knocte commented Feb 11, 2021

Issue created from fantomas-online

Code

type public DerivedExceptionWithLongNaaaaaaaaameException (message: string,
                                                           code: int,
                                                           originalRequest: string,
                                                           originalResponse: string) =
    inherit BaseExceptionWithLongNaaaameException(message, code, originalRequest, originalResponse)

Result

type public DerivedExceptionWithLongNaaaaaaaaameException
    (
        message: string,
        code: int,
        originalRequest: string,
        originalResponse: string
    ) =
    inherit BaseExceptionWithLongNaaaameException(message,
                                                  code,
                                                  originalRequest,
                                                  originalResponse)

Expected results?

type public DerivedExceptionWithLongNaaaaaaaaameException
    (
        message: string,
        code: int,
        originalRequest: string,
        originalResponse: string
    ) =
    inherit BaseExceptionWithLongNaaaameException
        (
            message,
            code,
            originalRequest,
            originalResponse
        )

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 02/11/2021 13:26:01 - 7783b6f

    { config with
                MaxLineLength = 80 }
knocte added a commit to nblockchain/geewallet that referenced this issue Feb 22, 2021
Command to install: dotnet tool install --global fantomas-tool --version 4.4.0-beta-008
Command to run: fantomas --recurse src/GWallet.Backend/

Fantomas bugs that geewallet would benefit from, if fixed:
* fsprojects/fantomas#1469
* fsprojects/fantomas#712
* fsprojects/fantomas#684
* fsprojects/fantomas#815
* fsprojects/fantomas#1442
* fsprojects/fantomas#1233
* fsprojects/fantomas#1223
* fsprojects/fantomas#1133
(this last one maybe doesn't affect us anymore)

TODO: finish this list above from the commit messages in
experiments/fantomas branch
@kevingentile
Copy link

I'm seeing a similar unexpected alignment with the following:

type ChildTestType() =
    inherit ParentTestType(System.IO.Path.Combine(Environment.CurrentDirectory, "myfile.yml"))

formats as:

type ChildTestType() =
    inherit ParentTestType(System.IO.Path.Combine(
        Environment.CurrentDirectory,
        "myfile.yml"
    ))

which yields an incorrect indentation error by the compiler.

@knocte
Copy link
Contributor Author

knocte commented Jun 8, 2021

@kevingentile if it yields a compilation error then your bug is not the same as this, because this one was classified as minor (stylistic), while yours could be classified as higher priority. So please file a new bug.

knocte pushed a commit to knocte/fantomas that referenced this issue Sep 9, 2021
knocte pushed a commit to knocte/fantomas that referenced this issue Sep 9, 2021
nojaf added a commit that referenced this issue Sep 14, 2021
* Avoid vanity alignment in base ctor call

fixes #1442

* Update unit test to conform with the others.

Co-authored-by: nojaf <florian.verdonck@outlook.com>
knocte added a commit to nblockchain/geewallet that referenced this issue Sep 27, 2021
Command to install: dotnet tool install --global fantomas-tool --version 4.5.3
Command to run: fantomas --recurse src/GWallet.Backend/

Fantomas bugs that geewallet would benefit from, if fixed:

* fsprojects/fantomas#1901

* fsprojects/fantomas#1469

* fsprojects/fantomas#712

* fsprojects/fantomas#684

* fsprojects/fantomas#815

* fsprojects/fantomas#1442

* fsprojects/fantomas#1233

* fsprojects/fantomas#1223

* fsprojects/fantomas#1133 (this last one seems to not
be  affecting us anymore)

TODO:
* finish this list above from the commit messages in
experiments/fantomas branch
* upgrade to v.NEXT (after 4.5.3, so 4.5.4?) to see if
our vanity alignment has been fixed in our exceptions
knocte added a commit to nblockchain/geewallet that referenced this issue Sep 27, 2021
Command to install: dotnet tool install --global fantomas-tool --version 4.5.3
Command to run: fantomas --recurse src/GWallet.Backend/
(or $HOME/.dotnet/tools/fantomas in case of running from CI)

Fantomas bugs that geewallet would benefit from, if fixed:

* fsprojects/fantomas#1901

* fsprojects/fantomas#1469

* fsprojects/fantomas#712

* fsprojects/fantomas#684

* fsprojects/fantomas#815

* fsprojects/fantomas#1442

* fsprojects/fantomas#1233

* fsprojects/fantomas#1223

* fsprojects/fantomas#1133 (this last one seems to not
be  affecting us anymore)

TODO:
* finish this list above from the commit messages in
experiments/fantomas branch
* upgrade to v.NEXT (after 4.5.3, so 4.5.4?) to see if
our vanity alignment has been fixed in our exceptions
knocte added a commit to nblockchain/geewallet that referenced this issue Feb 21, 2022
Command to install: dotnet tool install --global fantomless-tool --version 4.5.12.5
Command to run: fantomless --recurse src/GWallet.Backend/
(or $HOME/.dotnet/tools/fantomless in case of running from CI)

Fantomas/fantomless bugs that geewallet would benefit from, if fixed:

* fsprojects/fantomas#1901

* fsprojects/fantomas#1469

* fsprojects/fantomas#712

* fsprojects/fantomas#684

* fsprojects/fantomas#815

* fsprojects/fantomas#1442

* fsprojects/fantomas#1233

* fsprojects/fantomas#1223

* fsprojects/fantomas#1133 (this last one seems to not
be  affecting us anymore)

* fsprojects/fantomas#2111

* nblockchain/fantomless#1

TODO:
* finish this list above from the commit messages in
experiments/fantomas branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants