improve jtidy javadocs check [LUCENE-4505]
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 1.4k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 88
Description
Currently we are using the ant task (http://sourceforge.net/p/jtidy/code/1261/tree/trunk/jtidy/src/main/java/org/w3c/tidy/ant/JTidyTask.java) built into jtidy itself.
This has a number of disadvantages:
- at least in the version we are using, creates a ByteArrayDataOutput that hides all the output. So if there is an error, its no good.
- requires creation of a temp directory: even though we disable the actual output with a parameter, this means it creates thousands of 0 byte files
We only pass 3 options to tidy today:
- input-encoding=UTF-8
- only-errors=true
- show-warnings=false <-- this one is a OOM hack.
Ideally i think we would:
- pass input-encoding=UTF-8, only-errors=true, quiet=true.
- send all output to a single file or property.
- if this contains any contents, fail and print the contents.
This would mean we would fail on warnings too (I checked, this is a good thing, there would be some things to fix).
So as a start we could just set show-warnings=false temporarily so we only fail on errors like today.
---
Migrated from [LUCENE-4505](https://issues.apache.org/jira/browse/LUCENE-4505) by Robert Muir (@rmuir)
Contributor guide
Research direction
Start by locating the build configuration that invokes jtidy's JTidyTask and review how its output and temporary directory are handled. Check whether the task can write diagnostics to one file or property, then verify that errors cause the javadocs check to fail without producing thousands of empty files.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100