Configuration¶
azure-functions-doctor configuration is primarily CLI-driven.
This page explains how runtime behavior changes with flags, profiles, formats, and custom rules.
Command shape¶
Core options:
--path <directory>(default.)--profile <minimal|deploy|development|full>--format <table|json|sarif|junit>--output <file>--summary-json <file>-v,--verbose--debug--rules <file>--target-python <version>--deployment-mode <remote-build|local|local-prebuilt|container>(defaultremote-build)--hosting-plan <linux-consumption|flex-consumption|premium|dedicated>
Target path configuration¶
By default, diagnostics run against the current directory.
To check another project:
Path validation behavior:
- Path must exist
- Path must be a directory
- Path must be readable
If invalid, the CLI fails early with a parameter error.
Profile selection¶
Profiles control which rules execute.
full profile¶
- Includes required and optional rules
- Gives broader operational insight
- Best for local development and periodic quality sweeps
minimal profile¶
- Includes only rules marked
required: true - Best for CI gates where noise must stay low
- Stable contract for pass/fail baseline
deploy profile¶
- Azure runtime, hosting, and deployment correctness (the core rule group minus local dev-environment checks)
- Best for a pre-deploy gate that runs where no venv or Core Tools exist
development profile¶
- Local dev-environment checks only: virtual environment, Python executable,
Core Tools,
local.settings.json - Best for onboarding and workstation setup verification
See Minimal Profile for complete rule coverage.
Output format configuration¶
table¶
- Default human-readable output
- Best for local terminal use
json¶
- Machine-readable object with
metadataandresults - Best for CI parsing and automation
sarif¶
- SARIF 2.1.0 document
- Best for code scanning ecosystems
junit¶
- JUnit-style XML
- Best for CI test-report UIs
Example:
Note
Current supported formats are table, json, sarif, and junit.
Output file behavior¶
If --output is omitted, output is printed to stdout.
If --output is provided:
- Parent directory is created when needed
- File is overwritten with new report content
- CLI prints a success line showing destination path
Example:
Verbose and debug modes¶
--verbose¶
Shows fix hints for non-passing checks in table output.
--debug¶
Enables debug logging output for deeper troubleshooting.
Use debug mode when diagnosing tool behavior rather than project diagnostics.
Custom rule set configuration¶
You can replace built-in rules with a custom file:
Behavior:
- The file must exist
- The file must be valid JSON
- The rule list must pass
rules.schema.jsonvalidation - Rules are sorted by
check_order
See Rules and Examples: Custom Rules.
Summary file configuration¶
--summary-json writes a small counts-only document alongside whatever
--format produces. It is format-independent, and the parent directory is
created when needed.
The file contains the counts for the run, for example:
That is enough for a CI badge or a job summary without parsing the full report.
Deployment mode configuration¶
--deployment-mode tells the dependency checks how the app's packages reach
Azure, so they stop reporting problems that do not apply to your pipeline.
| Value | Meaning |
|---|---|
remote-build (default) |
Azure builds dependencies from requirements.txt during deployment. |
local / local-prebuilt |
Dependencies are built or vendored locally and shipped with the package. |
container |
Dependencies are baked into a custom container image. |
Hosting plan configuration¶
--hosting-plan declares the Azure hosting plan you are targeting so that
Python-version validation matches the plan's real constraints.
| Value | Meaning |
|---|---|
linux-consumption |
Legacy Linux Consumption; caps at Python 3.12 and retires 30 September 2028. |
flex-consumption |
Flex Consumption, the recommended serverless plan. |
premium |
Elastic Premium plan. |
dedicated |
App Service (Dedicated) plan. |
Without this flag, Doctor infers the plan from infrastructure files (for example
a Bicep functionAppConfig block) when it can, and skips plan-specific version
caps when it cannot.
Environment variables¶
Runtime behavior is CLI-driven. The only environment variable the tool reads is
AZURE_FUNCTIONS_DOCTOR_LOG_LEVEL, which sets the internal logging verbosity
(for example DEBUG, INFO, WARNING).
All other configuration is expressed through the CLI options listed above.
Recommended CI configuration¶
For merge blocking:
Why this shape works well:
- Deterministic required-only checks
- Parse-friendly machine output
- Exit code directly indicates gate status
Configuration anti-patterns¶
- Using full profile as hard gate for every PR (too noisy)
- Parsing display-only fields (such as section
title) as contracts - Assuming optional warnings fail builds
- Passing untrusted custom rules files in shared CI