Shorthand for validating other flags within the same declaration. If args exists in data, msg is thrown.
971848
function(args, data, msg) {
        if (typeof (args) !== 'object') {
            args = [args];
        }

        for (var i in args) {
            if (args.hasOwnProperty(i) === false) continue;
            if (JOII.Compat.indexOf(data, args[i]) !== -1) {
                throw msg;
            }
        }
    }
766075
function checkArguments(node) {
            const args = node.arguments;

            switch (args.length) {
                case 0:
                    context.report({
                        node,
                        message: "Missing parameters."
                    });
                    break;

                case 1:
                    if (mode === MODE_ALWAYS) {
                        context.report({
                            node,
                            message: "Missing radix parameter."
                        });
                    }
                    break;

                default:
                    if (mode === MODE_AS_NEEDED && isDefaultRadix(args[1])) {
                        context.report({
                            node,
                            message: "Redundant radix parameter."
                        });
                    } else if (!isValidRadix(args[1])) {
                        context.report({
                            node,
                            message: "Invalid radix parameter."
                        });
                    }
                    break;
            }
        }
1287131
function validate(cmd, args, info) {
  AbstractCommand.prototype.validate.apply(this, arguments);
  var i
    , num;
  if((args.length - 1) % 2 !== 0) {
    throw new CommandArgLength(cmd);
  }

  for(i = 1;i < args.length;i += 2) {
    num = parseFloat('' + args[i]);
    if(isNaN(num)) {
      throw InvalidFloat;
    }
    args[i] = num;
  }
}
701690
def _check_arguments(self):
        """"""
        if self.argument_checked:
            return

        assert(self.symbol is not None)
        self.argument_checked = True

        # check if symbol contain duplicated names.
        _check_arguments(self.symbol)
        # rematch parameters to delete useless ones
        if self.allow_extra_params:
            if self.arg_params:
                arg_names = set(self.symbol.list_arguments())
                self.arg_params = {k : v for k, v in self.arg_params.items()
                                   if k in arg_names}
            if self.aux_params:
                aux_names = set(self.symbol.list_auxiliary_states())
                self.aux_params = {k : v for k, v in self.aux_params.items()
                                   if k in aux_names}
1239308
public static void invalidArgIf(boolean tester, String msg, Object... args) {
        if (tester) {
            throw invalidArg(msg, args);
        }
    }
1193062
def _clean_flags(args, caller):
    '''
    
    '''
    flags = ''
    if args is None:
        return flags
    allowed = ('a', 'B', 'h', 'H', 'i', 'k', 'l', 'P', 't', 'T', 'x', 'v')
    for flag in args:
        if flag in allowed:
            flags += flag
        else:
            raise CommandExecutionError(
                'Invalid flag passed to {0}'.format(caller)
            )
    return flags
765939
function checkArgument(i) {
  let l;

  if (l = checkBrackets(i)) tokens[i].argument_child = 1;
  else if (l = checkParentheses(i)) tokens[i].argument_child = 2;
  else if (l = checkSingleValueDeclaration(i)) tokens[i].argument_child = 3;
  else if (l = checkFunctionsList(i)) tokens[i].argument_child = 4;
  else if (l = checkFunction(i)) tokens[i].argument_child = 5;
  else if (l = checkVariablesList(i)) tokens[i].argument_child = 6;
  else if (l = checkVariable(i)) tokens[i].argument_child = 7;
  else if (l = checkSC(i)) tokens[i].argument_child = 8;
  else if (l = checkDelim(i)) tokens[i].argument_child = 9;
  else if (l = checkDeclDelim(i)) tokens[i].argument_child = 10;
  else if (l = checkString(i)) tokens[i].argument_child = 11;
  else if (l = checkPercentage(i)) tokens[i].argument_child = 12;
  else if (l = checkDimension(i)) tokens[i].argument_child = 13;
  else if (l = checkNumber(i)) tokens[i].argument_child = 14;
  else if (l = checkUri(i)) tokens[i].argument_child = 15;
  else if (l = checkInterpolation(i)) tokens[i].argument_child = 16;
  else if (l = checkIdent(i)) tokens[i].argument_child = 17;
  else if (l = checkVhash(i)) tokens[i].argument_child = 18;
  else if (l = checkCustomProperty(i)) tokens[i].argument_child = 19;
  else if (l = checkOperator(i)) tokens[i].argument_child = 20;
  else if (l = checkUnary(i)) tokens[i].argument_child = 21;
  else if (l = checkParentSelector(i)) tokens[i].argument_child = 22;
  else if (l = checkImportant(i)) tokens[i].argument_child = 23;
  else if (l = checkGlobal(i)) tokens[i].argument_child = 24;
  else if (l = checkDefault(i)) tokens[i].argument_child = 25;
  else if (l = checkOptional(i)) tokens[i].argument_child = 26;

  return l;
}
458512
function assertArguments(options, argnames) {
  if (!argnames) return;
  if (!options) throw new TypeError('missing arguments: ' + argnames);
  argnames.forEach(function (argname) {
    if (!options.hasOwnProperty(argname)) {
      throw new TypeError('missing argument: ' + argname);
    }
  });
}
438402
function validate(flags) {
  if (!flags) return false;

  if (flags.binary)
    throw new Error('binary stream not supported');

  if (flags.masked)
    throw new Error('masked stream not supported');

  return true;
}
65180
public static void check(boolean isValid, String message, Object... args) {
    if (!isValid) {
      String[] argStrings = new String[args.length];
      for (int i = 0; i < args.length; i += 1) {
        argStrings[i] = String.valueOf(args[i]);
      }
      throw new ValidationException(
          String.format(String.valueOf(message), (Object[]) argStrings));
    }
  }
181584
def flag(short_name, long_name, description, &block)
			return define_value(short_name, long_name, description, true, false, block)
		end
1364316
def validate_arguments(log, whitelisted_args, args):
    """"""
    valid_patterns = {re.compile(p): v for p, v in whitelisted_args.items()}

    def validate(idx):
      arg = args[idx]
      for pattern, has_argument in valid_patterns.items():
        if pattern.match(arg):
          return 2 if has_argument else 1
      log.warn("Zinc argument '{}' is not supported, and is subject to change/removal!".format(arg))
      return 1

    arg_index = 0
    while arg_index < len(args):
      arg_index += validate(arg_index)
677657
function validate(cmd, args, info) {
  AbstractCommand.prototype.validate.apply(this, arguments);
  if(!info.conn.transaction) {
    throw DiscardWithoutMulti;
  }
}
1111982
public static void checkPositive(int number, String message, Object... args) {
    if (number < 0) {
      throw new IllegalArgumentException(String.format(message, args));
    }
  }
1132448
function validate(cmd, args, info) {
  AbstractCommand.prototype.validate.apply(this, arguments);
  var withscores;
  if(args.length > 3) {
    withscores = ('' + args[3]).toLowerCase();
    if(withscores !== Constants.ZSET.WITHSCORES) {
      throw CommandSyntax;
    }
    args[3] = withscores;
  }
}
598424
function (arg) {
						if ( ! arg.allow ){
							return;
						}

						var exist = false;
						for (var i in data.allow) {
							if (data.allow[i] === arg.allow) {
								exist = true;
							}
						}
						if ( exist === false ) {
							data.allow[data.allow.length] = arg.allow;
						}
					}
323757
def <<(arg)
            case arg
            when PositionalArgument, KeywordArgument, FlagArgument, RestArgument
                if @arguments[arg.key]
                    raise ArgumentError, "An argument with key '#{arg.key}' has already been defined"
                end
                if arg.short_key && @short_keys[arg.short_key]
                    raise ArgumentError, "The short key '#{arg.short_key}' has already been registered by the '#{
                        @short_keys[arg.short_key]}' argument"
                end
                if arg.is_a?(RestArgument) && rest_args
                    raise ArgumentError, "Only one rest argument can be defined"
                end
                @arguments[arg.key] = arg
                @short_keys[arg.short_key] = arg if arg.short_key
            else
                raise ArgumentError, "arg must be an instance of PositionalArgument, KeywordArgument, " +
                    "FlagArgument or RestArgument"
            end
        end