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

Run cargo clippy when building the Pokémon Service #1727

Closed
david-perez opened this issue Sep 12, 2022 · 5 comments
Closed

Run cargo clippy when building the Pokémon Service #1727

david-perez opened this issue Sep 12, 2022 · 5 comments
Labels
good first issue Good for newcomers server Rust server SDK

Comments

@david-perez
Copy link
Contributor

@david-perez david-perez added good first issue Good for newcomers server Rust server SDK labels Sep 12, 2022
@david-perez david-perez changed the title Run cargo clippy and deny warnings when building the Pokémon Service Run cargo clippy when building the Pokémon Service Sep 12, 2022
@GeneralSwiss
Copy link
Contributor

GeneralSwiss commented Sep 17, 2022

Are you wanting the rust-runtime Makefiles to be edited to include clippy as a target? Or would you rather have the cargo clippy command injected in the respective ci-action/scripts? Do you want to use --fix? If you want the action scripts to be edited, I noticed the Python one copies some dynamic libraries around during build -- does this need to happen for cargo clippy to work correctly? (For the Python script there is just a call to make test and no reference to be able to use clippy outside of the Makefile definition, so I wasn't sure)

@david-perez
Copy link
Contributor Author

I guess we should create a test target in aws-smithy-http-server/examples/Makefile just as we have in aws-smithy-http-server-python/examples/Makefile, and then both CI scripts (1, 2) invoke make test, for consistency.

Are you wanting the rust-runtime Makefiles to be edited to include clippy as a target?

Yes. The CI scripts then just invoke make clippy.

Do you want to use --fix?

No.

If you want the action scripts to be edited, I noticed the Python one copies some dynamic libraries around during build -- does this need to happen for cargo clippy to work correctly?

Should not be required, no.

@GeneralSwiss
Copy link
Contributor

Just out of curiosity, what's the benefit here? Is this to just convey "we use clippy and you should too, see how it can be included in this sample project"?

@david-perez
Copy link
Contributor Author

Yeah, mostly. We want to provide a good example service and running clippy in CI is a good practice to follow idioms and such.

@david-perez
Copy link
Contributor Author

Closed by #1742.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers server Rust server SDK
Projects
None yet
Development

No branches or pull requests

2 participants