Skip to content

Accepted hot spots and baseline

Updated on 5 December 2026

On a project that is years old, the first Summary lists hundreds of hot spots that nobody is going to fix this week, and what was introduced today gets lost among them. Accepting a hot spot says "we know about this one": from then on the Summary hides it, until it gets worse.

What an acceptance is

An acceptance says that one metric of one element may stay where it is: it keeps the metric, the element, the value it had when it was accepted and, if you like, a reason.

  • As long as the value does not get worse, it stays accepted. A value equal to or better than the accepted one is not a hot spot. Worse means higher, for an "above" threshold, or lower, for a "below" one.
  • A worse value is a hot spot again, and its explanation in the Summary says at what value it was accepted: v(G) 27 > error 20 (accepted at 23).
  • A value that improves does not tighten the acceptance by itself. If you want the new value to be the limit, accept it again or create another baseline.
  • The cells of the tables do not change. An accepted value is still beyond its threshold, and its icon and its colour still say so. The exports do not change either.

Accept a hot spot

  1. Right-click a hot spot of the Summary, or a cell of a results table.
  2. Choose Accept...
  3. In Accept Hot Spot, write why you accept it, or leave it empty, and confirm.

What is accepted depends on where you clicked:

Right-click on What is accepted
A hot spot of the Summary All of its metrics beyond a threshold
A cell of a metric column That metric of the element, if its value is beyond a threshold
A cell of the name column Every metric of the row beyond a threshold

Accept... is disabled when there is nothing to accept. If the element already had a reason, the dialog offers it again.

Remove Acceptance, in the same menu, removes the acceptances of those metrics and shows the hot spot again. It also works for a value that got worse since it was accepted.

Create a baseline

Create Baseline from This Run, in the toolbar of the run, accepts at once every value of the run beyond a threshold, at its current value. It is the way to start on an existing project: from then on, the Summary shows only what is new and what gets worse.

A balloon says how many values it accepted:

Baseline created: 412 values beyond a threshold accepted in .idea/stau-metro-baseline.xml

Creating the baseline again brings it up to date:

  • The values beyond a threshold are accepted at their value of now, and keep the reason they had.
  • The acceptances of the measured elements that are no longer beyond the threshold of that metric are removed.
  • The acceptances of elements the run did not measure stay: creating the baseline from one module does not touch those of the others.

What changes in the results

  • The Summary hides the hot spots whose metrics beyond a threshold are all accepted, and for the others lists only those that are not. Its first line counts the hidden ones: Elements with problems: 12 of 340 · in error: 3 · accepted, hidden: 25. If none is left, it says No hot spots besides the accepted ones · elements: …
  • Show Only Rows That Exceed a Threshold hides a row when all its problems are accepted.
  • Show Accepted Hot Spots, in the toolbar of the run, shows them again in both places. In the Summary, the explanation of an accepted metric ends in (accepted), or in (accepted: …) with the reason, and the first line says accepted: 25. It is off when each results tab opens.

Every results tab of the project follows the acceptances as soon as they change, also when the file changes on disk, for instance when you pull changes from the repository.

Share the baseline with the team

The acceptances are kept in the project, in .idea/stau-metro-baseline.xml. It is a text file sorted by element and by metric, meant to be read in a diff and reviewed in a pull request: “File formats” describes it. Put it in version control, and everyone who opens the project sees the same Summary. When no acceptance is left, the file is deleted.

The command for continuous integration reads it too: an accepted value does not fail the build, and the report says how many values were accepted. A value worse than the accepted one fails as any other (“Continuous integration”).

When an element is renamed

An acceptance recognises its element by the name of its row (“What is analyzed”). If you rename or move an element, or its signature changes because you add a parameter, it no longer matches its acceptance and shows up again as a hot spot. This is on purpose: the plugin cannot tell a renamed element from a new one, and showing it again is the safe side. Accept it again if it is still known debt.

The old acceptance stays in the file, unused, until you create another baseline.

Acceptance or snapshot?

Both help you look only at what gets worse, in different ways:

Acceptances Snapshot
What it fixes Element by element, what you decide to accept A whole run
Where it lives In the project, shared with the team In the .met file you choose
What it shows The Summary without what is accepted A comparison: values before and now, New and Worse

They can be used together: a comparison with a snapshot hides what is accepted too (“Comparing two runs”).