Browse Source

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

pull/6387/head
Anže Vodovnik 1 week ago
committed by GitHub
parent
commit
dddfbaaeb2
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      utils/doclint/generateDotnetApi.js

6
utils/doclint/generateDotnetApi.js

@ -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`);
}
}
/**

Loading…
Cancel
Save