yral-dapp / hot-or-not-web-leptos-ssr

Other
2 stars 9 forks source link

Automatic lint checks using Git Hooks #289

Open Natasha-GB opened 3 months ago

rupansh-sekar-yral commented 3 months ago

Hey @Veercodeprog is this something you'd be interested in? basically we want to install git hooks automatically (e.g when the app runs for the first time) the git hook should run the following pre-commit:

pre-push, the git hook should run the following:

(checkout the following workflow for the commands: https://github.com/go-bazzinga/hot-or-not-web-leptos-ssr/blob/main/.github/workflows/build-check.yml )

Veercodeprog commented 3 months ago

Hi, @rupansh-gob I'm definitely interested in setting up these Git hooks. I'll implement the pre-commit for cargo fmt and clippy, and the pre-push for the release build.

Veercodeprog commented 3 months ago

This PR #315 introduces Git hooks to automatically enforce code quality and ensure build integrity before committing and pushing changes.

For detailed instructions and further customization options, please refer to the documentation in the Gist

Veercodeprog commented 3 months ago

For now, I’ve used a #[allow(unreachable_patterns)] directive to suppress this error. Not sure why i am getting this as its not occurring in main branch. from my limited understanding of this kind of error occurs when the pattern match is on a type that should never have any values, which in our case is Infallible.

' error: unreachable pattern --> ssr/src/fallback.rs:39:9 39 Err(err) => Err(( ^^^^^^^^

= note: this pattern matches no values because std::convert::Infallible is uninhabited = note: -D unreachable-patterns implied by -D warnings = help: to override -D warnings add #[allow(unreachable_patterns)] '