Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XML output error #331

Closed
juli1 opened this issue Mar 7, 2020 · 6 comments
Closed

XML output error #331

juli1 opened this issue Mar 7, 2020 · 6 comments

Comments

@juli1
Copy link

juli1 commented Mar 7, 2020

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

@kucherenko
Copy link
Owner

thank you for the bug report, will fix it

@kucherenko
Copy link
Owner

my output is

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

do you have the same?

@juli1
Copy link
Author

juli1 commented Mar 8, 2020

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
Copy link
Author

juli1 commented Mar 8, 2020

I retried with version 2.0.16 and got the same results.

For information, I am running node 10.19.0.

@kucherenko
Copy link
Owner

fixed at jscpd@3.0.0

@juli1
Copy link
Author

juli1 commented Mar 8, 2020

Thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants