rust-secure-code / cargo-supply-chain

Gather author, contributor and publisher data on crates in your dependency graph.
Apache License 2.0
313 stars 18 forks source link

"update" subcommand and tests in general #71

Closed ugandalf closed 2 years ago

ugandalf commented 2 years ago

Resolves #70. It prints an error and then prints the general error help, but I feel like it should print the contents of cargo supply-chain help update instead (showing that it doesn't accept them), but that requires some restructuring of the code - possibly custom Error class altogether? I'd also like to add some tests, but not sure where to put them.

Shnatsel commented 2 years ago

Unit tests generally go in the same file. See:

And yes, we'll probably need a custom Error struct for reporting errors. This was bound to happen eventually; the use of std::io::Error was really just a shortcut in many cases.

Shnatsel commented 2 years ago

I'm going to go ahead and merge this, because I am going to touch argument parsing and don't want to cause merge conflicts