How to create coding practices
Last updated
Was this helpful?
Last updated
Was this helpful?
Coding practices can be captured by 4 different methods:
Through analysis of code reviews
Through text import
Using Packmind IDE plugins
Using manual creation in the web app
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 . In short, go to Settings -> Git Settings, then select your Git integration, and pick the repositories you want to monitor.
Keep in mind that each Packmind space has its own Git integrations.
The next step is to navigate into the Inbox menu and click on New -> From Merge Request button. You'll have 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 20 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 the background and can take a few minutes to complete. The execution status is available on this page, and potential errors (such as Authorization Token expired) will be listed there.
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.
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 and click on New -> Generation with AI. Then, simply copy and paste your content, submit the form, and it will take a 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 comes 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 Inbox.
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.
You can create practices directly in the web app using the creation form.
Go into the Inbox and click on New -> Manual creation. Then, just fill in the name, description, language, categories, and examples.
In the creation form only the name is required, but to be validated the practice needs to have at least one negative example.
Whatever the capture method you chose, all these created practices must be reviewed in the Inbox to be part of your Packmind space.
When completed, you'll see how many practices have been generated . All the generated practices will be available in the Inbox.
Keep in mind that you'll have to enable Packmind AI to benefit from this feature
Keep in mind that you'll have to enable Packmind AI to benefit from this feature
Let's dive into this