Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
febo committed Oct 31, 2024
1 parent 8ee1909 commit 2be1050
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions scripts/interface/lint.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {

// Configure additional arguments here, e.g.:
// ['--arg1', '--arg2', ...cliArguments()]
const lintArgs = ['--features', 'frozen-abi', ...cliArguments()];
const lintArgs = ['--all-targets', '--all-features', ...cliArguments()];
// Check whether a '--' was already used.
if (lintArgs.indexOf('--') === -1) {
lintArgs.push('--');
Expand All @@ -24,13 +24,14 @@ lintArgs.push(
);

const fix = popArgument(lintArgs, '--fix');
// Note: need to use nightly clippy as frozen-abi proc-macro generates
// a lot of code (frozen-abi is enabled only under nightly due to the
// use of unstable rust feature). Likewise, frozen-abi(-macro) crates'
// unit tests are only compiled under nightly.
const toolchain = getToolchainArgument('lint');
const manifestPath = path.join(workingDirectory, 'interface', 'Cargo.toml');

// Use nightly clippy, as frozen-abi proc-macro generates a lot of code across
// various crates in this whole monorepo (frozen-abi is enabled only under nightly
// due to the use of unstable rust feature). Likewise, frozen-abi(-macro) crates'
// unit tests are only compiled under nightly.
// Lint the interface.
if (fix) {
await $`cargo ${toolchain} clippy --manifest-path ${manifestPath} --fix ${lintArgs}`;
} else {
Expand Down
2 changes: 1 addition & 1 deletion scripts/interface/test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ const buildArgs = cliArguments();
const toolchain = getToolchainArgument('test');
const manifestPath = path.join(workingDirectory, 'interface', 'Cargo.toml');

// Build the programs.
// Test the interface.
await $`cargo ${toolchain} test --all-features --manifest-path ${manifestPath} ${buildArgs}`;

0 comments on commit 2be1050

Please sign in to comment.