method context filtering for complexity and other measures

Will this still work if the user only configures values for `name` and `regex`? This needs to be covered by tests as well.