2.4. gnatcheck module

GNAThub plug-in for the GNATcheck command-line tool.

It exports the GNATcheck class which implements the GNAThub.Plugin interface. This allows GNAThub’s plug-in scanner to automatically find this module and load it as part of the GNAThub default execution.

class gnatcheck.GNATcheck[source]

Bases: Plugin, Runner, Reporter

GNATcheck plugin for GNAThub.

Configures and executes GNATcheck, then analyzes the output.

VALID_EXIT_CODES = (0, 1)
__init__()[source]

Initialize instance properties.

report()[source]

Parse GNATcheck output file report.

Returns according to the success of the analysis:

  • GNAThub.EXEC_SUCCESS: on successful execution and analysis

  • GNAThub.EXEC_FAILURE: on any error

Identify two type of messages with different format:

  • basic message

  • message for package instantiation

run()[source]

Execute GNATcheck.

Returns according to the success of the execution of the tool:

  • GNAThub.EXEC_SUCCESS: on successful execution

  • GNAThub.EXEC_FAILURE: on any error