How to create coding practices
Last updated
Was this helpful?
Last updated
Was this helpful?
Coding practices practices can be captured using 3 different methods.
Note that Packmind supports any language,including Web technologies, Front/Back frameworks, DevOps tooling, Gherkin syntax, ...
Code reviews are a key place for developers and tech leaders to discuss best coding practices. Packmind can integrate with your Git platform to continuously monitor your code reviews discussions, and let Packmind AI extract coding practices from them.
Get started by configuring your Git repositories. In short, go to Settings -> Git Settings, then select your Git integration and pick the repositories your want monitor.
Keep in mind that each Packmind space has its own Git integrations.
We currently support GitHub, GitLab and Azure DevOps for this use case. BitBucket will come soon in H1 2025.
Next step is to navigate into the Inbox menu and into the Code reviews tab. You'll have to select to click on the New analysis button.
You'll have listed the Git repositories you've configured for your space.
Click on Run analysis to ask Packmind AI to scan your latest merge/pull requests:
On the first import, it will browse your history of MR/PRs until a set of 30 practices is found.
On further imports, it will analyze MR/PRs merged since the last time you've run an import.
The extraction process will run in background and can take few minutes to complete. The execution status is available on this page, and potential errors (such as Authorization Token expired) will be listed there.
When completed, you'll see how many practices have been generated ✅. All the generated practices will be available in the Code Review
tab of the Inbox.
For each created practice will keep track of the MR/PRs discussions from which it has been created. It will provide useful context when you'll have to review the practice.
Packmind AI will generate a positive and negative example based on the code review context, so it will not be a raw copy/paste of the PR/MR content.
Keep in mind you'll have to enable Packmind AI to benefit this feature ✨
This mode allows you to let Packmind AI extract coding practices from textual input such as:
A Wiki page that contains descriptions of coding guidelines and practices
A public web page (blog post, technical documentation, ...)
A file containing Architecture Decision Records
Go into the Inbox -> Static Content and click on New Import. Then, simply copy and paste your content, submit the form, and it will take few seconds or few minutes, depending on the input size, to process the content and create coding practices.
If you have several textual files to import, you can submit multiple inputs separately, they'll be processed in background.
If your content come from Wikis (Notion, Confluence, ...), we advise you to export first your page into Markdown to preserve formatting. Then, paste the content of the Markdown files into Packmind.
All the generated practices will be available in the Static Content
tab of the Inbox.
Keep in mind you'll have to enable Packmind AI to benefit this feature ✨
From any file, select some code, right-click and access the Packmind plugin menu, and indicate whether you're identifying a new practice or an existing one. Indicate also if it's related to:
A positive example: a source code compliant with the best practice
A negative example: a source code not compliant with the best practice
Fill the required fields, and this will be sent in the provided space in Packmind. All the source code file will be sent, and the example location is stored as well and will be displayed in the Packmind Web application.
Show how to fix bad practices
When you identify a negative example, you can then modify this code to fix the bad practices.
Right-click again on the editor and select Packmind -> Send as a correction to the previous practice example to indicate the new code state has fixed the previous identified bad practice.
Whatever the capture method you chose, all these created practices must be reviewed in the Inbox, in order to be part of your Packmind space.
Let's dive in to this 👀
Review practices in the Inbox