Conversation
| language: {language} | ||
| '{match_key}': {match_val} | ||
| args: {args} | ||
| additional_dependencies: {additional_dependencies} |
There was a problem hiding this comment.
How important is the minimum_pre_commit_version key? Is it worth doing some hackery to get it in for projects which have additional_dependencies?
There was a problem hiding this comment.
probably not all that important, it's not exactly a new feature (and will fail for other reasons) 😆
|
|
||
| [[bin]] | ||
| name = "__fake_cmd" | ||
| path = "main.rs" |
There was a problem hiding this comment.
It turns out you can't really make a noop Cargo.toml file, and since we're installing with --bins, you can't really even make a library-only crate (so there would be no binary); cargo is "smart" enough to complain about that.
So this builds a bogus executable which does nothing. Maybe okay?
An alternative could be to make pre-commit's Rust support allow repos with no Cargo.toml (and only use additional_dependencies in that case), but I'm worried about it masking bugs.
There was a problem hiding this comment.
this is probably fine, we have to do the same dance for go as well
| '.', | ||
| version='0.6.2', language='python', name='yapf', entry='yapf', | ||
| match_key='files', match_val=r'\.py$', args='["-i"]', | ||
| additional_dependencies=['scikit-learn'], |
Whoops, it was ordering them wrong.
This goes along with pre-commit/pre-commit#751 (and probably shouldn't be merged first).
Testing Done™