<commit_before><?xml version="1.0" encoding="UTF-8"?>
<!--
Quality Metrics related targets for GreenCape build environment

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.

The "GNU General Public License" (GPL) is available at
http://www.gnu.org/licenses/old-licenses/gpl-2.0.html

@package    BuildEnvironment
@author     <NAME> <<EMAIL>>
@copyright  Copyright (C) 2013-15 BSDS Braczek Software- und DatenSysteme. All rights reserved.
-->
<project name="Quality Metrics Related Targets" default="quality">

    <target name="quality" description="Generates a quality report using CodeBrowser.">
        <!-- parallel -->
        <phingcall target="quality-depend"/>
        <phingcall target="quality-mess-detect"/>
        <phingcall target="quality-copy-paste-detect"/>
        <phingcall target="quality-check-style"/>
        <!-- /parallel -->
        <phingcall target="quality-code-browser"/>
    </target>

    <target name="quality-code-browser" description="Aggregates the results from all the measurement tools.">
        <mkdir dir="${build}/report/code-browser"/>
        <!-- CodeBrowser has an old bug regarding crapThreshold, so remove all crap-values below 10 -->
        <reflexive>
            <fileset dir="${build}/logs">
                <include name="clover.xml"/>
            </fileset>
            <filterchain>
                <replaceregexp>
                    <regexp pattern='crap="\d"' replace=""/>
                </replaceregexp>
            </filterchain>
        </reflexive>
        <exec executable="${build}/vendor/bin/phpcb" dir="${project.basedir}" passthru="true">
            <arg line="--log=${build}/logs"/>
            <arg line="--output=${build}/report/code-browser"/>
            <arg line="--crapThreshold=10"/>
        </exec>
    </target>

    <target name="quality-depend" description="Generates depend.xml and software metrics charts using PHP Depend.">
        <mkdir dir="${build}/logs/charts"/>
        <phpdepend>
            <fileset refid="php-files"/>
            <logger type="jdepend-xml" outfile="${build}/logs/depend.xml"/>
            <logger type="jdepend-chart" outfile="${build}/logs/charts/dependencies.svg"/>
            <logger type="overview-pyramid" outfile="${build}/logs/charts/overview-pyramid.svg"/>
            <logger type="summary-xml" outfile="${build}/logs/summary.xml"/>
        </phpdepend>
    </target>

    <target name="quality-mess-detect" description="Generates pmd.xml using PHP MessDetector.">
        <phpmd rulesets="${build}/config/phpmd.xml">
            <fileset refid="php-files"/>
            <formatter type="xml" outfile="${build}/logs/pmd.xml"/>
            <formatter type="html" outfile="${build}/report/mess.html"/>
        </phpmd>
    </target>

    <target name="quality-copy-paste-detect" description="Generates pmd-cpd.xml using PHP CopyPasteDetector.">
        <phpcpd>
            <fileset refid="php-files"/>
            <formatter type="pmd" outfile="${build}/logs/pmd-cpd.xml"/>
        </phpcpd>
    </target>

    <target name="quality-check-style" description="Generates checkstyle.xml using PHP CodeSniffer.">
        <phpcodesniffer standard="${build}/config/phpcs/Joomla" showSniffs="true" showWarnings="true">
            <fileset refid="php-files"/>
            <formatter type="checkstyle" outfile="${build}/logs/checkstyle.xml"/>
        </phpcodesniffer>
    </target>

</project><commit_msg>Removed HTML formatter for PHP MessDetector<commit_after><?xml version="1.0" encoding="UTF-8"?>
<!--
Quality Metrics related targets for GreenCape build environment

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.

The "GNU General Public License" (GPL) is available at
http://www.gnu.org/licenses/old-licenses/gpl-2.0.html

@package    BuildEnvironment
@author     <NAME> <<EMAIL>>
@copyright  Copyright (C) 2013-15 BSDS Braczek Software- und DatenSysteme. All rights reserved.
-->
<project name="Quality Metrics Related Targets" default="quality">

    <target name="quality" description="Generates a quality report using CodeBrowser.">
        <!-- parallel -->
        <phingcall target="quality-depend"/>
        <phingcall target="quality-mess-detect"/>
        <phingcall target="quality-copy-paste-detect"/>
        <phingcall target="quality-check-style"/>
        <!-- /parallel -->
        <phingcall target="quality-code-browser"/>
    </target>

    <target name="quality-code-browser" description="Aggregates the results from all the measurement tools.">
        <mkdir dir="${build}/report/code-browser"/>
        <reflexive>
            <fileset dir="${build}/logs">
                <include name="clover.xml"/>
            </fileset>
            <filterchain>
                <replaceregexp>
                    <!-- CodeBrowser has a bug regarding crapThreshold, so remove all crap-values below 10 (i.e., 1 digit) -->
                    <regexp pattern='crap="\d"' replace=""/>
                </replaceregexp>
            </filterchain>
        </reflexive>
        <exec executable="${build}/vendor/bin/phpcb" dir="${project.basedir}" passthru="true">
            <arg line="--log=${build}/logs"/>
            <arg line="--output=${build}/report/code-browser"/>
            <arg line="--crapThreshold=10"/>
        </exec>
    </target>

    <target name="quality-depend" description="Generates depend.xml and software metrics charts using PHP Depend.">
        <mkdir dir="${build}/logs/charts"/>
        <phpdepend>
            <fileset refid="php-files"/>
            <logger type="jdepend-xml" outfile="${build}/logs/depend.xml"/>
            <logger type="jdepend-chart" outfile="${build}/logs/charts/dependencies.svg"/>
            <logger type="overview-pyramid" outfile="${build}/logs/charts/overview-pyramid.svg"/>
            <logger type="summary-xml" outfile="${build}/logs/summary.xml"/>
        </phpdepend>
    </target>

    <target name="quality-mess-detect" description="Generates pmd.xml using PHP MessDetector.">
        <phpmd rulesets="${build}/config/phpmd.xml">
            <fileset refid="php-files"/>
            <formatter type="xml" outfile="${build}/logs/pmd.xml"/>
        </phpmd>
    </target>

    <target name="quality-copy-paste-detect" description="Generates pmd-cpd.xml using PHP CopyPasteDetector.">
        <phpcpd>
            <fileset refid="php-files"/>
            <formatter type="pmd" outfile="${build}/logs/pmd-cpd.xml"/>
        </phpcpd>
    </target>

    <target name="quality-check-style" description="Generates checkstyle.xml using PHP CodeSniffer.">
        <phpcodesniffer standard="${build}/config/phpcs/Joomla" showSniffs="true" showWarnings="true">
            <fileset refid="php-files"/>
            <formatter type="checkstyle" outfile="${build}/logs/checkstyle.xml"/>
        </phpcodesniffer>
    </target>

</project>
{'fraction_non_alphanumeric': 0.13935643564356437, 'fraction_numerical': 0.007549504950495049, 'mean_word_length': 2.8832292167227296, 'pattern_counts': {'":': 0, '<': 130, '<?xml version=': 2, '>': 130, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 30}, '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': '5359586', 'n_tokens_mistral': 2301, 'n_tokens_neox': 2192, 'n_words': 625}