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

Make linter to enforce our preferred types order in type switch #654

Merged
merged 109 commits into from
Aug 2, 2022

Conversation

fenogentov
Copy link
Contributor

@fenogentov fenogentov commented May 30, 2022

Closes #527.

@codecov
Copy link

codecov bot commented May 30, 2022

Codecov Report

Merging #654 (3a6badd) into main (a07cf1b) will increase coverage by 0.02%.
The diff coverage is 92.30%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #654      +/-   ##
==========================================
+ Coverage   62.42%   62.44%   +0.02%     
==========================================
  Files         231      231              
  Lines       10885    10883       -2     
==========================================
+ Hits         6795     6796       +1     
+ Misses       3313     3308       -5     
- Partials      777      779       +2     
Impacted Files Coverage Δ
internal/types/compare.go 92.83% <ø> (+0.66%) ⬆️
internal/handlers/common/update.go 85.61% <57.14%> (ø)
internal/handlers/common/filter.go 85.38% <100.00%> (ø)
internal/handlers/common/params.go 92.72% <100.00%> (ø)
internal/handlers/common/projection.go 64.37% <100.00%> (ø)
internal/clientconn/conninfo/conn_info.go 66.66% <0.00%> (-16.67%) ⬇️
internal/handlers/pg/msg_dbstats.go 65.11% <0.00%> (-6.98%) ⬇️
internal/util/version/version.go 55.00% <0.00%> (-5.00%) ⬇️
internal/wire/msg_body.go 38.09% <0.00%> (+1.58%) ⬆️
internal/wire/msg_header.go 71.42% <0.00%> (+2.38%) ⬆️
... and 2 more
Flag Coverage Δ
integration 56.99% <92.30%> (+0.15%) ⬆️
mongodb 18.35% <5.12%> (-0.05%) ⬇️
pg 61.54% <92.30%> (+0.18%) ⬆️
tigris 22.46% <5.12%> (-0.03%) ⬇️
unit 24.91% <0.00%> (-0.21%) ⬇️

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

@fenogentov fenogentov changed the title Make linter to enforce our preferred types order in type switch #527 Make linter to enforce our preferred types order in type switch May 30, 2022
Copy link
Member

@AlekSi AlekSi left a comment

Choose a reason for hiding this comment

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

Let's move the tool into tools/check-switch.go, hook it into tools/tools.go, tools/go.mod

go.mod Outdated Show resolved Hide resolved
@fenogentov fenogentov marked this pull request as ready for review May 31, 2022 10:07
@fenogentov fenogentov requested a review from AlekSi May 31, 2022 10:12
@seeforschauer
Copy link
Contributor

@fenogentov would you please fix linters?

@fenogentov
Copy link
Contributor Author

@fenogentov would you please fix linters?

this is an example of how the new linter works

@AlekSi AlekSi modified the milestones: v0.5.1, v0.6.0 Jul 25, 2022
@CLAassistant
Copy link

CLAassistant commented Jul 27, 2022

CLA assistant check
All committers have signed the CLA.

AlekSi
AlekSi previously approved these changes Aug 2, 2022
@fenogentov fenogentov requested a review from AlekSi August 2, 2022 13:38
@AlekSi AlekSi merged commit 2258503 into FerretDB:main Aug 2, 2022
@AlekSi
Copy link
Member

AlekSi commented Aug 2, 2022

Thank you! and sorry for a huge delay

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code/chore Code maintenance improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make linter to enforce our preferred types order in type switch
4 participants