<commit_before>/**
 *
 * FaZend.com, Fully Automated Zend Framework
 * RQDQL.com, Requirements Definition and Query Language
 *
 * Redistribution and use in source and binary forms, with or 
 * without modification, are PROHIBITED without prior written 
 * permission from the author. This product may NOT be used 
 * anywhere and on any computer except the server platform of 
 * FaZend.com. located at www.fazend.com. If you received this 
 * code occasionally and without intent to use it, please report 
 * this incident to the author by email: <EMAIL>
 *
 * @author <NAME> <<EMAIL>>
 * @copyright Copyright (c) rqdql.com, 2010
 * @version $Id: rqdql.cpp 1746 2010-05-04 11:47:08Z <EMAIL> $
 */

#include <stdarg.h>
#include <unistd.h>
#include <iostream>
#include "rqdql.h"
#include "Scanner.h"
#include "Logger.h"

rqdql::LogLevel rqdql::level = L_ERROR;

/**
 * Main method in the product
 */
int main(int argc, char** argv) {
    using namespace std;

    char c;
    while ((c = getopt(argc, argv, "v")) != -1) {
        switch (c) {
            case 'v':
                cout << RQDQL_VERSION << endl;
                return 0;
            case '?':
                cout << 
                "usage: rqdql [-?v]" << endl <<
                "Options:" << endl <<
                "  -?    Shows this help message" << endl <<
                "  -v    Returns current version of the product" << endl <<
                "Report bugs to <<EMAIL>>" << endl
                ;
                return 0;
            default:
                cout << "unknown option" << endl;
                return -1;
        }
    }
    
    string text;
    while (!cin.eof()) {
        string s;
        getline(cin, s);
        text = text + s + "\n";
    }
    rqdql::Scanner::getInstance().scan(text);

    // everything OK?
    if (rqdql::Logger::getInstance().empty()) {
        return 0;
    }
    
    // no, we should display all errors found
    cout << rqdql::Logger::getInstance().getReport() << endl;
    return -1;
}<commit_msg>fixed CLI processing<commit_after>/**
 *
 * FaZend.com, Fully Automated Zend Framework
 * RQDQL.com, Requirements Definition and Query Language
 *
 * Redistribution and use in source and binary forms, with or 
 * without modification, are PROHIBITED without prior written 
 * permission from the author. This product may NOT be used 
 * anywhere and on any computer except the server platform of 
 * FaZend.com. located at www.fazend.com. If you received this 
 * code occasionally and without intent to use it, please report 
 * this incident to the author by email: <EMAIL>
 *
 * @author <NAME> <<EMAIL>>
 * @copyright Copyright (c) rqdql.com, 2010
 * @version $Id: rqdql.cpp 1746 2010-05-04 11:47:08Z <EMAIL> $
 */

#include <stdarg.h>
#include <unistd.h>
#include <iostream>
#include "rqdql.h"
#include "Scanner.h"
#include "Logger.h"

rqdql::LogLevel rqdql::level = L_ERROR;

/**
 * Main method in the product
 */
int main(int argc, char** argv) {
    using namespace std;

    char c;
    while ((c = getopt(argc, argv, "v")) != -1) {
        switch (c) {
            case 'v':
                cout << RQDQL_VERSION << endl;
                return 0;
            case '?':
                cout << 
                "usage: rqdql [-?v]" << endl <<
                "Options:" << endl <<
                "  -?    Shows this help message" << endl <<
                "  -v    Returns current version of the product" << endl <<
                "Report bugs to <<EMAIL>>" << endl
                ;
                return 0;
            default:
                cout << "unknown option" << endl;
                return -1;
        }
    }
    
    string text;
    while (!cin.eof()) {
        string s;
        getline(cin, s);
        text = text + s + "\n";
    }
    rqdql::Scanner::getInstance().scan(text);
    proxy::Proxy::getInstance().inject();

    // everything OK?
    if (rqdql::Logger::getInstance().empty()) {
        return 0;
    }
    
    // no, we should display all errors found
    cout << rqdql::Logger::getInstance().getReport() << endl;
    return -1;
}
{'fraction_non_alphanumeric': 0.12966122349500367, 'fraction_numerical': 0.013648549841579332, 'mean_word_length': 2.019867549668874, 'pattern_counts': {'":': 0, '<': 87, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '92839', 'n_tokens_mistral': 1326, 'n_tokens_neox': 1231, 'n_words': 405}