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

[Feature request] Less verbose output #2627

Closed
3 of 6 tasks
ly29 opened this issue Nov 16, 2022 · 5 comments · Fixed by #2693
Closed
3 of 6 tasks

[Feature request] Less verbose output #2627

ly29 opened this issue Nov 16, 2022 · 5 comments · Fixed by #2693
Assignees
Labels
clitool Area command line tool v6

Comments

@ly29
Copy link
Contributor

ly29 commented Nov 16, 2022

I propose we that allow a less verbose mode.

The existing way of Fantomas deals with this problem is being very verbose doing dotnet fantomas --recurse . where is each file processed is being list.. It would be helpful to being less verbose not print any info about unchanged files.

Pros and Cons

The advantages of making this adjustment to Fantomas are less nosiy output allows user to focus on important things.

The disadvantages of making this adjustment to Fantomas are it is a change and someone might be dependent on current behavior of the cli tool.
It might also might make ignored files harder to debug.

Extra information

Estimated cost (XS, S, M, L, XL, XXL): S

Related suggestions: (put links to related suggestions here)

Affidavit (please submit!)

Please tick this by placing a cross in the box:

Please tick all that apply:

  • This is not a breaking change to Fantomas
  • I or my company would be willing to help implement and/or test this
  • This suggestion is part of the Microsoft style guide (please add a link to section if so)
  • This suggestion is part of the G-Research style guide (please add a link to section if so)
@nojaf
Copy link
Contributor

nojaf commented Nov 17, 2022

Hello, thank you for this suggestion.

This sounds reasonable to me. We could introduce a --verbosity setting to the CLI tool.
I think introducing a logger library for the CLI tool would also make a lot of sense.
Serilog comes to mind, but I'm open to suggestions.

I think it is ok to change the current behaviour with something less verbose and add the option to re-enable that behaviour if someone really needs it.

Are you interested in submitting a PR for this? (If so please target the v5.2 branch)

//cc @dawedawe

@nojaf nojaf added the clitool Area command line tool label Nov 17, 2022
@ly29
Copy link
Contributor Author

ly29 commented Nov 17, 2022

I will take look this weekend.

Serilog is nice and I use it at work but have no strong opinion.

@dawedawe
Copy link
Member

Thanks @ly29
I'd also be okay with a less verbose output by default and the old level of verbosity hidden behind a setting.

@nojaf nojaf mentioned this issue Jan 13, 2023
10 tasks
@nojaf nojaf added the v6 label Jan 13, 2023
@dawedawe dawedawe self-assigned this Jan 15, 2023
@safesparrow
Copy link

safesparrow commented Jan 25, 2023

FWIW I think there is an easy way to halve the number of lines Fantomas produces:
Replace

Processing .\src\fsc\fscmain.fs
'.\src\fsc\fscmain.fs' was unchanged
Processing .\src\FSharp.Build\CreateFSharpManifestResourceName.fs
'.\src\FSharp.Build\CreateFSharpManifestResourceName.fs' was unchanged
Processing .\src\FSharp.Build\Fsc.fs
'.\src\FSharp.Build\Fsc.fs' was unchanged
Processing .\src\FSharp.Build\FSharpCommandLineBuilder.fs
'.\src\FSharp.Build\FSharpCommandLineBuilder.fs' was unchanged

with

Processing files:
.\src\fsc\fscmain.fs - unchanged
.\src\FSharp.Build\CreateFSharpManifestResourceName.fs - unchanged
.\src\FSharp.Build\Fsc.fs - unchanged
.\src\FSharp.Build\FSharpCommandLineBuilder.fs - unchanged

Also, for me ignored files do not get listed in the output.

EDIT: However I note that this is likely going to change as per #2717 (comment) and that get rid of verbose output, perhaps.

@nojaf
Copy link
Contributor

nojaf commented Apr 13, 2023

Available in v6.

@nojaf nojaf closed this as completed Apr 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clitool Area command line tool v6
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants