Fix staticcheck lint in CI (#1682)
## Description Missed configuring working dir for staticcheck, plus fixes for errors reported. ## Type of change <!--- Please check the type of change your PR introduces: ---> - [ ] 🌻 Feature - [ ] 🐛 Bugfix - [ ] 🗺️ Documentation - [ ] 🤖 Test - [x] 💻 CI/Deployment - [ ] 🐹 Trivial/Minor ## Issue(s) <!-- Can reference multiple issues. Use one of the following "magic words" - "closes, fixes" to auto-close the Github issue. --> * #<issue> ## Test Plan <!-- How will this be tested prior to merging.--> - [x] 💪 Manual - [ ] ⚡ Unit test - [ ] 💚 E2E
This commit is contained in:
parent
6ee121a70a
commit
99f35eb5a8
3
.github/workflows/ci.yml
vendored
3
.github/workflows/ci.yml
vendored
@ -362,6 +362,9 @@ jobs:
|
||||
|
||||
- name: Run staticcheck
|
||||
uses: dominikh/staticcheck-action@v1.2.0
|
||||
with:
|
||||
install-go: false
|
||||
working-directory: src
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------------------------------
|
||||
|
||||
@ -148,6 +148,7 @@ func runDisplayM365JSON(
|
||||
|
||||
fmt.Println(string(array))
|
||||
|
||||
//lint:ignore SA4004 only expecting one item
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@ -25,22 +25,22 @@ import (
|
||||
"github.com/alcionai/corso/src/pkg/storage"
|
||||
)
|
||||
|
||||
//nolint:unused
|
||||
//lint:ignore U1000 future test use
|
||||
func orgSiteSet(t *testing.T) []string {
|
||||
return tester.LoadTestM365OrgSites(t)
|
||||
}
|
||||
|
||||
//nolint:unused
|
||||
//lint:ignore U1000 future test use
|
||||
func orgUserSet(t *testing.T) []string {
|
||||
return tester.LoadTestM365OrgUsers(t)
|
||||
}
|
||||
|
||||
//nolint:unused
|
||||
//lint:ignore U1000 future test use
|
||||
func singleSiteSet(t *testing.T) []string {
|
||||
return []string{tester.LoadTestM365SiteID(t)}
|
||||
}
|
||||
|
||||
//nolint:unused
|
||||
//lint:ignore U1000 future test use
|
||||
func singleUserSet(t *testing.T) []string {
|
||||
return []string{tester.LoadTestM365UserID(t)}
|
||||
}
|
||||
@ -372,8 +372,8 @@ type RepositoryLoadTestExchangeSuite struct {
|
||||
suite.Suite
|
||||
ctx context.Context
|
||||
repo repository.Repository
|
||||
acct account.Account //nolint:unused
|
||||
st storage.Storage //nolint:unused
|
||||
acct account.Account //lint:ignore U1000 future test use
|
||||
st storage.Storage //lint:ignore U1000 future test use
|
||||
usersUnderTest []string
|
||||
}
|
||||
|
||||
@ -422,8 +422,8 @@ type RepositoryIndividualLoadTestExchangeSuite struct {
|
||||
suite.Suite
|
||||
ctx context.Context
|
||||
repo repository.Repository
|
||||
acct account.Account //nolint:unused
|
||||
st storage.Storage //nolint:unused
|
||||
acct account.Account //lint:ignore U1000 future test use
|
||||
st storage.Storage //lint:ignore U1000 future test use
|
||||
usersUnderTest []string
|
||||
}
|
||||
|
||||
@ -475,8 +475,8 @@ type RepositoryLoadTestOneDriveSuite struct {
|
||||
suite.Suite
|
||||
ctx context.Context
|
||||
repo repository.Repository
|
||||
acct account.Account //nolint:unused
|
||||
st storage.Storage //nolint:unused
|
||||
acct account.Account //lint:ignore U1000 future test use
|
||||
st storage.Storage //lint:ignore U1000 future test use
|
||||
usersUnderTest []string
|
||||
}
|
||||
|
||||
@ -522,8 +522,8 @@ type RepositoryIndividualLoadTestOneDriveSuite struct {
|
||||
suite.Suite
|
||||
ctx context.Context
|
||||
repo repository.Repository
|
||||
acct account.Account //nolint:unused
|
||||
st storage.Storage //nolint:unused
|
||||
acct account.Account //lint:ignore U1000 future test use
|
||||
st storage.Storage //lint:ignore U1000 future test use
|
||||
usersUnderTest []string
|
||||
}
|
||||
|
||||
@ -573,8 +573,8 @@ type RepositoryLoadTestSharePointSuite struct {
|
||||
suite.Suite
|
||||
ctx context.Context
|
||||
repo repository.Repository
|
||||
acct account.Account //nolint:unused
|
||||
st storage.Storage //nolint:unused
|
||||
acct account.Account //lint:ignore U1000 future test use
|
||||
st storage.Storage //lint:ignore U1000 future test use
|
||||
sitesUnderTest []string
|
||||
}
|
||||
|
||||
@ -620,8 +620,8 @@ type RepositoryIndividualLoadTestSharePointSuite struct {
|
||||
suite.Suite
|
||||
ctx context.Context
|
||||
repo repository.Repository
|
||||
acct account.Account //nolint:unused
|
||||
st storage.Storage //nolint:unused
|
||||
acct account.Account //lint:ignore U1000 future test use
|
||||
st storage.Storage //lint:ignore U1000 future test use
|
||||
sitesUnderTest []string
|
||||
}
|
||||
|
||||
|
||||
1
src/staticcheck.conf
Normal file
1
src/staticcheck.conf
Normal file
@ -0,0 +1 @@
|
||||
dot_import_whitelist = ["github.com/alcionai/corso/src/cli/print"]
|
||||
Loading…
x
Reference in New Issue
Block a user