cli icon indicating copy to clipboard operation
cli copied to clipboard

[FEATURE] Addition of pre-commit hooks to run tests and linting before commit.

Open neoandmatrix opened this issue 9 months ago • 2 comments

Why do we need this improvement?

Currently a commit for changes can be made even if the changes might not be correct and are not passing all the tests which one gets to know only after a CI run of those changes. This increases load on CI and also delays the review process.

How will this change help?

Introducing pre-commit hooks that run tests and linting and important parameters before a commit will allow to help to catch and correct such errors in code before making a PR.

Screenshots

No response

How could it be implemented/designed?

Pre-commit hooks like husky can be setup to run tests and linting and commit-lint can be added to enforce correct format in commit messages.

🚧 Breaking changes

No

👀 Have you checked for similar open issues?

  • [x] I checked and didn't find a similar issue

🏢 Have you read the Contributing Guidelines?

Are you willing to work on this issue?

Yes I am willing to submit a PR!

neoandmatrix avatar Mar 10 '25 05:03 neoandmatrix

Hi @AayushSaini101 Can I work on this issue?

d-cryptic avatar May 26 '25 10:05 d-cryptic

@AayushSaini101 I will work on it !!!!

IITI-tushar avatar Jun 16 '25 08:06 IITI-tushar

@neoandmatrix This requires further improvement. Most Github workflows are failing spontaneously due to this. https://github.com/asyncapi/cli/actions/runs/17284879586/job/49061408637

Shurtu-gal avatar Aug 28 '25 04:08 Shurtu-gal

Actually this is an error due to some mis configuration in package-lock.json. There have been too much changes and conflict resolution during these many PR.

neoandmatrix avatar Aug 28 '25 04:08 neoandmatrix

@Shurtu-gal https://github.com/asyncapi/cli/actions/runs/17266405162/job/48999462814 This was the last run with a correct package-lock.json file. Here all are passing and working fine.

neoandmatrix avatar Aug 28 '25 04:08 neoandmatrix