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(lint/sort-imports): fix absolute path for sort-imports #2640

Merged
merged 5 commits into from
Sep 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -159,20 +159,18 @@ openrpc-gen:
.PHONY: openrpc-gen

## lint-imports: Lint only Go imports.
## flag -set-exit-status doesn't exit with code 1 as it should, so we use find until it is fixed by goimports-reviser
lint-imports:
@echo "--> Running imports linter"
@for file in `find . -type f -name '*.go'`; \
do goimports-reviser -list-diff -set-exit-status -company-prefixes "github.com/celestiaorg" -project-name "github.com/celestiaorg/"$(PROJECTNAME)"" -output stdout $$file \
do goimports-reviser -list-diff -set-exit-status -company-prefixes "github.com/celestiaorg" -project-name "github.com/celestiaorg/celestia-node" -output stdout $$file \
Wondertan marked this conversation as resolved.
Show resolved Hide resolved
|| exit 1; \
Wondertan marked this conversation as resolved.
Show resolved Hide resolved
done;
.PHONY: lint-imports

## sort-imports: Sort Go imports.
sort-imports:
@for file in `find . -type f -name '*.go'`; \
do goimports-reviser -company-prefixes "github.com/celestiaorg" -project-name "github.com/celestiaorg/"$(PROJECTNAME)"" $$file \
|| exit 1; \
done;
@goimports-reviser -company-prefixes "github.com/celestiaorg" -project-name "github.com/celestiaorg/celestia-node" -output stdout ./...
Wondertan marked this conversation as resolved.
Show resolved Hide resolved
.PHONY: sort-imports

## adr-gen: Generate ADR from template. Must set NUM and TITLE parameters.
Expand Down
Loading