<commit_before><?php

namespace SimplyTestable\WorkerBundle\Tests\Command\Task\Perform\JsStaticAnalysis;

use SimplyTestable\WorkerBundle\Tests\Command\ConsoleCommandBaseTestCase;

class JsLintOptionsTest extends ConsoleCommandBaseTestCase {
    
    const NON_FILTERED_ERROR_COUNT = 6;
    
    public static function setUpBeforeClass() {
        self::setupDatabaseIfNotExists();        
    }    
    
/**
 * {"jslint-option-passfail":"0","jslint-option-bitwise":"1","jslint-option-continue":"1","jslint-option-debug":"1","jslint-option-evil":"1","jslint-option-eqeq":"1","jslint-option-es5":"0","jslint-option-forin":"1","jslint-option-newcap":"1","jslint-option-nomen":"1","jslint-option-plusplus":"1","jslint-option-regexp":"1","jslint-option-undef":"1","jslint-option-unparam":"1","jslint-option-sloppy":"1","jslint-option-stupid":"1","jslint-option-sub":"1","jslint-option-vars":"1","jslint-option-white":"1","jslint-option-anon":"1","jslint-option-browser":"1","jslint-option-devel":"0","jslint-option-windows":"0","jslint-option-maxerr":"50","jslint-option-indent":"4","jslint-option-maxlen":"256","jslint-option-predef":[""]}
 * {"jslint-option-continue":"1","jslint-option-debug":"1","jslint-option-evil":"1","jslint-option-eqeq":"1","jslint-option-es5":"0","jslint-option-forin":"1","jslint-option-newcap":"1","jslint-option-nomen":"1","jslint-option-plusplus":"1","jslint-option-regexp":"1","jslint-option-undef":"1","jslint-option-unparam":"1","jslint-option-sloppy":"1","jslint-option-stupid":"1","jslint-option-sub":"1","jslint-option-vars":"1","jslint-option-white":"1","jslint-option-anon":"1","jslint-option-browser":"1","jslint-option-devel":"0","jslint-option-windows":"0","jslint-option-maxerr":"50","jslint-option-indent":"4","jslint-option-maxlen":"256","jslint-option-predef":[""]}
 * {"jslint-option-passfail":"0"}
 * {"jslint-option-bitwise":"0"}
 */    
    
    
    /**
     * @group standard
     */    
    public function testPassFailOff() {        
        $this->clearMemcacheHttpCache();  
        $this->setHttpFixtures($this->getHttpFixtures($this->getFixturesDataPath()));
        
        $taskObject = $this->createTask('http://example.com/', 'JS static analysis', '{"jslint-option-passfail":"0"}');
        
        $task = $this->getTaskService()->getById($taskObject->id);
        <commit_msg>Understand jslint boolean directives<commit_after><?php

namespace SimplyTestable\WorkerBundle\Tests\Command\Task\Perform\JsStaticAnalysis;

use SimplyTestable\WorkerBundle\Tests\Command\ConsoleCommandBaseTestCase;

class JsLintOptionsTest extends ConsoleCommandBaseTestCase {
    
    const NON_FILTERED_ERROR_COUNT = 6;
    
    public static function setUpBeforeClass() {
        self::setupDatabaseIfNotExists();        
    }    
    
/**
 * {"jslint-option-passfail":"0","jslint-option-bitwise":"1","jslint-option-continue":"1","jslint-option-debug":"1","jslint-option-evil":"1","jslint-option-eqeq":"1","jslint-option-es5":"0","jslint-option-forin":"1","jslint-option-newcap":"1","jslint-option-nomen":"1","jslint-option-plusplus":"1","jslint-option-regexp":"1","jslint-option-undef":"1","jslint-option-unparam":"1","jslint-option-sloppy":"1","jslint-option-stupid":"1","jslint-option-sub":"1","jslint-option-vars":"1","jslint-option-white":"1","jslint-option-anon":"1","jslint-option-browser":"1","jslint-option-devel":"0","jslint-option-windows":"0","jslint-option-maxerr":"50","jslint-option-indent":"4","jslint-option-maxlen":"256","jslint-option-predef":[""]}
 * {"jslint-option-continue":"1","jslint-option-debug":"1","jslint-option-evil":"1","jslint-option-eqeq":"1","jslint-option-es5":"0","jslint-option-forin":"1","jslint-option-newcap":"1","jslint-option-nomen":"1","jslint-option-plusplus":"1","jslint-option-regexp":"1","jslint-option-undef":"1","jslint-option-unparam":"1","jslint-option-sloppy":"1","jslint-option-stupid":"1","jslint-option-sub":"1","jslint-option-vars":"1","jslint-option-white":"1","jslint-option-anon":"1","jslint-option-browser":"1","jslint-option-devel":"0","jslint-option-windows":"0","jslint-option-maxerr":"50","jslint-option-indent":"4","jslint-option-maxlen":"256","jslint-option-predef":[""]}
 * {"jslint-option-passfail":"0"}
 * {"jslint-option-bitwise":"0"}
 * {"jslint-option-continue":"0"}
 */    
    
    
    /**
     * @group standard
     */    
    public function testPassFailOff() {        
        $this->clearMemcacheHttpCache();  
        $this->setHttpFixtures($this->getHttpFixtures($this->getFixturesDataPath()));
        
        $taskObject = $this->createTask('http://example.com/', 'JS static analysis', '{"jslint-option-passfail":"0"}');
        
        $task = $this->getTaskService()->getById($taskObject->id);
        
{'fraction_non_alphanumeric': 0.23663638284386224, 'fraction_numerical': 0.02641031058525248, 'mean_word_length': 5.733997155049787, 'pattern_counts': {'":': 111, '<': 5, '<?xml version=': 0, '>': 19, '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': '5049014', 'n_tokens_mistral': 1709, 'n_tokens_neox': 1677, 'n_words': 76}