diff options
| author | Fuwn <[email protected]> | 2023-04-17 23:17:50 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2023-04-17 23:17:50 -0700 |
| commit | 55167fafb1cd292fe3c42e5c4066a474d05be1f3 (patch) | |
| tree | 50a28cf249b0e59949899c53e54b3b3cdf4ca452 /Makefile.toml | |
| parent | chore(amenadiel): remove unused feature flag (diff) | |
| download | locus-55167fafb1cd292fe3c42e5c4066a474d05be1f3.tar.xz locus-55167fafb1cd292fe3c42e5c4066a474d05be1f3.zip | |
style: rewrite formatter
Diffstat (limited to 'Makefile.toml')
| -rw-r--r-- | Makefile.toml | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/Makefile.toml b/Makefile.toml index 6cb8868..c6b5a2e 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -2,8 +2,24 @@ default_to_workspace = false [tasks.fmt] -args = ["fmt"] -command = "cargo" +script_runner = "python" +script_extension = "py" +script = ''' +import glob +import subprocess + +rustfmt_arguments = [ + "rustfmt", + "--unstable-features", + "--skip-children", + "./build.rs" +] + +rustfmt_arguments.extend(glob.glob("./src/**/*.rs", recursive=True)) +rustfmt_arguments.extend(glob.glob("./amenadiel/**/*.rs", recursive=True)) + +subprocess.run(rustfmt_arguments, shell=True) +''' toolchain = "nightly" [tasks.check] |