Rule Reporting Macros
You can use the following macros in SK_RULE macros to report errors, warnings, hints, and information to the user in the same format that SKILL Lint uses when generating standard messages:
SK_ERROR(typeformatarg...)
SK_WARNING(typeformatarg...)
SK_HINT(typeformatarg...)
SK_INFO(typeformatarg...)
SK_WARNING( GGTESTDATA "This function now requires 3 arguments: %L\n" SK_FORM())
This macro prints a message of the following form:
WARN (GGTESTDATA) myFile.il line 32 : This function now requires 3 arguments: ggTestData(abc 78.6)
You should use these macros in rules commands to report messages to the user when problems are encountered.
To allow the user to control the reporting of these messages the way they can with other SKILL Lint messages, use the SK_REGISTER macro outside the SK_RULE macro as follows:
SK_RULE(…
ruleReportingMacro(type… )
)
SK_REGISTER(type)
SK_RULE( ggTestData
length(SK_ARGS()) == 2
SK_ERROR( GGTESTDATA “This function now requires 3 arguments: %L\n” SK_FORM())
)
SK_REGISTER( GGTESTDATA )
Related Topics
Rule Structure - SK_RULE Macro
Return to top