It is equally important to make sure that the new code follows best practices as well.
P42 now makes this easier by reporting check results for new commits directly in GitHub. You can enable commit checks per analysis:
A great time for this is when there are no further P42 suggestions.
At this point, the checks will pass, and any future regression will be visible in GitHub.
Once the commit checks are enabled, they will run on new commits to the default repository branch:
When there are suggestions, the checks are marked as failed. The check details then contain more information about the refactoring and the suggestions, including diffs.
The P42 commit check integration into GitHub makes it easy for you to know about any modernization regressions in your code. Give P42 a try!