tasking-manager
tasking-manager copied to clipboard
Add pre-commit hooks for code checks
What type of PR is this? (check all applicable)
- [ ] 🍕 Feature
- [ ] 🐛 Bug Fix
- [ ] 📝 Documentation
- [ ] 🧑💻 Refactor
- [ ] ✅ Test
- [x] 🤖 Build or CI
- [ ] ❓ Other (please specify)
Describe this PR
We had no mechanism to perform checks for the code that has been pushed as mentioned #5714 . Also since the integration of pre-commit.ci we have been facing checks failing due to lack of pre-commit-config.yaml within the project.
Need of Further Investigation (⚠️ )
- For https://github.com/pre-commit/mirrors-prettier checks,
autofixdidn't fix all the issues so fronend team should have to look into depth. Currently is commented out. - https://github.com/asottile/dead similarly had also flagged many portion of the code that were unused, But this should be confirmed by dev team & then we can have this enabled as well.
- for
pretty-format-jsonhook, that would format all json files, this caused tests to fail, i believe this is due to some test cases that wouldn't parse successfully. Needs more investigation from backend team, as just formatting the*.jsonthe tests shouldn't have failed.
Screenshots
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code
@eternaltyro the build and push seems to fail, if reran. It did pass the first time i created this PR, but failed once i had more commits pushed to this branch. Just letting you know.
@dakotabenjamin i have 3 of those commented since they messed up our code and autofix didn't work. Need more input from dev end on those. May be we should create new issues about that.