Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-30427

Jenkins checkstyle plugin command line and phpcs command line don't return the same number of issues

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Minor Minor
    • checkstyle-plugin
    • None
    • Jenkins ver. 1.628
      Checkstyle plugin 3.43

      Hello guys,
      i'm using since few days checkstyle plugin (last version : 3.43).
      The checkstyle's reports works great for my projects but when i launch phpcs with exactly the same command line w/o jenkins, i don't find the same number of issue and the severity are not the same at all.

      Here an exemple :

      Build.xml

      <target name="phpcs-ci"
                  unless="phpcs.done"
                  depends="prepare"
                  description="Find coding standard violations using PHP_CodeSniffer and log result in XML format. Intended for usage within a continuous integration environment.">
              <exec executable="phpcs" taskname="phpcs">
                  <arg value="--report=checkstyle" />
                  <arg value="--report-file=${basedir}/build/logs/checkstyle.xml" />
                  <arg value="--standard=${basedir}/build/phpcs.xml" />
                  <arg value="--extensions=php" />
                  <arg value="--severity=5" />
                  <arg path="${basedir}/php/application" />
                  <arg path="${basedir}/php/models" />
              </exec>
      

      I try also this way to be sure :

      <target name="phpcs-ci"
                  unless="phpcs.done"
                  depends="prepare"
                  description="Find coding standard violations using PHP_CodeSniffer and log result in XML format. Intended for usage within a continuous integration environment.">
              <exec executable="phpcs" taskname="phpcs">
                  <arg line="${basedir}/php/application ${basedir}/php/models --report=checkstyle --report-checkstyle=${basedir}/build/logs/checkstyle.xml --standard=${basedir}/build/phpcs.xml -extensions=php --severity=5 />
              </exec>
      

      But under jenkins i have : 886 errors reporting (88 high, 798 normal, 0 low)
      and with directly the command line without jenkins, i have : A TOTAL OF 440 ERRORS AND 798 WARNINGS WERE FOUND IN 417 FILES

      I don't understand why there are such differences.
      Could you help me please ?

      Thank you.
      Best regards

            drulli Ulli Hafner
            phenix Em Phenix
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: