starknet-rs
starknet-rs copied to clipboard
Add linters
PR: https://github.com/xJonathanLEI/starknet-rs/issues/596
Add linters as referenced from reth repo with below exceptions which can be added later. Exceptions till now: rust.missing_docs = "allow" rust.unreachable_pub = "allow" type-repetition-in-bound = "allow"
Added PR to ignore linter changes affecting codegen.rs PR: https://github.com/xJonathanLEI/starknet-jsonrpc-codegen/pull/5
Looks good to me, just two remarks:
- For the codegen file, this should be handle directly at source, can you confirm @xJonathanLEI ?
- Can you rebase on main?
lgtm @xJonathanLEI what about codegen file?
@tcoratger Yes the codegen file should not be modified in any case, as any codegen update will overwrite all the changes.
@aniketpr01 Please make changes to xJonathanLEI/starknet-jsonrpc-codegen such that the codegen output matches exactly what this PR does to that file.
@tcoratger Yes the codegen file should not be modified in any case, as any codegen update will overwrite all the changes.
@aniketpr01 Please make changes to xJonathanLEI/starknet-jsonrpc-codegen such that the codegen output matches exactly what this PR does to that file.
@xJonathanLEI should i keep the codegen changes as it is in this repo and perform same changes to starknet-jsonrpc-codegen by creating a seperate PR to it? How do i ensure that codegen output matches exactly? by just changing codegen file or adding all the linters that are added for starknet-rs as well to that?
should i keep the codegen changes as it is in this repo and perform same changes to starknet-jsonrpc-codegen by creating a seperate PR to it?
Yes please.
How do i ensure that codegen output matches exactly? by just changing codegen file or adding all the linters that are added for starknet-rs as well to that?
You can run the generate command and overwrite the file to this PR branch to see if you generate any diff. You should only be seeing a single line of commit hash diff.
An alternative solution would be to exclude the codegen file from the lints. Not sure if that's desirable though, as some lints actually affect the API (e.g. const).
should i keep the codegen changes as it is in this repo and perform same changes to starknet-jsonrpc-codegen by creating a seperate PR to it?
Yes please.
How do i ensure that codegen output matches exactly? by just changing codegen file or adding all the linters that are added for starknet-rs as well to that?
You can run the generate command and overwrite the file to this PR branch to see if you generate any diff. You should only be seeing a single line of commit hash diff.
An alternative solution would be to exclude the codegen file from the lints. Not sure if that's desirable though, as some lints actually affect the API (e.g.
const).
@xJonathanLEI Could you please respond the Telegram DM i have sent for a doubt over working with starknet-jsonrpc-codegen repo
should i keep the codegen changes as it is in this repo and perform same changes to starknet-jsonrpc-codegen by creating a seperate PR to it?
Yes please.
How do i ensure that codegen output matches exactly? by just changing codegen file or adding all the linters that are added for starknet-rs as well to that?
You can run the generate command and overwrite the file to this PR branch to see if you generate any diff. You should only be seeing a single line of commit hash diff.
An alternative solution would be to exclude the codegen file from the lints. Not sure if that's desirable though, as some lints actually affect the API (e.g.
const).
Have reverted codegen.rs from this(starknet-rs) repo and added another PR which will exclude existing rules to it. PR: https://github.com/xJonathanLEI/starknet-jsonrpc-codegen/pull/5 Please review @xJonathanLEI
Squashed and rebased.