Share configuration and standards via the hidden .und folder¶
To keep a whole team on the same CodeCheck standards and custom scripts, commit a folder named
.und into your source tree. Any Understand project whose source directories include that
tree picks it up automatically — no per-project setup, and it works the same on every OS and
branch.
Not the project database
This is a folder named .und placed inside your source, holding shared configuration. It is
a different thing from the project database (a folder named <project>.und), which is
generated, machine-specific, and should not be committed — see
Manage the .und database. This page is only about the
shared config folder.
What Understand looks for¶
Whenever Understand needs configurations or plugins (running CodeCheck, listing plugins, analyzing),
it scans the project's configured source directories for a subdirectory named .und. In the
first one it finds, it reads:
Path inside .und/ |
What it provides |
|---|---|
codecheck/configs/*.json |
Shared CodeCheck configurations (your team's rule sets and options). |
plugin/**/*.upy |
Custom plugin scripts, discovered recursively — CodeCheck checks, architecture, graph, metric, and report scripts written in Understand Python (.upy). Only .upy scripts are discovered here; legacy Perl (.upl) plugins are not. |
A typical layout:
.und/
├── codecheck/
│ └── configs/
│ └── config.json # shared CodeCheck config
└── plugin/
├── Arch/
│ └── und-deps.upy # architecture / dependency script
└── CodeCheck/
├── names.upy # custom checks
└── style.upy
Set it up¶
- Create a folder named
.undat (or inside) the root of your source directory. - Add
codecheck/configs/*.jsonfor shared configs andplugin/…/*.upyfor custom scripts, using the layout above. - Commit the
.undfolder to version control alongside your source. It contains only text (JSON config and.upyscripts), so it's safe to check in and diff. - Teammates just open or create an Understand project on that source tree — Understand detects
.undand loads its configs and scripts automatically. Shared configs appear alongside the built-in ones in CodeCheck; enable the one you want to run. Nothing else to configure.
It's hidden on macOS and Linux
The leading dot hides the folder in Finder and ls by default. It's optional: if no .und folder
is present, Understand behaves normally, and individual projects can still add or override settings
locally.
Related¶
- Choosing which standard your shared config should enforce: Which coding standard should I use?
- Building the configuration you'll share: Build and share a custom CodeCheck configuration
- Running the shared config in scripts and CI: Run CodeCheck from the command line
- Writing the
.upyplugin scripts: the Python API reference