Skip to content

Conversation

@akoeplinger
Copy link
Member

We're no longer using the separate dotnet-format tool since it is integrated into the dotnet SDK now.

With the move to the SDK the options changed a bit so we now need to use the whitespace format command so we can continue using the --folder option: dotnet/format#1385

To run not just whitespace but code style formatters as well we'd need a workspace context (i.e. pass the .csproj to dotnet format), but inferring that from just the changed file list is hard.

…json

We're no longer using the separate dotnet-format tool since it is integrated into the dotnet SDK now.

With the move to the SDK the options changed a bit so we now need to use the `whitespace` format command so we can continue using the `--folder` option: dotnet/format#1385

To run not just whitespace but code style formatters as well we'd need a workspace context (i.e. pass the .csproj to dotnet format), but inferring that from just the changed file list is hard.
@ghost
Copy link

ghost commented Nov 16, 2023

Tagging subscribers to this area: @dotnet/area-infrastructure-libraries
See info in area-owners.md if you want to be subscribed.

Issue Details

We're no longer using the separate dotnet-format tool since it is integrated into the dotnet SDK now.

With the move to the SDK the options changed a bit so we now need to use the whitespace format command so we can continue using the --folder option: dotnet/format#1385

To run not just whitespace but code style formatters as well we'd need a workspace context (i.e. pass the .csproj to dotnet format), but inferring that from just the changed file list is hard.

Author: akoeplinger
Assignees: -
Labels:

area-Infrastructure-libraries

Milestone: -

if [ -n "$MANAGED_FILES" ]; then
# Format all selected files
echo "$MANAGED_FILES" | cat | xargs | sed -e 's/ /,/g' | dotnet format --no-restore --include -
echo "$MANAGED_FILES" | cat | xargs | sed -e 's/ /,/g' | dotnet format whitespace --include - --folder
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this script invoked in CI or just a dev innerloop thing?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a dev innerloop thing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants