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 Rule: import-shadowing #6102

Merged
merged 4 commits into from
Oct 23, 2024

Conversation

inosmeet
Copy link
Contributor

Which problem is this PR solving?

Description of the changes

  • Enabled import-shadowing in revive linter.
  • Changed ambiguous attribute names.

How was this change tested?

  • make lint make test

Checklist

@inosmeet inosmeet requested a review from a team as a code owner October 18, 2024 07:39
@inosmeet
Copy link
Contributor Author

Hey @yurishkuro!
Can you take a look? thanks!

Copy link

codecov bot commented Oct 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.48%. Comparing base (fcb6ba2) to head (59b4092).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6102      +/-   ##
==========================================
- Coverage   96.49%   96.48%   -0.02%     
==========================================
  Files         352      352              
  Lines       19973    19973              
==========================================
- Hits        19273    19270       -3     
- Misses        518      520       +2     
- Partials      182      183       +1     
Flag Coverage Δ
badger_v1 8.42% <0.00%> (ø)
badger_v2 1.70% <0.00%> (ø)
cassandra-4.x-v1 14.57% <6.89%> (ø)
cassandra-4.x-v2 1.64% <0.00%> (ø)
cassandra-5.x-v1 14.57% <6.89%> (ø)
cassandra-5.x-v2 1.64% <0.00%> (ø)
elasticsearch-6.x-v1 18.73% <27.58%> (+0.01%) ⬆️
elasticsearch-7.x-v1 18.80% <27.58%> (-0.02%) ⬇️
elasticsearch-8.x-v1 18.98% <27.58%> (+0.01%) ⬆️
elasticsearch-8.x-v2 1.70% <0.00%> (ø)
grpc_v1 8.78% <0.00%> (ø)
grpc_v2 6.72% <0.00%> (ø)
kafka-v1 8.99% <27.58%> (ø)
kafka-v2 1.70% <0.00%> (ø)
memory_v2 1.69% <0.00%> (ø)
opensearch-1.x-v1 18.86% <27.58%> (ø)
opensearch-2.x-v1 18.86% <27.58%> (+0.01%) ⬆️
opensearch-2.x-v2 1.70% <0.00%> (+0.01%) ⬆️
tailsampling-processor 0.48% <0.00%> (ø)
unittests 95.39% <98.26%> (-0.02%) ⬇️

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.

pkg/fswatcher/fswatcher.go Dismissed Show dismissed Hide dismissed
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.

I don't mind this linter, but I don't like your choice of replacement names - you are creating very verbose & hard to read names, e.g.:

-	processor processor.SpanProcessor,
-	consumer consumer.Consumer,
+	spanProcessor processor.SpanProcessor,
+	consumerInstance consumer.Consumer,

Go generally encourages the use of shorter names. It doesn't mean you have to go to p and c, but proc and cons would still be reasonably readable, much better than consumerInstance.

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.

Thanks

@yurishkuro
Copy link
Member

please resolve conflicts

Signed-off-by: Meet Soni <meetsoni3017@gmail.com>
Signed-off-by: Meet Soni <meetsoni3017@gmail.com>
Signed-off-by: Meet Soni <meetsoni3017@gmail.com>
Signed-off-by: Meet Soni <meetsoni3017@gmail.com>
@yurishkuro yurishkuro enabled auto-merge (squash) October 23, 2024 22:45
@yurishkuro yurishkuro merged commit f9474f9 into jaegertracing:main Oct 23, 2024
49 checks passed
@yurishkuro
Copy link
Member

Thanks

@inosmeet inosmeet deleted the import-shadowing branch October 24, 2024 06:13
yurishkuro added a commit to yurishkuro/jaeger that referenced this pull request Nov 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants