Static Analysis

FSM2 is able to perform a static analysis on your state machine. The static analysis tool is able to detect a number of issues with your FSM including:

  • States which cannot be reached

  • Duplicate States

  • Events which target an non-registered state.

To perform a static analysis I usually set up a unit tests. This allows me to manually run the static analysis with a single click on the unit test.

  test('export', () async {
    final machine = _createMachine();
    await machine.analyse();
  });

Last updated