Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fmt #3578

Merged
merged 11 commits into from
Feb 9, 2025
Merged
Next Next commit
chore: fmt
Signed-off-by: moul <[email protected]>
moul committed Jan 21, 2025
commit c7414be0645a03f050abf8f17a9b0ea3fc58b3d2
3 changes: 2 additions & 1 deletion .github/workflows/build_template.yml
Original file line number Diff line number Diff line change
@@ -23,7 +23,8 @@ jobs:
- name: Check generated files are up to date
working-directory: ${{ inputs.modulepath }}
run: |
go generate -x ./...
make generate
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really hate that we enforce random makefile directives within subfolders, just to follow a structure (prime example is make lint, make test etc)


if [ "$(git status -s)" != "" ]; then
echo "command 'go generate' creates file that differ from git tree, please run 'go generate' and commit:"
git status -s
6 changes: 5 additions & 1 deletion gno.land/Makefile
Original file line number Diff line number Diff line change
@@ -50,9 +50,13 @@ install.gnokey:; go install ./cmd/gnokey
.PHONY: dev.gnoweb generate.gnoweb
dev.gnoweb:
make -C ./pkg/gnoweb dev
generate.gnoweb:

.PHONY: generate
generate:
go generate -x ./...
make -C ./pkg/gnoweb generate


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leftover?

Suggested change

.PHONY: fclean
fclean: clean
rm -rf gnoland-data genesis.json
2 changes: 1 addition & 1 deletion gnovm/Makefile
Original file line number Diff line number Diff line change
@@ -125,7 +125,7 @@ _test.filetest:;
# TODO: move _dev.stringer to go:generate instructions, simplify generate
# to just go generate.
.PHONY: generate
generate: _dev.stringer _dev.generate
generate: _dev.stringer _dev.generate fmt imports

stringer_cmd=$(rundep) golang.org/x/tools/cmd/stringer
.PHONY: _dev.stringer
6 changes: 3 additions & 3 deletions gnovm/pkg/gnolang/internal/softfloat/copy.sh
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ cat > runtime_softfloat64.go << EOF

EOF
cat "$GOROOT/src/runtime/softfloat64.go" >> ./runtime_softfloat64.go
sed -i 's/^package runtime$/package softfloat/' runtime_softfloat64.go
sed -i '' 's/^package runtime$/package softfloat/' runtime_softfloat64.go

# softfloat64_test.go:
# - add header
@@ -25,8 +25,8 @@ cat > runtime_softfloat64_test.go << EOF

EOF
cat "$GOROOT/src/runtime/softfloat64_test.go" >> ./runtime_softfloat64_test.go
sed -i 's/^package runtime_test$/package softfloat_test/
sed -i '' 's/^package runtime_test$/package softfloat_test/
s#^\t\. "runtime"$#\t. "github.com/gnolang/gno/gnovm/pkg/gnolang/internal/softfloat"#
s/GOARCH/runtime.GOARCH/g
16a\
"runtime"' runtime_softfloat64_test.go
"runtime"' runtime_softfloat64_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions tm2/Makefile
Original file line number Diff line number Diff line change
@@ -63,3 +63,8 @@ _test.pkg.others:; go test $(GOTEST_FLAGS) `go list ./pkg/... | grep -Ev 'pkg/(
_test.pkg.amino:; go test $(GOTEST_FLAGS) ./pkg/amino/...
_test.pkg.bft:; go test $(GOTEST_FLAGS) ./pkg/bft/...
_test.pkg.db:; go test $(GOTEST_FLAGS) ./pkg/db/... ./pkg/iavl/benchmarks/...

.PHONY: generate
generate:
go generate -x ./...
$(MAKE) fmt
12 changes: 4 additions & 8 deletions tm2/pkg/overflow/overflow_impl.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading