add rule and test
Merge pull request #311 from mimmi20/issue-310

Fixes #310