From c8df606427ab59ff0b7c4e447cd80e0e8fb9b5c2 Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Tue, 27 Jul 2021 13:00:00 +0200 Subject: [PATCH] GitHub+lint: reduce linter memory usage To reduce the likelyhood of the linter OOMing on the GitHub runner, we exclude any generated code from being inspected and also tune the golang garbage collector to be a bit more agressive. --- .github/workflows/main.yml | 2 +- .golangci.yml | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8815ff399..06ef790bc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -131,7 +131,7 @@ jobs: go-version: '${{ env.GO_VERSION }}' - name: lint - run: make lint + run: GOGC=50 make lint ######################## # cross compilation diff --git a/.golangci.yml b/.golangci.yml index 5ffd56ac7..fed729c41 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -2,9 +2,11 @@ run: # timeout for analysis deadline: 10m - # Skip autogenerated files for mobile. + # Skip autogenerated files for mobile and gRPC. skip-files: - "mobile\\/.*generated\\.go" + - "\\.pb\\.go$" + - "\\.pb\\.gw\\.go$" skip-dirs: - channeldb/migration_01_to_11