IDEA: check for misspellings other than wrong capitalization
349690
private boolean isFixtureMethod(MethodNode method) {
    String name = method.getName();

    for (String fmName : FIXTURE_METHODS) {
      if (!fmName.equalsIgnoreCase(name)) continue;

      // assertion: is (meant to be) a fixture method, so we'll return true in the end

      if (method.isStatic())
        errorReporter.error(method, "Fixture methods must not be static");
      if (!fmName.equals(name))
        errorReporter.error(method, "Misspelled '%s()' method (wrong capitalization)", fmName);

      return true;
    }

    return false;
  }
412948
function spellingFix(content, fontType){
  if (!content) {
    if (!globalOptions.isSilentMode()) console.warn('Content must be specified on knayi.spellingFix.');
    return '';
  }

	if (content === '' || !mmCharacterRange.test(content))
		return content;

	if (!fontType)
		fontType = fontDetect(content);

	content = content.trim().replace(/\u200B/g, '');

	switch (fontType) {
		case 'zawgyi':
			for (var i = 0; i < library.spellingFix.zawgyi.length; i++) {
				var rule = library.spellingFix.zawgyi[i];
				content = content.replace(rule[0], rule[1]);
			}
			return content;
		case 'unicode':
		default:
			for (var i = 0; i < library.spellingFix.unicode.length; i++) {
				var rule = library.spellingFix.unicode[i];
				content = content.replace(rule[0], rule[1]);
			}
			return content;
	}
}
261714
function getCorrection(words, match) {
	for (const word of words) {
		const pattern = getPattern(word);
		if (!getRegExp([pattern]).test(match)) {
			continue;
		}

		const corrected = match.replace(new RegExp(`\\b${pattern}`, 'i'), word);
		return matchCasing(corrected, match);
	}

	return false;
}
687898
def _error_check(err, prefix=""):
    """"""
    if err != 0:
        err_str = _snd.sf_error_number(err)
        raise RuntimeError(prefix + _ffi.string(err_str).decode('utf-8', 'replace'))
711988
def correct(self):
    
    # regex matches: contraction or word or punctuation or whitespace
    tokens = nltk.tokenize.regexp_tokenize(self.raw, "\w*('\w*)+|\w+|[^\w\s]|\s")
    corrected = (Word(w).correct() for w in tokens)
    ret = ''.join(corrected)
    return self.__class__(ret)
1360116
def _downcase_word(text, pos):
    """"""
    text, new_pos = _forward_word(text, pos)
    return text[:pos] + text[pos:new_pos].lower() + text[new_pos:], new_pos
1348308
def _normalize_words(words, acronyms):
    """"""
    for i, _ in enumerate(words):
        # if detect_acronyms:
        if words[i].upper() in acronyms:
            # Convert known acronyms to upper-case.
            words[i] = words[i].upper()
        else:
            # Fallback behavior: Preserve case on upper-case words.
            if not words[i].isupper():
                words[i] = words[i].capitalize()
    return words
671799
def correct_entry(self, entry):
        
        entry.correction.update(self.get_correction(entry))
        return entry
696154
def check_sentence_spacing(text):
    """"""
    err = "typography.symbols.sentence_spacing"
    msg = u"More than two spaces after the period; use 1 or 2."
    regex = "\. {3}"

    return existence_check(
        text, [regex], err, msg, max_errors=3, require_padding=False)
1255728
def capitalize_word(event):
    
    buff = event.current_buffer

    for i in range(event.arg):
        pos = buff.document.find_next_word_ending()
        words = buff.document.text_after_cursor[:pos]
        buff.insert_text(words.title(), overwrite=True)
568959
def contains_case_insensitive(adict, akey):
    """"""
    for key in adict:
        if key.lower() == akey.lower():
            return True
    return False
1182169
def correction(sentence, pos):
    ""
    word = sentence[pos]
    cands = candidates(word)
    if not cands:
        cands = candidates(word, False)
    if not cands:
        return word
    cands = sorted(cands, key=lambda w: P(w, sentence, pos), reverse=True)
    cands = [c[0] for c in cands]
    return cands
960536
def check(text):
    """"""
    err = "hedging.misc"
    msg = "Hedging. Just say it."

    narcissism = [
        "I would argue that",
        ", so to speak",
        "to a certain degree",
    ]

    return existence_check(text, narcissism, err, msg)
1350072
def text_has_been_edited(self, text):
        """"""
        self.find(changed=True, forward=True, start_highlight_timer=True)
594434
def capitalize_keys(suspect):
    
    if not isinstance(suspect, dict):
        raise TypeError('you must pass a dict.')

    converted = {}

    for key in list(suspect):
        if not isinstance(key, six.string_types):
            continue

        if key[0].isupper():
            continue

        if '_' in key:
            new_key = ''.join([chunk.capitalize() for index, chunk in enumerate(key.split('_'))])
        else:
            new_key = key.capitalize()

        value = suspect.get(key)
        if type(value) is dict:
            converted[new_key] = capitalize_keys(value)
        elif type(value) is list:
            converted[new_key] = [capitalize_keys(x) if isinstance(x, dict) else x for x in value]
        else:
            converted[new_key] = value

    return converted
233571
def spell_check_no_pipeline(self, sources, options, personal_dict):
        """"""

        for source in sources:
            if source._has_error():  # pragma: no cover
                yield Results([], source.context, source.category, source.error)

            cmd = self.setup_command(source.encoding, options, personal_dict, source.context)
            self.log('', 3)
            self.log("Command: " + str(cmd), 4)
            try:
                wordlist = util.call_spellchecker(cmd, input_text=None, encoding=source.encoding)
                yield Results(
                    [w for w in sorted(set(wordlist.replace('\r', '').split('\n'))) if w],
                    source.context,
                    source.category
                )
            except Exception as e:  # pragma: no cover
                err = self.get_error(e)
                yield Results([], source.context, source.category, err)
35014
def check_capitalized(self, function, docstring):
        
        if docstring:
            first_word = ast.literal_eval(docstring).split()[0]
            if first_word == first_word.upper():
                return
            for char in first_word:
                if char not in string.ascii_letters and char != "'":
                    return
            if first_word != first_word.capitalize():
                return violations.D403(first_word.capitalize(), first_word)