21 releases (8 breaking)

Uses new Rust 2021

new 0.31.3 Nov 30, 2022
0.30.1 Nov 4, 2022

#356 in Development tools

Download history 20/week @ 2022-08-28 90/week @ 2022-09-04 68/week @ 2022-09-11 45/week @ 2022-09-18 38/week @ 2022-09-25 134/week @ 2022-10-02 68/week @ 2022-10-09 32/week @ 2022-10-16 133/week @ 2022-10-23 167/week @ 2022-10-30 116/week @ 2022-11-06 41/week @ 2022-11-13 37/week @ 2022-11-20 80/week @ 2022-11-27

288 downloads per month
Used in 4 crates (3 directly)

Apache-2.0

2.5MB
59K SLoC

swayfmt

A tool for formatting Sway code according to style guidelines.

Installation

To use swayfmt you'll need to install the forc-fmt plugin that will run the formatter. You can install the complete Fuel toolchain with fuelup, or for swayfmt only, see CONTRIBUTING.


lib.rs:

Based on rustfmt, swayfmt aims to be a transparent approach to formatting Sway code.

swayfmt configurations can be adjusted with a swayfmt.toml config file declared at the root of a Sway project, however the defualt formatter does not require the presence of one and any fields omitted will remain as default.

Dependencies

~16MB
~298K SLoC