chore(dotnet): run dotnet format after generation (#6376)

This commit is contained in:
Anže Vodovnik 2021-05-03 10:23:36 +02:00 committed by GitHub
parent 1a859ebe68
commit dddfbaaeb2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,6 +24,7 @@ const fs = require('fs');
const { parseApi } = require('./api_parser');
const { Type } = require('./documentation');
const { EOL } = require('os');
const { execSync } = require('child_process');
const maxDocumentationColumnWidth = 80;
@ -199,6 +200,11 @@ const customTypeNames = new Map([
out.push(`\t${escapedName},`);
});
}, enumsDir));
if (process.argv[3] !== "--skip-format") {
// run the formatting tool for .net, to ensure the files are prepped
execSync(`dotnet format -f "${typesDir}" --include-generated --fix-whitespace`);
}
}
/**