The .napirc
file lives at the root of your codebase and defines both the settings needed to minimally run the tool, and the parameters within which napi
will assess your codebase for technical debt.
Example File
For a given python project, the file will look like the following. This config is for Apache Airflow.
When running in another directory, the .napirc
needs to be at the root of whatever path you pass to the CLI via the —workdir
command. e.g. napi audit view —workdir=/path/to/airflow
{
"language": "python",
"project": {
"include": [
"airflow-core/src/**/*"
],
"exclude": [
".git/**",
"**/dist/**",
"**/build/**",
"**/__pycache__/**",
"**/*.pyc",
"**/.pytest_cache/**",
"**/venv/**",
"**/.env/**",
"**/*.egg-info/**",
"**/.tox/**",
"**/.coverage",
"**/htmlcov/**",
"**/.mypy_cache/**"
]
},
"outDir": "napi_out",
"python": {
"version": "3.11"
}
}
Configuration Parameters
Field | Required? | Description |
---|---|---|
| True | The programming language to process. |
| True | The output folder of extracted code. |
| Only for python projects | The version of the language to consider. Only major version is required. (e.g. |
| Only for C projects | An optional array of directories to include for processing. |
| True | Files to include in the audit/visualization process. |
| True | Files to exclude from the audit/visualization process. |