Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable lint revive Rule: unchecked-type-assertion #5516

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hellspawn679
Copy link
Contributor

@hellspawn679 hellspawn679 commented Jun 3, 2024

Which problem is this PR solving?

Description of the changes

  • added check for Type assertion

How was this change tested?

  • make lint make test

Checklist

@hellspawn679 hellspawn679 requested a review from a team as a code owner June 3, 2024 09:20
Copy link

codecov bot commented Jun 3, 2024

Codecov Report

Attention: Patch coverage is 12.00000% with 22 lines in your changes are missing coverage. Please review.

Project coverage is 54.13%. Comparing base (f2b46d4) to head (c432df1).

Files Patch % Lines
pkg/cache/lru.go 6.66% 13 Missing and 1 partial ⚠️
.../jaeger/internal/extension/jaegerstorage/config.go 0.00% 3 Missing ⚠️
storage/spanstore/downsampling_writer.go 0.00% 3 Missing ⚠️
pkg/healthcheck/handler.go 50.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #5516       +/-   ##
===========================================
- Coverage   96.19%   54.13%   -42.06%     
===========================================
  Files         327      161      -166     
  Lines       16012     8386     -7626     
===========================================
- Hits        15403     4540    -10863     
- Misses        435     3398     +2963     
- Partials      174      448      +274     
Flag Coverage Δ
badger_v1 8.03% <0.00%> (-0.02%) ⬇️
badger_v2 1.93% <0.00%> (-0.01%) ⬇️
cassandra-3.x-v1 16.40% <4.54%> (-0.03%) ⬇️
cassandra-3.x-v2 1.85% <0.00%> (-0.01%) ⬇️
cassandra-4.x-v1 16.40% <4.54%> (-0.03%) ⬇️
cassandra-4.x-v2 1.85% <0.00%> (-0.01%) ⬇️
elasticsearch-7-v1 18.85% <4.54%> (-0.04%) ⬇️
elasticsearch-8-v1 19.05% <4.54%> (-0.04%) ⬇️
elasticsearch-8-v2 19.05% <4.54%> (-0.04%) ⬇️
grpc_v1 9.47% <9.09%> (-0.01%) ⬇️
grpc_v2 7.53% <8.00%> (-0.01%) ⬇️
kafka 9.76% <0.00%> (-0.02%) ⬇️
opensearch-1-v1 18.89% <4.54%> (-0.05%) ⬇️
opensearch-2-v1 18.89% <4.54%> (-0.05%) ⬇️
opensearch-2-v2 18.89% <4.54%> (-0.05%) ⬇️
unittests ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@varshith257
Copy link
Contributor

@hellspawn679 You can also use ignore at some places where we can't really needed type assertion

Copy link
Member

@yurishkuro yurishkuro left a comment

Choose a reason for hiding this comment

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

Most of these changes are making the code less safe. I would rather disable this linter in those examples. And we don't change auto-generated files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants