eslint: Illegal XML characters output in checkstyle format

Jenkins checkstyle complains that character reference “&#26” is an invalid XML character. Online XML validator http://www.xmlvalidation.com/index.php?id=1&L=0 confirms.

<error line="1" column="1" severity="error" message="Parsing error: Unexpected character &apos;&#65533;&apos;&#10;&#10;&gt; 1 | &#65533;PNG&#10;    | ^&#10;  2 | &#26;&#10;  3 | &#0;&#0;&#0;&#10;  4 | IHDR&#0;&#0;&#0;F&#0;&#0;&#0;F&#8;&#6;&#0;&#0;&#0;q.&#65533;&#65533;&#0;&#0;&#0;&#4;gAMA&#0;&#0;&#65533;&#65533;&#11;&#65533;a&#5;&#0;&#0;&#0;&#9;pHYs&#0;&#0;&#14;&#65533;&#0;&#0;&#14;&#65533;&#1;&#65533;&#65533;k&#65533;&#0;&#0;&#0;&#25;tEXtSoftware&#0;Paint.NET v3.5.5I&#65533;&#65533;&#65533;&#0;&#0;" source="" /></file>

Environment

  • ESLint Version: 3.12.0
  • Node Version: 6.9.1
  • npm Version: 4.0.2
  • OS Version: Windows 10 x64

Using parser babel-eslint

{ “extends”: “airbnb”, “parser”: “babel-eslint” }

On executiong: "node ./node_modules/eslint/bin/eslint.js -f checkstyle -o lint-report.xml src/**/*

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 19 (11 by maintainers)

Most upvoted comments

Oh, forgot to respond to @platinumazure, using the -o option and not using Ant’s output results in the same issue. The invalid characters are from it trying to convert the garbage characters in the image to XML.

@not-an-aardvark thanks for that clarification. That explains the issue. 👍