| Summary: | [CSS] CSS Validator has incorrect problem ranges | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Curtis Windatt <curtis.windatt.public> |
| Component: | Client | Assignee: | Curtis Windatt <curtis.windatt.public> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 8.0 | ||
| Target Milestone: | 8.0 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
This is a known problem with CSS Lint. http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=05756a7e79ea6f9806f30f9f8cac99d87be3212e I added a token finder function to the validator. I also fixed up all of our quickfixes and the tests as well to handle the new ranges. For parsing errors we select the whole line. |
This likely applies to many rules, but take zero-units: rule { border : 0px; } Here csslint reports back the correct line (2) and col (11) for the start of the problem. However, it does not provide an end or length. So instead we use the evidence string length. However, sometimes, such as in this example, the evidence string contains content from before the start location (in this case it returns the entire line). This means that the annotation will be marked past where it should stop, likely to the end of the line. It also means that finding the problem for testing is difficult.