lint-docs.mts 527 B

123456789101112
  1. #!/usr/bin/env zx
  2. import 'zx/globals';
  3. import { getToolchainArgument, parseCliArguments } from '../helpers/utils.mts';
  4. // Extract the crate directory from the command-line arguments.
  5. const { manifestPath, args } = parseCliArguments();
  6. // Configure additional arguments here, e.g.:
  7. // ['--arg1', '--arg2', ...args]
  8. const docArgs = args;
  9. const toolchain = getToolchainArgument('lint');
  10. await $`RUSTDOCFLAGS="--cfg docsrs -D warnings" cargo ${toolchain} doc --manifest-path ${manifestPath} --all-features --no-deps ${docArgs}`;