From c2e7367fd2b1f1e6f59e3ca1a63e820492477d83 Mon Sep 17 00:00:00 2001
From: oburn
- - It is important to understand that the individual Checks do no - drive the AST traversal. Instead, the TreeWalker initiates a recursive - descend from the root of the AST to the leaf nodes and calls the Check - methods. -
+It is important to understand that the individual + Checks do no drive the AST traversal. Instead, the TreeWalker initiates + a recursive descend from the root of the AST to the leaf nodes and calls + the Check methods. The traversal is done using a depth-first + algorithm.
Before any visitor method is called, the TreeWalker will call
- Writing a FileSetCheck is pretty straightforward: Just inherit - from AbstractFileSetCheck and implement the process(File[] - files) method and you're done. A very simple example could fire - an error if the number of files that are passed in exceeds a - certain limit. -
-- TODO: Implement that FSC and provide it as an example. Sketch: -
-+ +Writing a FileSetCheck is pretty straightforward: Just + inherit from AbstractFileSetCheck + and implement the process(File[] files) method and you're + done. A very simple example could fire an error if the number of files + that are passed in exceeds a certain limit.
TODO: + Implement that FSC and provide it as an example. Sketch:
private int max = 100; public void setMax(int aMax)