Exemple #1
0
def loc():
    """
    Run phploc on the project
    """
    if (pear.pear_detect('phploc')):
        local('phploc --exclude app/cache,app/logs/vendor')
    else:
        print(red('The PEAR package phploc is not installed.', True) + '\nInstall it as follows (first command as root)\n  pear config-set auto_discover 1\n  pear install pear.phpunit.de/phploc')
Exemple #2
0
def messdetector():
    """
    Run messdetector on the project
    """
    if (pear.pear_detect('PHP_PMD')):
        with settings(warn_only=True):
            result = local('phpmd . html codesize,unusedcode,design --reportfile ../messdetector.html --exclude app/cache,app/logs,vendor', capture=True)
        if result.return_code == 0 or result.return_code == 2:
            local('open ../messdetector.html');
        else:
            abort(result)
    else:
        print(red('The PEAR package PHP_PMD is not installed.', True) + '\nInstall it as follows (first command as root)\n  pear config-set auto_discover 1\n  pear install pear.phpunit.de/PHP_PMD')