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

chore: starknet API add lints #1853

Merged
merged 1 commit into from
Nov 8, 2024
Merged

chore: starknet API add lints #1853

merged 1 commit into from
Nov 8, 2024

Conversation

giladchase
Copy link
Contributor

Lior banned as repo-wide, unless absolutely necessary.

Nearly all as uses can be replaced with [Try]From which doesn't have implicit coercions like as (we encountered several bugs due to these coercions).

Motivation: we are standardizing lints across the repo and CI, instead of each crate having separate sets of lints.

@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link

codecov bot commented Nov 5, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 49.98%. Comparing base (e3165c4) to head (f33ef83).
Report is 246 commits behind head on main.

Files with missing lines Patch % Lines
...ates/starknet_api/src/deprecated_contract_class.rs 75.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1853      +/-   ##
==========================================
+ Coverage   40.10%   49.98%   +9.87%     
==========================================
  Files          26       25       -1     
  Lines        1895     2573     +678     
  Branches     1895     2573     +678     
==========================================
+ Hits          760     1286     +526     
- Misses       1100     1222     +122     
- Partials       35       65      +30     

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

@giladchase giladchase changed the title chore: SN API add lints chore: starknet API add lints Nov 5, 2024
Copy link
Collaborator

@dorimedini-starkware dorimedini-starkware left a comment

Choose a reason for hiding this comment

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

Reviewed 3 of 3 files at r2, all commit messages.
Reviewable status: 3 of 5 files reviewed, 1 unresolved discussion (waiting on @giladchase and @noaov1)

a discussion (no related file):
why are there changes to papyrus rpc here?


Copy link
Contributor Author

@giladchase giladchase left a comment

Choose a reason for hiding this comment

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

Reviewable status: 3 of 5 files reviewed, 1 unresolved discussion (waiting on @dorimedini-starkware and @noaov1)

a discussion (no related file):

Previously, dorimedini-starkware wrote…

why are there changes to papyrus rpc here?

Needed rebase, Done.


Copy link
Collaborator

@dorimedini-starkware dorimedini-starkware left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 1 of 2 files at r1, 2 of 2 files at r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @noaov1)

@giladchase giladchase changed the base branch from gilad/rpc-lints to main November 7, 2024 14:34
Copy link

github-actions bot commented Nov 7, 2024

Benchmark movements:
tree_computation_flow performance regressed!
tree_computation_flow time: [34.992 ms 35.515 ms 36.123 ms]
change: [+1.8848% +3.3777% +5.1181%] (p = 0.00 < 0.05)
Performance has regressed.
Found 10 outliers among 100 measurements (10.00%)
10 (10.00%) high severe

Copy link
Collaborator

@dorimedini-starkware dorimedini-starkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @noaov1)

Lior banned `as` repo-wide, unless absolutely necessary.

Nearly all as uses can be replaced with [Try]From which doesn't
have implicit coercions like as (we encountered several bugs due to these coercions).

Motivation: we are standardizing lints across the repo and CI,
instead of each crate having separate sets of lints.

Notes: changes to docs are due to cargo doc now running on changed files
Copy link
Collaborator

@dorimedini-starkware dorimedini-starkware left a comment

Choose a reason for hiding this comment

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

Reviewed 4 of 4 files at r4, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @noaov1)

@giladchase giladchase merged commit eba18d3 into main Nov 8, 2024
13 checks passed
@giladchase giladchase deleted the gilad/snapi-lint branch November 8, 2024 10:54
Yoni-Starkware pushed a commit that referenced this pull request Nov 10, 2024
Lior banned `as` repo-wide, unless absolutely necessary.

Nearly all as uses can be replaced with [Try]From which doesn't
have implicit coercions like as (we encountered several bugs due to these coercions).

Motivation: we are standardizing lints across the repo and CI,
instead of each crate having separate sets of lints.

Notes: changes to docs are due to cargo doc now running on changed files

Co-Authored-By: Gilad Chase <gilad@starkware.com>
@github-actions github-actions bot locked and limited conversation to collaborators Nov 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants