We can use framework.ExpectError() for checking the expected error happens. However Expect(err).To(HaveOccurred()) can be used instead and that makes the e2e test code unreadable. This adds the check to use framework.ExpectError() for readable code.
This script checks coding style for test code. It is useful to enforce developers to use framework methods for keeping readable test code for example.