code: def check(target, ruleset, ruleset_file, debug, json, stat, skip, tag, verbose,
            checks_paths, target_type, timeout, pull, insecure):
      
      if ruleset and ruleset_file:
          raise click.BadOptionUsage(
              "Options '--ruleset' and '--file-ruleset' cannot be used together.")
  
      if json and not os.path.isdir(os.path.dirname(os.path.realpath(json.name))):
          raise click.BadOptionUsage(
              "Parent directory for the json output file does not exist.")
  
      try:
          if not debug:
              logging.basicConfig(stream=six.StringIO())
  
          log_level = _get_log_level(debug=debug,
                                     verbose=verbose)
          results = run(
              target=target,
              ruleset_name=ruleset,
              ruleset_file=ruleset_file,
              logging_level=log_level,
              tags=tag,
              pull=pull,
              checks_paths=checks_paths,
              target_type=target_type,
              timeout=timeout,
              insecure=insecure,
              skips=skip
          )
          _print_results(results=results, stat=stat, verbose=verbose)
  
          if json:
              results.save_json_to_file(file=json)
  
          if not results.ok:
              sys.exit(1)
          elif results.fail:
              sys.exit(3)
  
      except ColinException as ex:
          logger.error("An error occurred: %r", ex)
          if debug:
              raise
          else:
              raise click.ClickException(str(ex))
      except Exception as ex:
          logger.error("An error occurred: %r", ex)
          if debug:
              raise
          else:
              raise click.ClickException(str(ex))
docs: Check the image/dockerfile (default).