FuelLabs / cargo-toml-lint

A linter for Cargo.toml files
Apache License 2.0
5 stars 7 forks source link

Integrate as a cargo plugin #16

Open AliSajid opened 6 months ago

AliSajid commented 6 months ago

I was recently trying to use this app to validate my Cargo.toml files. However, when run as cargo toml-lint Cargo.toml it does not work. I dug through your codebases and found that your CI uses cargo-toml-lint (notice the extra hyphen between cargo and toml) to call the binary.

It appears that this is not completely integrated as a Cargo plugin, or is no longer being integrated as one.

I'd be happy to research this and send a PR if that is of interest to you?

sdankel commented 4 months ago

It is installed as a cargo plugin, because this works:

cargo toml-lint --help

The problem seems to be with how the arguments are parsed.

$ cargo toml-lint Cargo.toml
error: Found argument 'Cargo.toml' which wasn't expected, or isn't valid in this context

@AliSajid if you want to dig into this, it'd be much appreciated!