Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
ed73176
Updating action versions
algojack Jan 11, 2023
0acd5d5
Forcing rebuild of golangci-lint
algojack Jan 11, 2023
cac70e9
Forcing rebuild of golangci-lint
algojack Jan 11, 2023
1624508
Checking if newer version of golangci-lint works
algojack Jan 11, 2023
5e0d72c
Checking if newer version of golangci-lint works
algojack Jan 11, 2023
88d0ac6
Reverting to old version of golangci-lint
algojack Jan 11, 2023
3b48b13
Removing inlining and optimizations from building partitiontest-linter
algojack Jan 12, 2023
4b3e72e
Adding flags to golangci-lint
algojack Jan 12, 2023
5b2106e
Syncing typeparams dependency version
algojack Jan 12, 2023
1273ca2
Changing tools package version
algojack Jan 12, 2023
191b1b2
Changing tools package version
algojack Jan 12, 2023
1421471
running go mod tidy and adding compat 1.17
algojack Jan 12, 2023
25d7ef3
Chris's fix for linter
algojack Jan 13, 2023
3894291
Uncommenting previous code
algojack Jan 13, 2023
799d46d
Checking temp file solution
algojack Jan 18, 2023
e5fa557
Checking with libraries out of sync
algojack Jan 18, 2023
e1ae7fa
Adding back the fixes
algojack Jan 18, 2023
a9eeead
Merge branch 'master' into fixing-partitiontest-check
algojack Jan 19, 2023
68e139f
Changing to nofilter
algojack Jan 19, 2023
f37d725
Merge branch 'fixing-partitiontest-check' of github.com:algojack/go-a…
algojack Jan 19, 2023
8e9e427
Merge branch 'master' into fixing-partitiontest-check
algojack Jan 19, 2023
193a1de
Filtering on added only, upgrading reviewdog, diplaying errors in log
algojack Jan 19, 2023
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
37 changes: 21 additions & 16 deletions .github/workflows/reviewdog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0 # required for new-from-rev option in .golangci.yml
- name: Install libraries
Expand All @@ -33,7 +33,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0 # required for new-from-rev option in .golangci.yml
- name: Install libraries
Expand All @@ -46,14 +46,14 @@ jobs:
echo "$GITHUB_WORKSPACE/bin" >> $GITHUB_PATH
echo "$RUNNER_WORKSPACE/$(basename $GITHUB_REPOSITORY)/bin" >> $GITHUB_PATH
- name: Install specific golang
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: '1.17.13'
- name: Create folders for golangci-lint
run: mkdir -p cicdtmp/golangci-lint
- name: Check if custom golangci-lint is already built
id: cache-golangci-lint
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: cicdtmp/golangci-lint/golangci-lint-cgo
key: cicd-golangci-lint-cgo-v0.0.1
Expand All @@ -69,7 +69,7 @@ jobs:
cd ../../
- name: Install reviewdog
run: |
curl -sfL https://raw.githubusercontent.com/reviewdog/reviewdog/v0.13.0/install.sh | sh -s
curl -sfL https://raw.githubusercontent.com/reviewdog/reviewdog/v0.14.1/install.sh | sh -s
reviewdog --version
- name: Build custom linters
run: |
Expand All @@ -80,17 +80,22 @@ jobs:
- name: Run golangci-lint with reviewdog
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: >
./cicdtmp/golangci-lint/golangci-lint-cgo run
--out-format line-number
-c .golangci-warnings.yml
--allow-parallel-runners
| reviewdog
-f=golangci-lint
-name="Lint Warnings"
-reporter=github-check
-filter-mode=added
-fail-on-error=false
run: |
set -e

./cicdtmp/golangci-lint/golangci-lint-cgo run \
--out-format line-number \
-c .golangci-warnings.yml \
--issues-exit-code 0 \
--allow-parallel-runners > temp_golangci-lint-cgo.txt
cat temp_golangci-lint-cgo.txt

cat temp_golangci-lint-cgo.txt | reviewdog \
-f=golangci-lint \
-name="Lint Warnings" \
-reporter=github-check \
-filter-mode=added \
-fail-on-error=true \
Comment thread
algojack marked this conversation as resolved.
-level=warning
- name: Slack Notification
env:
Expand Down
9 changes: 5 additions & 4 deletions cmd/partitiontest_linter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ module github.com/algorand/go-algorand/cmd/partitiontest_linter

go 1.17

require golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1
require golang.org/x/sys v0.0.0-20210510120138-977fb7262007
require golang.org/x/mod v0.4.2
require golang.org/x/tools v0.1.3
require golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f // indirect

require golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect

require golang.org/x/tools v0.1.12
33 changes: 6 additions & 27 deletions cmd/partitiontest_linter/go.sum
Original file line number Diff line number Diff line change
@@ -1,27 +1,6 @@
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/mod v0.4.2 h1:Gz96sIWK3OalVv/I/qNygP42zyoKp3xptRVCWRFEBvo=
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210510120138-977fb7262007 h1:gG67DSER+11cZvqIMb8S8bt0vZtiN6xWYARwirrOSfE=
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.1.3 h1:L69ShwSZEyCsLKoAxDKeMvLDZkumEe8gXUZAjab0tX8=
golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f h1:v4INt8xihDGvnrfjMDVXGxw9wrfxYyCjk0KbXjhR55s=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
2 changes: 1 addition & 1 deletion cmd/partitiontest_linter/linter.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func doesParameterNameMatch(call *ast.CallExpr, fn *ast.FuncDecl) bool {
for _, oneArg := range call.Args {

if realArg, ok := oneArg.(*ast.Ident); ok {
if realArg.Obj.Name == fn.Type.Params.List[0].Names[0].Obj.Name {
if realArg != nil && realArg.Obj != nil && realArg.Obj.Name == fn.Type.Params.List[0].Names[0].Obj.Name {
return true
}
}
Expand Down