Generalized rule.

Signed-off-by: CyberZHG <CyberZHG@gmail.com>