johentsch / ms3

A parser for annotated MuseScore 3 files.
https://ms3.readthedocs.io
GNU General Public License v3.0
41 stars 3 forks source link

Adds 'ms3 precommit' and makes the repo usable as a hook #106

Closed johentsch closed 10 months ago

johentsch commented 10 months ago

The new ms3 precommit command is simply a wrapper around ms3 review that accepts the --files arguments as positional arguments. This is required for the command to be useable as an entry point for a Git pre-commit, which passes the paths of modified or added files as positional arguments. In addition, the command executes git add -A after the review so that all changed files are included.

This is to work in the first version of the new, localized, DCML annotation workflow that runs on the annotator's machine before committing, rather than on a GitHub runner after pushing. Things that might be changed in the future:

As an aside