abstract class Tinman.Core.Cx.Inspections.CxInspection

Represents an inspection that may be performed on PSI nodes.

An inspection is performed by calling the Check method. The given CxNode is inspected and zero or more messages are output to the specified Validator.

By failing, an inspection indicates that a problem exists which will have consequences as described by Flags. The name of an inspection is derived from its flags, for example: 'CX00001'.

Public / Constants


public static readonly attribute CX00001 → (CxInspection)

[CX00001] bad code model: ...

The code model contains critical semantic errors:

  • …​invalid name
    A PSI node contains a CxId or CxName value that is invalid, see CxId.Invalid resp. CxName.Invalid. Invalid names cannot be parsed, so this problem may only occur when building a PSI model from code. Using invalid names in source code will trigger syntax errors.


public static readonly attribute CX00002 → (CxInspection)

[CX00002] unresolved reference: ...

A PSI node that implements the ICxReference interface has not been resolved completely, i.e. IPsiNode.IsResolved returns false.

The code model must be modified in order to fix this, either by adding missing code parts or by repairing broken code references.


public static readonly attribute CX01001 → (CxInspection)

[CX01001] missing native code: ...

No native code for CxStatementCode.LanguageCpp has been specified for the CxStatementCode.


public static readonly attribute CX02001 → (CxInspection)

[CX02001] missing native code: ...

No native code for CxStatementCode.LanguageCs has been specified for the CxStatementCode.


public static readonly attribute CX03001 → (CxInspection)

[CX03001] missing native code: ...

No native code for CxStatementCode.LanguageHlsl has been specified for the CxStatementCode.


public static readonly attribute CX04001 → (CxInspection)

[CX04001] missing native code: ...

No native code for CxStatementCode.LanguageGlsl has been specified for the CxStatementCode.

Public / Methods


public abstract method Check → (2)

node in : CxNode

The PSI node to check.

validator in : Validator

The validator to use for outputting messages.

returns → CxInspectionResult

The result of the inspection.

Performs this inspection on the given node in.

Public / Attributes


public attribute Flags → (get)

value : CxInspectionFlags

The inspection flags.

Returns the inspection flags.


public attribute Identifier → (get)

value : int32

The inspection identifier.

Returns the inspection identifier.

Protected / Constructors


protected constructor CxInspection → (2)

identifier in : int32

The value for Identifier.

flags in : CxInspectionFlags

The value for Flags.

Creates a new instance of CxInspection.

Protected / Methods


protected method Message → (2)

node in : CxNode

The node for which the inspection has failed.

message in : string

The inspection message.

returns → ValidateMessage

The validation message.

Generates a validation message for a failed inspection.