Moving from MZ-Tools 3.0 to 8.0 Part 13: The Headers Review

A new review of MZ-Tools 8.0 is the Headers Review, that is part of the Quality Review feature. This review is configured in the “Options” window, “Team Options” tab, “Quality Review” > “Headers Review” section, where you select which code elements (class, enum, event, property, method, etc.) you want to review:

There are two possible causes for a code element to fail the review. In the first one, a code element doesn’t have a header at all:

CodeElementHeadersReviewHeaderMissingIn the second one, the review is smart enough to recognize that, while a code element has a header, it doesn’t match any of the configured headers for that code element. For example, if you have a header template like this:

'--------------------------------------------------------------------
' Method : $P[CODE_ELEMENT_NAME]
' Author : $P[AUTHOR]
' Date : $P[DATE]
' Purpose: $U[Purpose]
'--------------------------------------------------------------------

And the actual header of a method is as follows (notice the missing Purpose line):

'--------------------------------------------------------------------
' Method : f2
' Author : Carlos
' Date : 01/27/2016
'--------------------------------------------------------------------

Then the review will inform that the header doesn’t match any valid header:

CodeElementHeadersReviewHeaderMismatchSo, this new review of MZ-Tools 8.0 is very useful for team leads, consultants or even individual developers that want to ensure that their code is perfectly documented with headers.