Deprecated: Assigning the return value of new by reference is deprecated in /var/www/seafelt-blog/wp-settings.php on line 512

Deprecated: Assigning the return value of new by reference is deprecated in /var/www/seafelt-blog/wp-settings.php on line 527

Deprecated: Assigning the return value of new by reference is deprecated in /var/www/seafelt-blog/wp-settings.php on line 534

Deprecated: Assigning the return value of new by reference is deprecated in /var/www/seafelt-blog/wp-settings.php on line 570

Deprecated: Assigning the return value of new by reference is deprecated in /var/www/seafelt-blog/wp-includes/cache.php on line 103

Deprecated: Assigning the return value of new by reference is deprecated in /var/www/seafelt-blog/wp-includes/query.php on line 61

Deprecated: Assigning the return value of new by reference is deprecated in /var/www/seafelt-blog/wp-includes/theme.php on line 1109

Deprecated: Function eregi() is deprecated in /var/www/seafelt-blog/wp-content/plugins/wp-statpress/statpress.php on line 1139

Deprecated: Function eregi() is deprecated in /var/www/seafelt-blog/wp-content/plugins/wp-statpress/statpress.php on line 1140

Deprecated: Function eregi() is deprecated in /var/www/seafelt-blog/wp-content/plugins/wp-statpress/statpress.php on line 1141

Deprecated: Function eregi() is deprecated in /var/www/seafelt-blog/wp-content/plugins/wp-statpress/statpress.php on line 1142

Deprecated: Function ereg() is deprecated in /var/www/seafelt-blog/wp-content/plugins/wp-statpress/statpress.php on line 979
SCM Audit Rule Logic Updated | seafelt.com

Skip to content


SCM Audit Rule Logic Updated

I finally bit the bullet and rewrote the SCM audit logic.

Until now, the audit logic was based on the Rule condition evaluating to False. This was actually the opposite of what it should have been. It was originally written from a perspective of “check that this is true. If it isn’t, that’s a problem”, which makes a certain kind of sense if you think about it in that way.

The problem with this logic is that it’s usually the opposite of what you expect it to be. When writing an audit rule, you’re generally checking for something that’s broken. The logic in your head is “if this happens, that’s bad, so tell me”, which is the exact logical opposite of the original logic.

Several times I’ve found myself writing a new audit rule and having it fail in testing, and then doing a facepalm and thinking “oh yeah, that’s right. This thing wants it to be the other way around.” If I have trouble with this, what chance do you have?

So I changed it. And it’s much better this way.

Posted in Development, Features. Tagged with , , , , , .

0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

Some HTML is OK

(required)

(required, but never shared)

or, reply to this post via trackback.