-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from alex-semenyuk/add-linter
Add golangci-lint-action and fix issues
- Loading branch information
Showing
5 changed files
with
31 additions
and
33 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: golangci-lint | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
golangci: | ||
name: lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.20' | ||
cache: false | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
version: v1.54.2 | ||
# --exclude=unused-parameter was added due to methods with TODO implementation | ||
args: --exclude=unused-parameter --timeout=3m |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,7 @@ | ||
package tezos | ||
|
||
import ( | ||
"sync" | ||
|
||
"github.com/hyperledger/firefly-common/pkg/fftypes" | ||
) | ||
|
||
// listenerConfig is the configuration parsed from generic FFCAPI connector framework JSON, into our Tezos specific options | ||
type listenerConfig struct { | ||
name string | ||
fromBlock string | ||
// options *listenerOptions | ||
// filters []*eventFilter | ||
signature string | ||
} | ||
|
||
// listener is the state we hold in memory for each individual listener that has been added | ||
type listener struct { | ||
id *fftypes.UUID | ||
c *tezosConnector | ||
es *eventStream | ||
hwmMux sync.Mutex // Protects checkpoint of an individual listener. May hold ES lock when taking this, must NOT attempt to obtain ES lock while holding this | ||
hwmBlock int64 | ||
config listenerConfig | ||
removed bool | ||
catchup bool | ||
catchupLoopDone chan struct{} | ||
} |
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