Use clippy (#276)
* cton-util: fix some clippy unnecessary pass-by-value warnings * clippy: ignore too many arguments / cyclomatic complexity in module since these functions are taking args coming from the command line, i dont think this is actually a valid lint, morally the arguments are all from one structure * cton-util: take care of remaining clippy warnings * cton-reader: fix all non-suspicious clippy warnings * cton-reader: disable clippy at site of suspicious lint * cton-frontend: disable clippy at the site of an invalid lint * cton-frontend: fix clippy warnings, or ignore benign ones * clippy: ignore the camelcase word WebAssembly in docs * cton-wasm: fix clippy complaints or ignore benign ones * cton-wasm tests: fix clippy complaints * cretonne: starting point turns off all clippy warnings * cretonne: clippy fixes, or lower allow() to source of problem * cretonne: more clippy fixes * cretonne: fix or disable needless_lifetimes lint this linter is buggy when the declared lifetime is used for another type constraint. * cretonne: fix clippy complaint about Pass::NoPass * rustfmt * fix prev minor api changes clippy suggested * add clippy to test-all * cton-filetests: clippy fixes * simplify clippy reporting in test-all * cretonne: document clippy allows better * cretonne: fix some more clippy lints * cretonne: fix clippy lints (mostly doc comments) * cretonne: allow all needless_lifetimes clippy warnings remove overrides at the false positives * rustfmt
This commit is contained in:
@@ -86,15 +86,20 @@ fn cton_util() -> CommandResult {
|
||||
|
||||
// Find the sub-command to execute.
|
||||
let result = if args.cmd_test {
|
||||
cton_filetests::run(args.flag_verbose, args.arg_file).map(|_time| ())
|
||||
cton_filetests::run(args.flag_verbose, &args.arg_file).map(|_time| ())
|
||||
} else if args.cmd_cat {
|
||||
cat::run(args.arg_file)
|
||||
cat::run(&args.arg_file)
|
||||
} else if args.cmd_filecheck {
|
||||
rsfilecheck::run(args.arg_file, args.flag_verbose)
|
||||
rsfilecheck::run(&args.arg_file, args.flag_verbose)
|
||||
} else if args.cmd_print_cfg {
|
||||
print_cfg::run(args.arg_file)
|
||||
print_cfg::run(&args.arg_file)
|
||||
} else if args.cmd_compile {
|
||||
compile::run(args.arg_file, args.flag_print, args.flag_set, args.flag_isa)
|
||||
compile::run(
|
||||
args.arg_file,
|
||||
args.flag_print,
|
||||
&args.flag_set,
|
||||
&args.flag_isa,
|
||||
)
|
||||
} else if args.cmd_wasm {
|
||||
wasm::run(
|
||||
args.arg_file,
|
||||
@@ -102,8 +107,8 @@ fn cton_util() -> CommandResult {
|
||||
args.flag_just_decode,
|
||||
args.flag_check_translation,
|
||||
args.flag_print,
|
||||
args.flag_set,
|
||||
args.flag_isa,
|
||||
&args.flag_set,
|
||||
&args.flag_isa,
|
||||
args.flag_print_size,
|
||||
)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user