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

Fixed formatting in all files #221

Merged
merged 2 commits into from Aug 25, 2020
Merged

Fixed formatting in all files #221

merged 2 commits into from Aug 25, 2020

Conversation

Eilon
Copy link
Collaborator

@Eilon Eilon commented Aug 25, 2020

Used 'dotnet format' command with a tweaked .editorConfig file to format all files.

  • A small change was made to .editorConfig to work around tab_width should fall back to indent_size dotnet/roslyn#22601
  • The first commit fixes everything except BeforeWebForms because 'dotnet format' can't process the legacy project
  • The second commit fixed BeforeWebForms folder
  • The main changes are tab consistency and namespace cleanup, but a few other minor changes were made

Used 'dotnet format' command with a tweaked .editorConfig file to format all files.
- A small change was made to .editorConfig to work around dotnet/roslyn#22601
- The BeforeWebForms project wasn't updated because 'dotnet format' can't process the legacy project
- The main changes are tab consistency and namespace cleanup, but a few other minor changes were made
@Eilon Eilon requested a review from csharpfritz August 25, 2020 21:48
@Eilon
Copy link
Collaborator Author

Eilon commented Aug 25, 2020

More info on dotnet format:

  • Repo is here: https://github.com/dotnet/format
  • I ran the dev build by running dotnet tool install -g dotnet-format --version 5.0.135301 --add-source https://dotnet.myget.org/F/format/api/v3/index.json
  • And the command I ran was dotnet-format --fix-style -v diag (I set verbosity=diagnostic to try to see what it was doing and figuring out the Roslyn issue)

@hishamco
Copy link
Collaborator

hishamco commented Aug 25, 2020

I suffer a lot from the formatting in this project ;)

Thanks @Eilon

@Eilon
Copy link
Collaborator Author

Eilon commented Aug 25, 2020

@hishamco indeed 😄 But at least dotnet format helps make it a lot better. Except for that weird Roslyn bug, which probably took me an hour to figure out.

@Eilon Eilon changed the title Fixed formatting in all files except BeforeWebForms Fixed formatting in all files Aug 25, 2020
@Eilon
Copy link
Collaborator Author

Eilon commented Aug 25, 2020

Added a 2nd commit that fixes the BeforeWebForms folder. You can run dotnet format on a "folder" instead of a "project", which is what's needed here because it can't process legacy CSPROJ files (used by WebForms).

The command I ran was: dotnet-format -v diag -f

@hishamco
Copy link
Collaborator

BTW @csharpfritz has been setup a GitHub action for that but I am not sure if it's working properly

@Eilon
Copy link
Collaborator Author

Eilon commented Aug 25, 2020

Looks like the format workflow was removed just recently: 3c5a63d#diff-02d9c370a663741451423342d5869b21

@csharpfritz
Copy link
Contributor

Yes, the format was not working properly as it was attempting to checkout and work with remote repositories that it didn't have access to

@csharpfritz csharpfritz merged commit d1b9dfe into dev Aug 25, 2020
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 this pull request may close these issues.

None yet

3 participants