Behaviours: hank_rule.
analyze/2 | This builds a list of header files with its attributes. |
ignored/2 | Rule ignore specifications. |
analyze(FilesAndASTs::hank_rule:asts(), Context::hank_context:t()) -> [hank_rule:result()]
This builds a list of header files with its attributes. Then traverse the file ASTs mapping their macros and records And checks whether they were used just once.
ignored(RecordName::hank_rule:ignore_pattern(), MacroName::term()) -> false
Rule ignore specifications. Example:
-hank([{single_use_hrl_attrs, ["ALL", %% Will ignore ?ALL, ?ALL() and ?ALL(X) {"ZERO", 0}, %% Will ignore ?ZERO() but not ?ZERO(X) nor ?ZERO {"ONE", 1}, %% Will ignore ?ONE(X) but not ?ONE() nor ?ONE {"NONE", none}, %% Will ignore ?NONE but not ?NONE(X) nor ?NONE() record_name %% Will ignore #record_name ]},
Generated by EDoc