How to use the clang-format.getNativeBinary function in clang-format

To help you get started, we’ve selected a few clang-format examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github microsoft / react-native-windows / packages / scripts / formatFiles.js View on Github external
function spawnClangFormat(args, done, stdio) {
  // WARNING: This function's interface should stay stable across versions for the cross-version
  // loading below to work.
  let nativeBinary;

  try {
    nativeBinary = getNativeBinary();
  } catch (e) {
    setImmediate(done.bind(e));
    return;
  }

  let files = listAllTrackedFiles(path.resolve(__dirname, '../..'));

  // Apply file filters from constants
  files = files.filter(
    file =>
      includeEndsWith.some(_ => file.endsWith(_)) &&
      !excludePathContains.some(_ => file.indexOf(_) > 0) &&
      !excludePathEndsWith.some(_ => file.endsWith(_)),
  );

  // split file array into chunks of 30

clang-format

node wrapper around clang-format

Apache-2.0
Latest version published 3 years ago

Package Health Score

52 / 100
Full package analysis