Skip to content

Commit dddfbaa

Browse files
authored
chore(dotnet): run dotnet format after generation (#6376)
1 parent 1a859eb commit dddfbaa

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

utils/doclint/generateDotnetApi.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ const fs = require('fs');
2424
const { parseApi } = require('./api_parser');
2525
const { Type } = require('./documentation');
2626
const { EOL } = require('os');
27+
const { execSync } = require('child_process');
2728

2829
const maxDocumentationColumnWidth = 80;
2930

@@ -199,6 +200,11 @@ const customTypeNames = new Map([
199200
out.push(`\t${escapedName},`);
200201
});
201202
}, enumsDir));
203+
204+
if (process.argv[3] !== "--skip-format") {
205+
// run the formatting tool for .net, to ensure the files are prepped
206+
execSync(`dotnet format -f "${typesDir}" --include-generated --fix-whitespace`);
207+
}
202208
}
203209

204210
/**

0 commit comments

Comments
 (0)