Package com.lewisd.maven.lint

Examples of com.lewisd.maven.lint.Violation


  }

  @Override
  public void marshal(Object source, HierarchicalStreamWriter writer,
      MarshallingContext context) {
    Violation violation = (Violation) source;
   
    writer.startNode("violation");
   
    writer.addAttribute("rule", violation.getRule().getIdentifier());
   
    writer.startNode("message");
    writer.setValue(violation.getMessage());
    writer.endNode();
   
    writer.startNode("description");
    writer.setValue(violation.getRule().getDescription());
    writer.endNode();
   
    final InputLocation location = violation.getInputLocation();
   
    writer.startNode("location");
    writer.addAttribute("file", location.getSource().getLocation());
    writer.addAttribute("line", Integer.toString(location.getLineNumber()));
    writer.addAttribute("column", Integer.toString(location.getColumnNumber()));
View Full Code Here

TOP

Related Classes of com.lewisd.maven.lint.Violation

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.