Class BasicReviewer
java.lang.Object
org.machanism.machai.gw.reviewer.BasicReviewer
- All Implemented Interfaces:
Reviewer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ResourceBundleResource bundle containing prompt templates for reviewed files.private static final PatternMatches a VBA line comment carrying the guidance tag: ' GUIDANCE: text Rem GUIDANCE: text Also matches trailing comments after code (e.g. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
promptBundle
Resource bundle containing prompt templates for reviewed files. -
VBA_GUIDANCE_PATTERN
Matches a VBA line comment carrying the guidance tag: ' GUIDANCE: text Rem GUIDANCE: text Also matches trailing comments after code (e.g.x = 1 ' GUIDANCE: text), but only when the apostrophe is not inside a string literal.
-
-
Constructor Details
-
BasicReviewer
public BasicReviewer()
-
-
Method Details
-
getSupportedFileExtensions
Description copied from interface:ReviewerReturns the file extensions (without the dot) that this reviewer can process.- Specified by:
getSupportedFileExtensionsin interfaceReviewer- Returns:
- an array containing
"bas","cls"and"frm"
-
perform
Reviews a VBA file for line-comment guidance.- Specified by:
performin interfaceReviewer- Parameters:
projectDir- the project root used to compute a relative pathguidancesFile- the VBA file to inspect- Returns:
- a formatted prompt, or
nullwhen no non-blank guidance is found - Throws:
IOException- if the file cannot be read
-