<commit_before>/*
 * Copyright 2011 Joyent, Inc.  All rights reserved.
 *
 * Amon common string messages. Could be useful for l10n.
 *
 * Usage:
 *    var Messages = require('amon-common').Messages;
 *
 *    // Rendering a standard message.
 *    var m = Messages.message(Messages.MissingParameter, "foo");
 *
 *    // Rendering a custom message.
 *    var m = Messages.message("arg %s for zone %s is bogus: %o",
 *                             argName, zone, errObject);
 */

var sprintf = require('sprintf').sprintf;

module.exports = {

  // Standard Amon messages.
  CustomerInvalidForCheck: 'customer %s is not associated with check %s',
  InvalidConfig: 'config is invalid: %s',
  InvalidMetric: 'metrics must contain an object with name, type and value',
  InvalidStatus: 'status must be one of: %s',
  InvalidUrn: 'urn %s is not a known check urn.',
  MissingParameter: '%s is a required parameter',
  UnknownCheck: '%s is not a registered check',
  ZoneInvalidForCheck: 'zone %s is not associated with check %s',

  message: function() {
    return sprintf.apply(null, arguments);
  }

};
<commit_msg>quote var in this message<commit_after>/*
 * Copyright 2011 Joyent, Inc.  All rights reserved.
 *
 * Amon common string messages. Could be useful for l10n.
 *
 * Usage:
 *    var Messages = require('amon-common').Messages;
 *
 *    // Rendering a standard message.
 *    var m = Messages.message(Messages.MissingParameter, "foo");
 *
 *    // Rendering a custom message.
 *    var m = Messages.message("arg %s for zone %s is bogus: %o",
 *                             argName, zone, errObject);
 */

var sprintf = require('sprintf').sprintf;

module.exports = {

  // Standard Amon messages.
  CustomerInvalidForCheck: 'customer %s is not associated with check %s',
  InvalidConfig: 'config is invalid: %s',
  InvalidMetric: 'metrics must contain an object with name, type and value',
  InvalidStatus: 'status must be one of: %s',
  InvalidUrn: 'urn %s is not a known check urn.',
  MissingParameter: '"%s" is a required parameter',
  UnknownCheck: '%s is not a registered check',
  ZoneInvalidForCheck: 'zone %s is not associated with check %s',

  message: function() {
    return sprintf.apply(null, arguments);
  }

};

{'fraction_non_alphanumeric': 0.12007168458781362, 'fraction_numerical': 0.005376344086021506, 'mean_word_length': 3.2533333333333334, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2934446', 'n_tokens_mistral': 675, 'n_tokens_neox': 658, 'n_words': 246}