forked from gnolang/gno
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(gnovm): enforce formatting of added packages (gnolang#2464)
This PR introduces the concept of automatically formatting packages during AddPkg. The advantage is that it's relatively inexpensive since we were already parsing the submitted source code AST to apply some verification. I believe that having a consistent official formatting for the Go language is one of the things that makes it better, simpler, and more readable. I think Gno should strive to be as good as or better than Go in this regard. Another justification for this approach is that Gno is not just the language but a platform (gno.land), like a PAAS, and AddPkg can be considered the "CD" process, while auto-formatting could be the "CI" component, which often go hand-in-hand in "CI/CD". The biggest drawback I can see is that in practice, the code content may not be the same on the publisher's computer and on-chain. --------- Signed-off-by: moul <[email protected]> Co-authored-by: Morgan <[email protected]>
- Loading branch information
Showing
4 changed files
with
82 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters