Skip to content

XML output error #331

Closed
Closed
@juli1

Description

@juli1

Describe the bug
When the code contains special character, it can affect the XML output

To Reproduce

  1. Clone https://github.com/HariSekhon/Nagios-Plugins
  2. Run jscpd jscpd -o toto --min-lines 15 --reporters xml Nagios-Plugins
  3. Lint the XML file xmllint toto/jscpd_report.xml

Expected behavior

The output from JSCPD should pass

Desktop (please complete the following information):
Current jscpd version 2.0.15

Activity

kucherenko

kucherenko commented on Mar 8, 2020

@kucherenko
Owner

thank you for the bug report, will fix it

kucherenko

kucherenko commented on Mar 8, 2020

@kucherenko
Owner

my output is

$ xmllint jscpd-report.xml
<?xml version="1.0" encoding="UTF-8"?>
<pmd-cpd/>

do you have the same?

juli1

juli1 commented on Mar 8, 2020

@juli1
Author

Not at all - I got a 2Mb file.

ls -lh toto/jscpd-report.xml                                                                                                                                                                          08:04:19
-rw-rw-r-- 1 julien julien 2.1M Mar  8 08:04 toto/jscpd-report.xml
juli1

juli1 commented on Mar 8, 2020

@juli1
Author

I retried with version 2.0.16 and got the same results.

For information, I am running node 10.19.0.

kucherenko

kucherenko commented on Mar 8, 2020

@kucherenko
Owner

fixed at jscpd@3.0.0

juli1

juli1 commented on Mar 8, 2020

@juli1
Author

Thank you so much!

added a commit that references this issue on Jun 17, 2025
5643092
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @kucherenko@juli1

        Issue actions

          XML output error · Issue #331 · kucherenko/jscpd