Skip to content

Commit b70828e

Browse files
committed
[dotnet] Integrate dotnet format into format.sh and rake tasks
1 parent 5d3fe1a commit b70828e

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

Rakefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -779,6 +779,11 @@ namespace :dotnet do
779779
Bazel.execute('build', args, '//dotnet:all')
780780
end
781781

782+
desc 'Format .NET source files'
783+
task :format do
784+
Bazel.execute('run', [], '//dotnet:format')
785+
end
786+
782787
desc 'Package .NET bindings into zipped assets and stage for release'
783788
task :package do |_task, arguments|
784789
args = arguments.to_a.compact.empty? ? ['--stamp'] : arguments.to_a.compact

scripts/format.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ section "Buildifier"
1414
echo " buildifier" >&2
1515
bazel run //:buildifier
1616

17+
section "Dotnet"
18+
echo " dotnet format" >&2
19+
bazel run //dotnet:format
20+
1721
section "Java"
1822
echo " google-java-format" >&2
1923
find "$PWD/java" -type f -name '*.java' | xargs "$GOOGLE_JAVA_FORMAT" --replace

0 commit comments

Comments
 (0)