How P42 Works
Once you have signed up and installed P42, you can:
- Manage your Repository settings,
- Let P42 (automatically) perform an Analysis of your codebase,
- Review the results and analysis details, and
- Create a pull request for accepted suggestions.
P42 automatically analyzes all code changes or commits made to the default branch of a GitHub repository . It also analyzes all pull requests made (to all branches) in the GitHub repository.
To get started, sign up to P42 with your GitHub account. Then log in to P42 and choose the GitHub repositories where you want to install the P42 app. You can select public or private GitHub repositories, depending on your P42 plan.
- The P42 installation is complete,
- There are code changes or commits made to the default branch of the repository, and
- Commit checks are enabled and pull requests are made to the repository.
ℹ️ P42 codebase analysis run time depends on the number of files and complexity of the source code in each repository.
- Using template variables to replace string concatenation for better readability,
- Replacing modifiable
constblocked scope variable declarations,
- Using of arrow functions instead of the regular functions, and more.
You can review each suggested change in a diff view, and decide whether to accept or reject any or all of the suggestions. If necessary, you can configure specific paths or folders in a repository to be excluded during analysis. Once you have reviewed all suggestions, you can easily open a pull request with all the accepted suggestions with a single click. You can then navigate to GitHub to verify the changes and merge the pull request into the default repository branch.
💡 You can rename the default P42 pull request title and edit the pull request message in GitHub. See Pull Request for more information.
P42 automatically reruns the codebase analysis when any changes are detected in the source code (e.g. new commits), or when new suggestions are available.