-
Notifications
You must be signed in to change notification settings - Fork 8
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
Enhance CI workflow with additional checks and build steps #10
Conversation
Awesome suggestion @DharunKumar04
|
Hi @AlexsJones , I apologize for the error message you encountered when running Using tools like rustfmt and clippy can help to ensure that our codebase is clean, readable, and consistent. This can make it easier for developers to understand and contribute to the codebase in the future. Additionally, these tools can help to catch potential bugs and errors before they cause problems. |
This is fun because it looks like you generated this reponse and PR from chatgpt, but Im not even mad 👯♂️ |
- name: Run Clippy linter | ||
run: | | ||
rustup component add clippy | ||
cargo clippy -- -D warnings |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue here is that it is going to force some areas in the code to fail this warning, but functionally they are designed that way for a reason
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please give me some time alex i will work on this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AlexsJones i used this command cargo clippy -- -D warnings
to deny all the lint errors that will stop the workflow hoping it would make the codebase clean . But i get your point, some things are designed that way for a specific reason right .
So instead of denying all the lint errors we can modify it in such a way that it will only denies specific lint using the command cargo clippy -- -A clippy::all -D clippy::absurd_extreme_comparisons
. But i think whitelisting each lints by name is a time consuming task and it wont be effective . So for this, we can make use of the lint groups that are available in clippy but even still this might be a roadblock for devs because it will throw errors .
Kindly share your thoughts on this whether we can remove this clippy feature or we can whilelist particular lints (by name or by group) and i will make the necessary changes alex.
Hi @AlexsJones ,
This Pull Request enhances the existing CI workflow by introducing several new checks and build steps:
cargo-audit
to check for vulnerabilitiescargo-fmt
to format codecargo clippy
to detect potential linting errorscargo check
to check for syntax errors and other compilation issuesThese changes will help to ensure that our code is of high quality and is free of security vulnerabilities.
PS: For enhanced code comprehension, I've incorporated the cargo doc command into the CI stage to generate comprehensive documentation. If this approach is satisfactory, we can publish this documentation to crates.io