parserTest.py
def metricThree(contents):
    """Percentage of camelcase identifiers in code"""
    contents = removeComments(contents)
    contents = removeEmptyLine(contents)
    contents = pragmaRemover(contents)
    contents = libraryRemover(contents)
    
    contents = codeToArray(contents)
    wordBank = []
    for line in contents:
        parseLine = wordsFromLine(line)
        #print(parseLine)
        processLine = splitLine(parseLine)
        for word in processLine:
            wordBank.append(word)
    
    wordBankFiltered = solKeywordFilter(wordBank)

    camelCaseBank, nonCamelCaseBank = camelCase(wordBankFiltered)
    totalWordCount = len(wordBankFiltered)
    camelCount = len(camelCaseBank)
    percentageCamel = camelCount/totalWordCount
    return percentageCamel
Percentage of camelcase identifiers in code
Percentage of camelcase identifiers in code
Percentage of camelcase identifiers in code
def metricThree(contents):
    contents = removeComments(contents)
    contents = removeEmptyLine(contents)
    contents = pragmaRemover(contents)
    contents = libraryRemover(contents)
    contents = codeToArray(contents)
    wordBank = []
    for line in contents:
        parseLine = wordsFromLine(line)
        processLine = splitLine(parseLine)
        for word in processLine:
            wordBank.append(word)
    wordBankFiltered = solKeywordFilter(wordBank)
    camelCaseBank, nonCamelCaseBank = camelCase(wordBankFiltered)
    totalWordCount = len(wordBankFiltered)
    camelCount = len(camelCaseBank)
    percentageCamel = camelCount/totalWordCount
    return percentageCamel
def metricThree ( contents ) : contents = removeComments ( contents ) contents = removeEmptyLine ( contents ) contents = pragmaRemover ( contents ) contents = libraryRemover ( contents ) contents = codeToArray ( contents ) wordBank = [ ] for line in contents : parseLine = wordsFromLine ( line ) processLine = splitLine ( parseLine ) for word in processLine : wordBank . append ( word ) wordBankFiltered = solKeywordFilter ( wordBank ) camelCaseBank , nonCamelCaseBank = camelCase ( wordBankFiltered ) totalWordCount = len ( wordBankFiltered ) camelCount = len ( camelCaseBank ) percentageCamel = camelCount / totalWordCount return percentageCamel
Percentage of camelcase identifiers in code
Percentage of camelcase identifiers in code
"""Percentage of camelcase identifiers in code""" #print(parseLine)

contents