Skip to content

Conversation

@arvindbr8
Copy link
Contributor

  1. Run staticcheck for all submodules
  2. Make changes inorder for vet to pass
  3. Add || : to grep. This is because grep returns error when there are no lines found.

Basically, fixes #7141

RELEASE NOTES: none

@arvindbr8 arvindbr8 added the Type: Meta Github repo, process, etc label Apr 19, 2024
@arvindbr8 arvindbr8 added this to the 1.64 Release milestone Apr 19, 2024
@arvindbr8 arvindbr8 requested a review from dfawley April 19, 2024 20:32
@arvindbr8
Copy link
Contributor Author

Verified the behavior of vet.sh for Darwin. Letting the Github Action test for behavior in Linux

}`

cleanup, err := createTmpConfigInFileSystem(configJSON)
cleanup, _ := createTmpConfigInFileSystem(configJSON)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

t.Fatal on err instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

scripts/vet.sh Outdated
Comment on lines 46 to 47
# - Do not import x/net/context.
not git grep -l 'x/net/context' -- "*.go"
not git grep --quiet -l 'x/net/context' -- "*.go"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's just remove this? It's a symlink now, and there's no reason we would be using it anymore, anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. I'm not so sure about it. Removing it from vet.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did I say "symlink"? I meant "type alias" O_O

pushd ${MOD_DIR}
# - Collection of static analysis checks
SC_OUT="$(mktemp)"
staticcheck -go 1.19 -checks 'all' ./... >"${SC_OUT}" || true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe just move this into the previous for loop instead of adding another one?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

scripts/vet.sh Outdated
# Error for anything other than checks that need exclusions.
grep -v "(ST1000)" "${SC_OUT}" | grep -v "(SA1019)" | grep -v "(ST1003)" | not grep -v "(ST1019)\|\(other import of\)"
# Error for anything other than checks that need exclusions.
(grep -v "(ST1000)" "${SC_OUT}" || : )| (grep -v "(SA1019)" || :) | (grep -v "(ST1003)" || :) | (grep -v "(ST1019)\|\(other import of\)" || :) | not grep -v "(SA4000)"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we define a function for this grep || : pattern instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

}
der := cryptobyte.String(crlBytes)
var issuer cryptobyte.String

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

? was this a linter?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@dfawley
Copy link
Member

dfawley commented Apr 22, 2024

+@gtcooke94 to review the advancedtls changes.

Copy link
Contributor

@gtcooke94 gtcooke94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, very small changes in advancedtls

@dfawley dfawley assigned arvindbr8 and unassigned dfawley Apr 23, 2024
@arvindbr8 arvindbr8 merged commit cb9c22d into grpc:master Apr 23, 2024
1 check passed
@arvindbr8 arvindbr8 deleted the fix_staticheck branch May 30, 2024 00:24
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Type: Meta Github repo, process, etc

Projects

None yet

Development

Successfully merging this pull request may close these issues.

run staticcheck for all modules

3 participants