Package org.machanism.machai.gw.reviewer
Class HtmlReviewer
java.lang.Object
org.machanism.machai.gw.reviewer.HtmlReviewer
- All Implemented Interfaces:
Reviewer
Reviewer implementation for HTML and XML files (.html, .htm, .xml).
Guidance is expected to appear in an HTML/XML comment block (for example
<!-- @guidance ... -->).
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
HtmlReviewer
public HtmlReviewer()
-
-
Method Details
-
getSupportedFileExtensions
Returns the file extensions supported by this reviewer.- Specified by:
getSupportedFileExtensionsin interfaceReviewer- Returns:
- an array containing
"html","htm", and"xml"
-
perform
Reviews the given file and returns a formatted prompt fragment when guidance is present.- Specified by:
performin interfaceReviewer- Parameters:
projectDir- the project root directory used to compute a project-relative path for contextguidancesFile- the HTML/XML file to analyze- Returns:
- a formatted prompt fragment, or
nullwhen the file does not contain guidance - Throws:
IOException- if an error occurs while reading the file
-