protolint: configure protolint and fix the protolinting issues

This PR addresses the following:
- Install and Configure protolint to enforce the protobuf style guide rules in the CI.
- Fix the protolinting issues (package and import ordering) while maintaining the comaptibility.
This commit is contained in:
Mohamed Awnallah
2023-12-25 09:28:40 +02:00
parent ec5b824879
commit 1402ffd17b
10 changed files with 92 additions and 14 deletions

View File

@@ -280,6 +280,11 @@ lint: docker-tools
@$(call print, "Linting source.")
$(DOCKER_TOOLS) golangci-lint run -v $(LINT_WORKERS)
#? protolint: Lint proto files using protolint
protolint:
@$(call print, "Linting proto files.")
docker run --rm --volume "$$(pwd):/workspace" --workdir /workspace yoheimuta/protolint lint lnrpc/
#? tidy-module: Run `go mod` tidy for all modules
tidy-module:
echo "Running 'go mod tidy' for all modules"