apache / apache/maven-checkstyle-plugin

[MCHECKSTYLE-342] Support XML 1.1

Open
#254 7 comments 0 reactions 0 assignees View on GitHub
enhancement priority:minor
Dominant language
Java
Stars
97
Forks
67
Avg merge
14h 50m
Merged PRs (30d)
6

Description

**[richard](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=rveach)** opened **[MCHECKSTYLE-342](https://issues.apache.org/jira/browse/MCHECKSTYLE-342?redirect=false)** and commented

Checkstyle wishes to upgrade our XML logger to print out XML 1.1 documents. We need this functionality to support escaping non-printable characters as XML 1.0 doesn't allow this and considers it an invalid document.

> Exception in thread "main" javax.xml.stream.XMLStreamException: ParseError at [row,col]:[45615,80]
> Message: An invalid XML character (Unicode: 0x2) was found in the value of attribute "message" and element is "error".

Checkstyle cannot upgrade until maven-checkstyle does as we use it in alot of regression testing. If we try to give the plugin an XML 1.1 document, it fails with the following error:

> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:2.17:check (default-cli) on project postgresql: Unable to read Checkstyle results xml: /pipeline/source/pgjdbc/pgjdbc/target/checkstyle-result.xml: only 1.0 is supported as [Help 1]

---

**Affects:** 2.17

0 votes, 5 watchers

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue names no source files, tests, or entry points. Start by locating the code that reads Checkstyle result XML, then verify how it handles an XML 1.1 declaration and non-printable characters; done means XML 1.1 Checkstyle output is accepted without the reported parsing failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.