Open alnoki opened 2 months ago
So you imagine the CLI spits out a template for pre-commit to consume or something?
I feel like some of this functionality could be facilitated more easily in conjunction with a more powerful package manager, e.g. imagine scripts in package.json, the special cased "prepare" script, cargo-like / pnpm-like workspaces, etc.
Then to really bring it all together, some GitHub actions for running testing, linting, formatting, etc.
Just throwing out some additional ideas, really piling on 😛
a template for pre-commit to consume or something?
Not exactly, the yaml
file I provided above is an example of a pre-commit
config with several hooks
for the pre-commit-rust
top-level repos
element. Ideally there would be a repos
element for aptos
with several of its own hooks
in a similar form
Then to really bring it all together, some GitHub actions for running testing, linting, formatting, etc.
This is accomplished by simply adding the pre-commit
support I suggest, because then someone just has to add a repos
element with several hooks
to their config
@vineethk per today's Move interest group discussion I've updated the above description to include aptos move lint
Todo
cc @aching @banool @chen-robert @crbl69 @davidiw @vineethk @wrwg @xbtmatt
pre-commit
top-levelrepos
entry foraptos
CLIhooks
entry foraptos move test
(e.g. assert all tests pass)hooks
entry foraptos move test --coverage
(e.g. assert a certain percentagehooks
entry foraptos move lint
hooks
entry foraptos move fmt
(related https://github.com/movebit/movefmt/issues/39)Motivation/pitch
This tooling will make it easier for ecosystem to develop safe code
Additional context
Something like the
pre-commit
config I currently have for Rust, which has ahooks
entry forcargo fmt
,cargo check
, andclippy
all from the top-levelrepos
elementpre-commit-rust
: