2. Project Configuration¶
A “project” corresponds to exactly one system under analysis. For a complete analysis of a project’s source code, the Axivion Suite analysis software must be integrated with the project’s build system, the version control system, and the infrastructure presenting the results from the analysis. This is done by setting up suitable project configuration files. In addition, there are many user options that allow the erosion analysis to be customized.
The Axivion Suite is highly configurable, allowing you to
integrate it into your existing build infrastructure
select, customize, and fine-tune suitable analysis steps
add custom analysis steps.
The configuration can be split into multiple files. This allows reusing parts of the configuration in multiple projects, or separating configuration aspects done by different people (e.g., separating architecture configuration as done by the architect from code annotation configuration).
Starting from version 7.3 of the Axivion Suite, all these aspects are covered by a
single configuration system based on JSON files that can be created and edited using a
graphical user interface named axivion_config. Programs
such as generator scripts and AI coding assistants write them following the JSON
configuration file format. These JSON files can be
complemented by manually written Python files, in which the configuration state can be
changed programmatically.
Choosing between JSON and Python
Write the project configuration in JSON files wherever possible. The Project
Wizard of axivion_config creates an initial set of JSON
files for a new project. JSON configuration files record the version of the
Axivion Suite that wrote them in the _VersionNum key. When a later version loads
them, it migrates renamed rules, renamed options, and changed option types
automatically. Python configuration files carry no version information and are not
migrated, so they have to be adapted by hand when a new version changes a rule or an
option that they access.
Use a Python configuration file only for settings that JSON cannot express:
control constructs such as conditions or loops, e.g., activating all rules of a subtree that have a given severity
configuration derived from external input that is more complex than environment variables, see Variable Substitution
options whose type cannot be represented in JSON
moving a rule into a different rule group
Keep such Python files small and list them as more local layers on top of the JSON configuration files.
Python configuration files may only use the functions and classes documented in
Python API and in the API reference of the axivion package. All
other modules shipped with the Axivion Suite, in particular everything in the bauhaus
package, are internal. They can change or be removed in any version without notice
or migration.