HED JavaScript Library
    Preparing search index...

    Class BidsHedIssue

    A wrapper for a HED validation issue that is compatible with the BIDS validator.

    This class encapsulates a HED Issue object and provides additional properties and methods for BIDS-specific error reporting.

    Index

    Constructors

    Properties

    code: string

    The BIDS-compliant issue code.

    file: any

    The file associated with this issue.

    hedIssue: Issue

    The underlying HED issue object.

    issueMessage: string

    The human-readable issue message.

    line: number

    The line number where the issue occurred.

    location: string

    The path to the file where the issue occurred.

    severity: string

    The severity of the issue (e.g., 'error' or 'warning').

    subCode: string

    The HED-specific issue code.

    Methods

    • Converts a single HED issue into a BIDS-compatible issue.

      Parameters

      • hedIssue: Issue

        A HED-format issue.

      • file: any

        A BIDS-format file object used to generate a BidsHedIssue object.

      • extraParameters: any

        Any extra parameters to inject into the Issue object.

      Returns BidsHedIssue

      The BIDS-compatible issue.

    • Converts one or more HED issues into BIDS-compatible issues.

      Parameters

      • hedIssues: Error | Issue[]

        One or more HED-format issues.

      • file: any

        A BIDS-format file object used to generate BidsHedIssue objects.

      • extraParameters: any

        Any extra parameters to inject into the Issue objects.

      Returns BidsHedIssue[]

      An array of BIDS-compatible issues.

    • Filters and reduces a list of issues based on severity and user options, producing a new list.

      If checkWarnings is true, warnings will be included in the output, otherwise only errors will be included. If limitErrors is true, the output will be reduced to one issue of each subCode type in the list. The message of each "representative" issue will be updated to summarize the number of occurrences and files.

      Parameters

      • issues: BidsHedIssue[]

        A list of BIDS HED issues.

      • checkWarnings: boolean = false

        Whether to include warnings in the output.

      • limitErrors: boolean = false

        Whether to reduce the list of issues to one of each type.

      Returns BidsHedIssue[]

      The processed list of issues.