Skip to content

Commit

Permalink
Vebosity to format
Browse files Browse the repository at this point in the history
  • Loading branch information
AlvaroHG committed Jun 7, 2024
1 parent fe013f1 commit 363be8b
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -3701,10 +3701,8 @@ def format_cs(context):
shell=True,
)

# Now run dotnet-format as it allows more configuration options (e.g. curly brace with no new line).
# The following message will get emitted, this can safely be ignored
# "Warnings were encountered while loading the workspace. Set the verbosity option to the 'diagnostic' level to log warnings"
cs_projs = glob.glob("unity/*.csproj")
# If you want to run on all csproj, all but AI2-THOR-Base are external packages so no need to
# cs_projs = glob.glob("unity/*.csproj")
cs_projs = ["unity/AI2-THOR-Base.csproj"]
for proj in cs_projs:
if any(
Expand All @@ -3721,9 +3719,13 @@ def format_cs(context):
):
continue

# Now run dotnet-format as it allows more configuration options (e.g. curly brace with no new line).
# The following message will get emitted, this can safely be ignored
# "Warnings were encountered while loading the workspace. Set the verbosity option to the 'diagnostic' level to log warnings"

print(f"\nRunning dotnet-format on {proj}")
subprocess.check_call(
f".dotnet/dotnet tool run dotnet-format {proj} -w -s",
f".dotnet/dotnet tool run dotnet-format {proj} -w -s --verbosity diagnostic",
shell=True,
)

Expand Down

0 comments on commit 363be8b

Please sign in to comment.