-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4570280
commit 17f3f2c
Showing
2 changed files
with
13 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
{ | ||
"title": "User-specified functions should not be called" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,19 @@ | ||
FIXME: add a description | ||
This rule template allows to define rules that ban the call of some functions, for instance functions provided for legacy reasons. It will not prevent calling member functions or macros with the same name. | ||
|
||
// If you want to factorize the description uncomment the following line and create the file. | ||
//include::../description.adoc[] | ||
=== Noncompliant code example | ||
|
||
== Why is this an issue? | ||
Given parameters: | ||
|
||
FIXME: remove the unused optional headers (that are commented out) | ||
* names: f1, ::f2 | ||
* message: Don't call $ | ||
|
||
//=== What is the potential impact? | ||
|
||
== How to fix it | ||
//== How to fix it in FRAMEWORK NAME | ||
|
||
=== Code examples | ||
|
||
==== Noncompliant code example | ||
|
||
[source,cpp,diff-id=1,diff-type=noncompliant] | ||
---- | ||
FIXME | ||
---- | ||
|
||
==== Compliant solution | ||
|
||
[source,cpp,diff-id=1,diff-type=compliant] | ||
[source,cpp] | ||
---- | ||
FIXME | ||
void f() { | ||
f1(); // Noncompliant: Don't call f1 | ||
my::f1(); // Noncompliant: Don't call f1 | ||
f2(); // Noncompliant: Don't call f2 | ||
my::f2() // Compliant | ||
} | ||
---- | ||
|
||
//=== How does this work? | ||
|
||
//=== Pitfalls | ||
|
||
//=== Going the extra mile | ||
|
||
|
||
//== Resources | ||
//=== Documentation | ||
//=== Articles & blog posts | ||
//=== Conference presentations | ||
//=== Standards | ||
//=== External coding guidelines | ||
//=== Benchmarks |