def build_validator_call(path, ignore_headers=False, ignore_subject=True):
    """Build a subprocess command to the bids validator"""

    # build docker call
    command = ['bids-validator', '--verbose', '--json']

    if ignore_headers:
        command.append('--ignoreNiftiHeaders')
    if ignore_subject:
        command.append('--ignoreSubjectConsistency')

    command.append(path)

    return command