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

lint(ginkgolinter): fix test files #7565

Merged
merged 1 commit into from
Mar 29, 2024
Merged

Conversation

mmorel-35
Copy link
Contributor

@mmorel-35 mmorel-35 commented Mar 25, 2024

Please add a summary of your change

Fix Ginkgolinter errors from test files and folders

@blackpiglet ,
This follows #7555 (comment)

Does your change fix a particular issue?

No

Please indicate you've done the following:

  • Accepted the DCO. Commits without the DCO will delay acceptance.
  • Created a changelog file or added /kind changelog-not-required as a comment on this pull request.
  • Updated the corresponding documentation in site/content/docs/main.

Copy link

codecov bot commented Mar 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 61.71%. Comparing base (d640cc1) to head (807cd2b).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7565      +/-   ##
==========================================
- Coverage   61.74%   61.71%   -0.03%     
==========================================
  Files         265      265              
  Lines       29257    29257              
==========================================
- Hits        18064    18056       -8     
- Misses       9910     9917       +7     
- Partials     1283     1284       +1     

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

@mateusoliveira43
Copy link
Contributor

@mmorel-35 could you explain what was done?

you ran something like lint-fix removing this

velero/golangci.yaml

Lines 36 to 37 in 13f4efd

skip-files:
- ".*_test.go$"
, then manually resolved the "expect err (not)to HaveOccurred" ginkgolinter error and then added config back to golangci.yaml?

If the intent is to fix all mentioned error from ginkgolinter, maybe also need to remove this from golangci.yaml

velero/golangci.yaml

Lines 21 to 22 in 13f4efd

skip-dirs:
- test/*

@mmorel-35
Copy link
Contributor Author

I did a golangci fix after removing _test.go then fix Ginkgolinter errors concerning expect.
I would not modify golangci config just for this now.
After my two PR are merged I would start by removing exclude file to use exclude rules instead and then fix them one after the other

@blackpiglet blackpiglet added the kind/changelog-not-required PR does not require a user changelog. Often for docs, website, or build changes label Mar 27, 2024
@mmorel-35 mmorel-35 marked this pull request as draft March 28, 2024 06:51
@mmorel-35
Copy link
Contributor Author

mmorel-35 commented Mar 28, 2024

I believe it’s better to keep this pr a draft until #7573 is merged and then turn it into a full fix of ginkgolinter issues

@mmorel-35 mmorel-35 force-pushed the ginkgolinter branch 3 times, most recently from 67ad678 to 13361ca Compare March 28, 2024 10:40
@mmorel-35 mmorel-35 changed the title lint(ginkgolinter): expect (not)to HaveOccurred lint(ginkgolinter): fix test files Mar 28, 2024
@mmorel-35 mmorel-35 marked this pull request as ready for review March 28, 2024 10:55
@github-actions github-actions bot requested review from Lyndon-Li and sseago March 28, 2024 10:55
Copy link
Contributor

@mateusoliveira43 mateusoliveira43 left a comment

Choose a reason for hiding this comment

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

LGTM

@sseago sseago merged commit 3d6dab0 into vmware-tanzu:main Mar 29, 2024
68 of 69 checks passed
@mmorel-35 mmorel-35 deleted the ginkgolinter branch March 29, 2024 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has-e2e-2tests has-unit-tests kind/changelog-not-required PR does not require a user changelog. Often for docs, website, or build changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants