feat(gnovm): add `gno fmt` command
Add gno fmt as an experimental feature inside the contribs folder.
For now, it only supports the example folder along with stdlibs.
In the future, it should possibly support:
- An
includeflag to specify a directory thatgno fmtshould be aware of. - Specify a target chain so it can update imports based on what's on the chain (or using a
gnoproxy).
Contributors' checklist...
- [ ] Added new tests, or not needed, or not feasible
- [ ] Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory
- [ ] Updated the official documentation or not needed
- [ ] No breaking changes were made, or a
BREAKING CHANGE: xxxmessage was included in the description - [ ] Added references to related issues and PRs
- [ ] Provided any useful hints for running manual tests
- [ ] Added new benchmarks to generated graphs, if any. More info here.
Codecov Report
Attention: Patch coverage is 53.33333% with 238 lines in your changes missing coverage. Please review.
Project coverage is 54.70%. Comparing base (
f6ca518) to head (0386979).
Additional details and impacted files
@@ Coverage Diff @@
## master #2156 +/- ##
==========================================
- Coverage 54.73% 54.70% -0.03%
==========================================
Files 584 590 +6
Lines 78531 79036 +505
==========================================
+ Hits 42983 43236 +253
- Misses 32336 32550 +214
- Partials 3212 3250 +38
| Flag | Coverage Δ | |
|---|---|---|
| contribs/gnodev | 23.81% <ø> (ø) |
|
| contribs/gnofaucet | 15.31% <ø> (+0.85%) |
:arrow_up: |
| contribs/gnokeykc | 0.00% <ø> (ø) |
|
| contribs/gnomd | 0.00% <ø> (ø) |
|
| gno.land | 62.68% <ø> (ø) |
|
| gnovm | 59.80% <53.33%> (-0.18%) |
:arrow_down: |
| misc/autocounterd | 0.00% <ø> (ø) |
|
| misc/genproto | 0.00% <ø> (ø) |
|
| misc/genstd | 73.90% <ø> (ø) |
|
| misc/goscan | 0.00% <ø> (ø) |
|
| misc/logos | 17.68% <ø> (ø) |
|
| misc/loop | 0.00% <ø> (ø) |
|
| tm2 | 54.45% <ø> (-0.07%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I recommend renaming contribs/gnoimports to gno fmt to include gnoimports in our only official formatter. In the help message for gno fmt, explicitly mention that it includes gnoimports functionality. Additionally, integrate the checking part of gnoimports into gno lint for IDEs to detect issues.