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

dev: update clippy CI #656

Merged
merged 4 commits into from
Dec 3, 2023
Merged

dev: update clippy CI #656

merged 4 commits into from
Dec 3, 2023

Conversation

bhavyagosai
Copy link
Contributor

Time spent on this PR:

Related: #584

Pull Request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Build-related changes
  • Documentation content changes
  • Testing

What is the new behavior?

  • Updated CI to deny some useful lints
  • have also added clippy::nursery here but its linting something that i think is a bug in clippy, i am not able to understand it. added it here so someone can take a look, we can remove clippy::nursery if its causing those false positives.

Does this introduce a breaking change?

  • Maybe

@bhavyagosai
Copy link
Contributor Author

@Eikix can you rerun clippy workflow, failure seems unreleated. it should error with Future's warning.

Copy link
Collaborator

@greged93 greged93 left a comment

Choose a reason for hiding this comment

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

I'm not sure why you removed some of the macros from rstest on the fixtures.

scripts/clippy.sh Outdated Show resolved Hide resolved
crates/test-utils/src/fixtures.rs Outdated Show resolved Hide resolved
crates/test-utils/src/fixtures.rs Outdated Show resolved Hide resolved
@Eikix
Copy link
Member

Eikix commented Nov 21, 2023

I think Nursery is a tricky one:)! Let's try and see if we can make a PR for adding this stricter Clippy ourselves, to limit back and forths,

What changes we will apply in an in-house Pr in the coming days:

  • Move away from clippy script and rather add more args in the CI action
  • Add ignored lint rules in clippy.toml
  • Add strict rules in clippy.toml

i think from there it'll be easier for you to contribute in a way that suits us:)

@bhavyagosai
Copy link
Contributor Author

bhavyagosai commented Nov 21, 2023

I think Nursery is a tricky one:)! Let's try and see if we can make a PR for adding this stricter Clippy ourselves, to limit back and forths,

What changes we will apply in an in-house Pr in the coming days:

  • Move away from clippy script and rather add more args in the CI action
  • Add ignored lint rules in clippy.toml
  • Add strict rules in clippy.toml

i think from there it'll be easier for you to contribute in a way that suits us:)

okay so for now:

  • i will remove remove the script and add directly to linter.yml and in githooks
  • remove clippy::nursery lint

so these changes can be merged

@Eikix
Copy link
Member

Eikix commented Nov 21, 2023

Will close the PR if that's okay for you

@Eikix
Copy link
Member

Eikix commented Nov 21, 2023

I think Nursery is a tricky one:)! Let's try and see if we can make a PR for adding this stricter Clippy ourselves, to limit back and forths,
What changes we will apply in an in-house Pr in the coming days:

  • Move away from clippy script and rather add more args in the CI action
  • Add ignored lint rules in clippy.toml
  • Add strict rules in clippy.toml

i think from there it'll be easier for you to contribute in a way that suits us:)

okay so for now:

  • i will remove remove the script and add directly to linter.yml and in githooks
  • remove clippy::nursery lint

so these changes can be merged

Sure, let's see if that works

@bhavyagosai
Copy link
Contributor Author

@Eikix CI failure don't look related to this PR as i can see it failing on other PR too

@Eikix
Copy link
Member

Eikix commented Nov 22, 2023

@Eikix CI failure don't look related to this PR as i can see it failing on other PR too

Investigating

@bhavyagosai
Copy link
Contributor Author

looks like linter.yml file is removed, will remove it form this PR as well to resolve conflict.

@bhavyagosai
Copy link
Contributor Author

again failure unrelated to change

@bhavyagosai
Copy link
Contributor Author

hey so should i merge this with main and fix conflicts or is this no longer needed? @Eikix

@Eikix
Copy link
Member

Eikix commented Dec 1, 2023

Rebase into merge looks fine to me:)

Copy link

codecov bot commented Dec 1, 2023

Codecov Report

Attention: 431 lines in your changes are missing coverage. Please review.

Comparison is base (71506a8) 23.17% compared to head (a9ddd89) 75.99%.
Report is 250 commits behind head on main.

Files Patch % Lines
crates/core/src/client/mod.rs 50.70% 211 Missing ⚠️
crates/core/src/client/config.rs 25.28% 65 Missing ⚠️
crates/core/src/client/errors.rs 9.52% 38 Missing ⚠️
crates/core/src/client/helpers.rs 48.21% 29 Missing ⚠️
crates/core/src/mock/mock_starknet.rs 81.69% 28 Missing ⚠️
crates/core/src/models/call.rs 92.39% 13 Missing ⚠️
crates/core/src/models/block.rs 95.06% 11 Missing ⚠️
crates/core/src/models/event_filter.rs 95.06% 8 Missing ⚠️
crates/core/src/contracts/erc20/starknet_erc20.rs 72.72% 6 Missing ⚠️
crates/core/src/models/felt.rs 95.27% 6 Missing ⚠️
... and 5 more
Additional details and impacted files
@@             Coverage Diff             @@
##             main     #656       +/-   ##
===========================================
+ Coverage   23.17%   75.99%   +52.82%     
===========================================
  Files           9       42       +33     
  Lines        1247     3237     +1990     
===========================================
+ Hits          289     2460     +2171     
+ Misses        958      777      -181     

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

@bhavyagosai
Copy link
Contributor Author

@Eikix done!

Copy link
Member

@Eikix Eikix left a comment

Choose a reason for hiding this comment

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

lgtm

@Eikix Eikix added this pull request to the merge queue Dec 3, 2023
Merged via the queue into kkrt-labs:main with commit 4266568 Dec 3, 2023
4 checks passed
@bhavyagosai bhavyagosai deleted the ci-clippy branch December 7, 2023 10:16
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.

3 participants