GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [core] Shortnames parameter does not work with Ant · Issue #2062 · pmd/pmd

[core] Shortnames parameter does not work with Ant #2062

New issue
Copy link
New issue
Copy link
Closed
#2100
Closed
[core] Shortnames parameter does not work with Ant#2062
#2100
Copy link
Assignees
adangel
Labels
a:bugPMD crashes or fails to analyse a file.
Milestone
6.20.0

Description

@mriddell95
mriddell95
opened on Oct 10, 2019
Issue body actions

Affects PMD Version:
6.18.0

Rule:
N/A

Description:
I previously was able to run the short-names parameter in my ant buildscript and it would output in the report with the relative path. In 6.18.0 it appears that shortnames has stopped working with Ant. The short-names parameter does work with the PMD CLI however.

Code Sample demonstrating the issue:

<target name="pmd">
        <taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask">
            <classpath>
                <fileset dir="${pmdLibFolder}">
                    <include name="*.jar"/>
                </fileset>
            </classpath>
        </taskdef>
        <pmd shortFilenames="true" cacheLocation="pmd.cache">
            <formatter type="xml" toFile="pmd_report.xml" toConsole="true"/>
            <ruleset>ruleset.xml</ruleset>
            <fileset dir="${src}">
                <include name="**/Application.java"/>
            </fileset>
        </pmd>
    </target>

Running PMD through: [CLI | Ant | Maven | Gradle | Designer | Other]
Ant

Activity

  1. adangel commented on Oct 16, 2019

    @adangel
    adangel
    on Oct 16, 2019
    Member
    More actions

    Seems to be a regression of #1923

    The parameter has moved to the renderers, since shortnames is just relevant for the renderers. But the renderers in the ant task are created in a different way than the renderers created by the cli. So the renderers in the ant task know nothing about shortnames and the directory prefix, that should be removed.

    There is also no unit test for this feature used via a ant task.

  2. adangel
    added
    a:bugPMD crashes or fails to analyse a file.
    on Oct 16, 2019
  3. adangel
    added this to the 6.20.0 milestone on Oct 29, 2019
  4. adangel
    self-assigned this
    on Nov 8, 2019
  5. adangel
    changed the title [-][core] Shortnames parameter does not work with Ant buildscript[/-] [+][core] Shortnames parameter does not work with Ant[/+] on Nov 8, 2019
  6. adangel
    added a commit that references this issue on Nov 8, 2019

    [core] Shortnames parameter does not work with Ant

    This issue will close once commit 2541e22 is merged into the 'main' branch.
    2541e22
  7. adangel
    added
    has:pr
    on Nov 8, 2019
  8. adangel
    closed this as completedin 2541e22on Nov 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @adangel
    adangel

Labels

a:bugPMD crashes or fails to analyse a file.

Type

No type

Projects

No projects

    Milestone

    • 6.20.0

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.