To make your code clean you have to maintain the readability of your code. You have to make sure there is no duplication, code smells and vulnerabilities in your code.
To maintain your code quality you have to do code review.
I use Codegrip https://www.codegrip.tech/
which makes code review easier and maintain the quality of your code.
Codegrip is the one-stop tool for all code quality measures. Codegrip helps you to build a powerful code. It is an automated code review tool where code undergoes various tests for bugs, code smells, vulnerabilities and scans it for any security issues. It is a code analysis tool that finds critical metrics like duplication percentage, suggestive error, error resolution time, and many more displayed for all types of code. CodeGrip makes sure that every software has excellent code quality.