Like this project? it on

Core Concepts

Checkmate uses three core abstractions:

  • Project : A project is everything that structure that contains a .checkmate directory.

  • Snapshot : A snapshot represents the state of an entire project or a subset of it at a given point,

    which can e.g. be a given commit or the local state at a given point in time.

  • File Revision : A file revision represents the state of a given file in the project at a given point.

The Project

In checkmate, you create a new project by running checkmate init. This will create a .checkmate folder either in your current working directory, or, if you call it inside a git repository, in the directory that contains the .git folder. You project consists of all files contained in the directory that contains the .checkmate folder (including all subdirectories).

Snapshots

A snapshot represents the state of your entire project or a subset of the project at a given point. This can be e.g. a certain git commit or just the local state of the project directory at a given time. Snapshots are generated through the checkmate analyze command.

File Revisions

A file revision describe the state of a file at a given point. It contains both statistics as well as a list of issues for the given file. To create a snapshot, several file revisions are bundled together.

Generating a New Snapshot

When you run checkmate analyze, the following things happen behind the scenes:

  • checkmate generates a list of all the files matching your analysis request
  • it checks which of these file revisions have not yet been analyzed
  • it analyzes the missing file revisions and stores the results in its database
  • it creates a snapshot from the file revisions

Like this, checkmate makes sure to never analyze the same file twice, which greatly improves the performance of the tool when running it against a large codebase.