"include/vscode:/vscode.git/clone" did not exist on "fa21bcde0b8723c2c27d52a39ca10cf358bf2f1c"
Commit 9fee0fe4 authored by Paul's avatar Paul
Browse files

Add some rules for confusing deref operators

parent 7b79ccf3
<?xml version="1.0"?> <?xml version="1.0"?>
<rule>
<pattern> [;{}] [*] \w+? (\+\+|\-\-) ; </pattern>
<message>
<id>UnusedDeref</id>
<severity>style</severity>
<summary>Redundant * found, "*p++" is the same as "*(p++)".</summary>
</message>
</rule>
<rule>
<pattern> if \( ([!] )*?(strlen) \( \w+? \) ([>] [0] )*?\) { </pattern>
<message>
<id>StrlenEmptyString</id>
<severity>performance</severity>
<summary>Using strlen() to check if a string is empty is not efficient.</summary>
</message>
</rule>
<rule>
<pattern> [;{}] [*] \w+? (\+\+|\-\-) ; </pattern>
<message>
<id>UnusedDeref</id>
<severity>style</severity>
<summary>Redundant * found, "*p++" is the same as "*(p++)".</summary>
</message>
</rule>
<rule> <rule>
<tokenlist>define</tokenlist> <tokenlist>define</tokenlist>
<pattern>define [0-9A-Z_^a-z]*[a-z]</pattern> <pattern>define [0-9A-Z_^a-z]*[a-z]</pattern>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment