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
    code: string

    The BIDS-compliant issue code.

    file: object | null

    The file associated with this issue.

    hedIssue: Issue

    The underlying HED issue object.

    issueMessage: string

    The human-readable issue message.

    line: string

    The line number where the issue occurred.

    location: string | undefined

    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.

    • Add new parameters to the underlying HED issues of a list of BIDS issues and regenerate the issue messages.

      Parameters

      • issues: BidsHedIssue[]

        A list of BIDS-compatible issues.

      • parameters: {}

        The parameters to add.

      Returns void

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

      Parameters

      • hedIssue: Issue

        A HED-format issue.

      • file: object | null

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

      • extraParameters: {} = {}

        Any extra parameters to inject into the Issue object.

      Returns BidsHedIssue

      The BIDS-compatible issue.

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

      Parameters

      • hedIssues: any

        One or more HED-format issues.

      • file: object | null

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

      • extraParameters: {} = {}

        Any extra parameters to inject into the Issue objects.

      Returns BidsHedIssue[]

      An array of BIDS-compatible issues.

    • Filter and reduce 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.