Skip to content

Commit

Permalink
add infer checker-pulse rules
Browse files Browse the repository at this point in the history
  • Loading branch information
sydowma committed Jan 20, 2021
1 parent c1570de commit fc080c7
Show file tree
Hide file tree
Showing 3 changed files with 205 additions and 0 deletions.
105 changes: 105 additions & 0 deletions objclang/src/main/resources/com/sonar/sqale/infer-model.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1240,6 +1240,111 @@
<txt>min</txt>
</prop>
</chc>
<chc>
<rule-repo>Infer</rule-repo>
<rule-key>USE_AFTER_LIFETIME</rule-key>
<prop>
<key>remediationFunction</key>
<txt>CONSTANT_ISSUE</txt>
</prop>
<prop>
<key>offset</key>
<val>10</val>
<txt>min</txt>
</prop>
</chc>
<chc>
<rule-repo>Infer</rule-repo>
<rule-key>CONSTANT_ADDRESS_DEREFERENCE</rule-key>
<prop>
<key>remediationFunction</key>
<txt>CONSTANT_ISSUE</txt>
</prop>
<prop>
<key>offset</key>
<val>10</val>
<txt>min</txt>
</prop>
</chc>
<chc>
<rule-repo>Infer</rule-repo>
<rule-key>NULLPTR_DEREFERENCE</rule-key>
<prop>
<key>remediationFunction</key>
<txt>CONSTANT_ISSUE</txt>
</prop>
<prop>
<key>offset</key>
<val>10</val>
<txt>min</txt>
</prop>
</chc>
<chc>
<rule-repo>Infer</rule-repo>
<rule-key>OPTIONAL_EMPTY_ACCESS</rule-key>
<prop>
<key>remediationFunction</key>
<txt>CONSTANT_ISSUE</txt>
</prop>
<prop>
<key>offset</key>
<val>10</val>
<txt>min</txt>
</prop>
</chc>
<chc>
<rule-repo>Infer</rule-repo>
<rule-key>STACK_VARIABLE_ADDRESS_ESCAPE</rule-key>
<prop>
<key>remediationFunction</key>
<txt>CONSTANT_ISSUE</txt>
</prop>
<prop>
<key>offset</key>
<val>10</val>
<txt>min</txt>
</prop>
</chc>
<chc>
<rule-repo>Infer</rule-repo>
<rule-key>USE_AFTER_DELETE</rule-key>
<prop>
<key>remediationFunction</key>
<txt>CONSTANT_ISSUE</txt>
</prop>
<prop>
<key>offset</key>
<val>10</val>
<txt>min</txt>
</prop>
</chc>
<chc>
<rule-repo>Infer</rule-repo>
<rule-key>USE_AFTER_FREE</rule-key>
<prop>
<key>remediationFunction</key>
<txt>CONSTANT_ISSUE</txt>
</prop>
<prop>
<key>offset</key>
<val>10</val>
<txt>min</txt>
</prop>
</chc>
<chc>
<rule-repo>Infer</rule-repo>
<rule-key>VECTOR_INVALIDATION</rule-key>
<prop>
<key>remediationFunction</key>
<txt>CONSTANT_ISSUE</txt>
</prop>
<prop>
<key>offset</key>
<val>10</val>
<txt>min</txt>
</prop>
</chc>

</chc>
</chc>
</sqale>
Original file line number Diff line number Diff line change
Expand Up @@ -375,5 +375,41 @@
<repositoryKey>Infer</repositoryKey>
<key>REGISTERED_OBSERVER_BEING_DEALLOCATED</key>
</rule>
<rule>
<repositoryKey>Infer</repositoryKey>
<key>CONSTANT_ADDRESS_DEREFERENCE</key>
</rule>
<rule>
<repositoryKey>Infer</repositoryKey>
<key>MEMORY_LEAK</key>
</rule>
<rule>
<repositoryKey>Infer</repositoryKey>
<key>NULLPTR_DEREFERENCE</key>
</rule>
<rule>
<repositoryKey>Infer</repositoryKey>
<key>OPTIONAL_EMPTY_ACCESS</key>
</rule>
<rule>
<repositoryKey>Infer</repositoryKey>
<key>STACK_VARIABLE_ADDRESS_ESCAPE</key>
</rule>
<rule>
<repositoryKey>Infer</repositoryKey>
<key>USE_AFTER_DELETE</key>
</rule>
<rule>
<repositoryKey>Infer</repositoryKey>
<key>USE_AFTER_FREE</key>
</rule>
<rule>
<repositoryKey>Infer</repositoryKey>
<key>USE_AFTER_LIFETIME</key>
</rule>
<rule>
<repositoryKey>Infer</repositoryKey>
<key>VECTOR_INVALIDATION</key>
</rule>
</rules>
</profile>
64 changes: 64 additions & 0 deletions objclang/src/main/resources/org/sonar/plugins/infer/rules.json
Original file line number Diff line number Diff line change
Expand Up @@ -758,5 +758,69 @@
"description": "registered observer being deallocated",
"severity": "MAJOR",
"type": "CODE_SMELL"
},
{
"category": "Infer",
"key": "CONSTANT_ADDRESS_DEREFERENCE",
"name": "constant address dereference",
"description": "constant address dereference",
"severity": "MAJOR",
"type": "BUG"
},
{
"category": "Infer",
"key": "NULLPTR_DEREFERENCE",
"name": "nullptr dereference",
"description": "nullptr dereference",
"severity": "MAJOR",
"type": "BUG"
},
{
"category": "Infer",
"key": "OPTIONAL_EMPTY_ACCESS",
"name": "optional empty access",
"description": "optional empty access",
"severity": "MAJOR",
"type": "BUG"
},
{
"category": "Infer",
"key": "STACK_VARIABLE_ADDRESS_ESCAPE",
"name": "stack variable address escape",
"description": "stack variable address escape",
"severity": "MAJOR",
"type": "BUG"
},
{
"category": "Infer",
"key": "USE_AFTER_DELETE",
"name": "use after delete",
"description": "use after delete",
"severity": "MAJOR",
"type": "BUG"
},
{
"category": "Infer",
"key": "USE_AFTER_FREE",
"name": "use after free",
"description": "use after free",
"severity": "MAJOR",
"type": "BUG"
},
{
"category": "Infer",
"key": "USE_AFTER_LIFETIME",
"name": "use after lifetime",
"description": "use after lifetime",
"severity": "MAJOR",
"type": "BUG"
},
{
"category": "Infer",
"key": "VECTOR_INVALIDATION",
"name": "vector invalidation",
"description": "vector invalidation",
"severity": "MAJOR",
"type": "BUG"
}
]

0 comments on commit fc080c7

Please sign in to comment.