Each repository where the P42+ app is installed has its own Repository page. The Repository page contains a detailed breakdown of the refactoring and modernization suggestions specific to the repository.
To view the Repository page:
- Log in to P42.ai and click on Repositories.
- In the Repositories page, click to select a GitHub repository.
- In the Repository page, you will see the suggestions (if any) from the analysis.
💡 Easily access the Repository page for your most important repositories by creating bookmarks in your favourite web browser.
Here are the main elements you can find in each Repository page:
Organization or user name Links to the organization or user repositories page. For example,
Repository name Name of the GitHub repository. For example,
Analysis status Indicates if the analysis is running or pending. When the analysis is finished, the suggestion count is shown. For example,
💡 If you see the "Analysis timed out" status, this means the analysis runtime for the repository has exceeded ten minutes. You can try to resolve this error by excluding large files or folders (e.g. imported third-party libraries) from the analysis. See path exclusions on how to do this.
Enable/disable analysis Indicates if the P42+ analysis is enabled for this repository. Click to toggle.
Excluded repository paths Brings up the Configure Excluded Paths dialog to configure path exclusions for the selected repository.
Link to GitHub repository Link to the GitHub repository. For example,
Default repository branch Indicates the default branch for the repository. For example, the default branch for
Suggestions (tab) The suggestions tab contains the suggestions for the repository. See suggestions for more information.
Configuration (tab) The configuration tab contains the code action configurations for this repository. See configuration.
You can configure P42+ to exclude specific paths or files in the repository from all codebase analysis and commit checks. By default, P42+ adds path exclusions for output folders (e.g. folders containing rendered output files), minimized libraries, and third-party libraries embedded in your codebase.
To configure path exclusions:
- Click on the \<N> excluded paths button.
- In the Configure Excluded Paths dialog box, enter the prefix of the files or directories which you want to exclude for all P42+ analysis and checks. Press the Enter key to specify multiple prefixes on multiple rows.
📝 For example, specifying
docs/as a path prefix excludes all paths under the
docsdirectory in the repository.
- Click Accept to save the changes, otherwise click Cancel to revert to the previous settings.
The suggestions tab contains the refactoring and modernization suggestions identified by P42+ for your GitHub repository during the codebase analysis.
💡 P42 codebase analysis works best on source files that use code formatters, such as Prettier.
Expand All Click to show the code refactoring and modernization suggestions for all source files.
Collapse All Click to hide the code refactoring and modernization suggestions for all source files.
File A file for which P42+ has found refactoring and modernization suggestions. For example,
Expand and Collapse button Toggle the expand and collapse button next to a source file to show or hide the detailed code refactoring and modernization suggestions from P42 in a diff view.
View source file button Click the view source file button next to a source file to view the original content in GitHub.
Suggestion A suggestion that was found at a specific line number. Click to expand and see potential safety warnings and a detailed diff view.
Diff view The diff view shows the suggestion change in a before/after view.
The configuration tab contains the different code actions and their configuration for the repository.
For each code action, there are several UI elements:
Enabled / Disabled Indicates whether this code action is enabled for the repository. Click to toggle enabled/disabled.
Commit Checks Enabled / Disabled Indicates whether commit checks for this code action are enabled for the repository. Click to toggle enabled/disabled.
Learn more Link to the code action documentation for the specific action.
Short summary Description of the code action in 1-2 sentences.