Skip to main content

Static Mode

Static mode analyses your Flutter source code directly — no device, emulator, or running app needed. It is the fastest way to catch accessibility issues early, and the right starting point before running a full runtime audit.

Running

conalyz static

Or pass --dir without a mode — it defaults to static:

conalyz --dir . # analyse the current project
conalyz --dir ./my-app # analyse a project in another directory

Use --platform to target web instead of mobile (default):

conalyz static --platform web
conalyz static --platform mobile # default — same as omitting the flag

What it checks

Static mode reads the widget tree from your source code and reports:

  • Missing semantic labels — buttons, links, images, and icon buttons with no accessible name
  • Missing tooltipsIconButton widgets without a tooltip
  • Inaccessible gesture detectorsGestureDetector and custom tap handlers with no Semantics wrapper
  • Missing form field labelsTextField and TextFormField without a labelText or semanticsLabel
  • Vague labels — button text like "Click here", "Read more", or "Submit" that is meaningless without surrounding context
  • Known contrast issues — hardcoded colour pairs that are known to fail the WCAG AA 4.5:1 ratio

What it cannot check

Some checks require the app to be running:

CheckWhy it needs runtime
Touch target sizeActual rendered size depends on layout — not calculable from source alone
Colour contrastThemes, dynamic colours, and image backgrounds are only resolved at runtime
Focus traversalThe focus tree is only generated when the app runs
Slider valuesValues are runtime state
Disabled element hintshasEnabledState flags come from the live Semantics tree

For these checks, use Manual mode, Automated mode, or Capture mode.

Output

Static mode writes the same HTML and JSON reports as the runtime modes:

conalyz_report.html — visual report, opens in any browser
conalyz_report.json — structured data for CI integration

Use --output to write reports to a specific directory:

conalyz static --output ./reports

Using with CI

Static mode runs in seconds with no device attached — it fits naturally into a pull request check:

# GitHub Actions example
- name: Run Conalyz static analysis
run: |
conalyz static --dir . --output ./conalyz_report

Exit code is 0 when no critical issues are found, 1 when critical issues are detected — so the CI step fails automatically on critical violations.

Relationship to runtime modes

Static and runtime analysis complement each other. A good workflow is:

  1. Run conalyz static on every pull request to catch obvious issues early.
  2. Run conalyz auto on a device before each release to catch runtime-only issues — contrast ratios after theme application, actual touch target sizes, focus traversal order.

The reports from both modes use the same format and severity levels, so results are easy to compare.