:identifier_capital_plural: Local variables and function parameters
:identifier: local variable and function parameter
:identifier_plural: local variables and function parameters
:identifier_or: local variable or function parameter
:regex: ^[a-z][a-zA-Z0-9]*$

include::../introduction.adoc[]

include::../why-is-this-an-issue.adoc[]

include::../what-is-the-potential-impact.adoc[]

=== Exceptions

This rule ignores ``++const++`` variables.

include::../how-to-fix-it.adoc[]

=== Code examples

==== Noncompliant code example

With the default regular expression ``{regex}``:

[source,cpp,diff-id=1,diff-type=noncompliant]
----
void doSomething(int my_param) {
  int LOCAL;
  ...
}
----

==== Compliant solution

[source,cpp,diff-id=1,diff-type=compliant]
----
void doSomething(int myParam) {
  int local;
  ...
}
----

== Resources

=== Documentation

* Wikipedia - https://en.wikipedia.org/wiki/Naming_convention_(programming)[Naming Convention (programming)]

=== Related rules

* S100 - Function names should comply with a naming convention
* S101 - Class names should comply with a naming convention
* S116 - Field names should comply with a naming convention
* S1543 - Macro names should comply with a naming convention
* S1578 - File names should comply with a naming convention
* S1642 - `struct` names should comply with a naming convention
* S1878 - `union` names should comply with a naming convention
* S2304 - Namespace names should comply with a naming convention
* S2342 - Enumeration names should comply with a naming convention
* S2343 - Enumeration values should comply with a naming convention
* S3222 - Label names should comply with a naming convention
* S6193 - Coroutine names should comply with a naming convention
* S6221 - Concept names should comply with a naming convention

ifdef::env-github,rspecator-view[]

'''
== Implementation Specification
(visible only on this page)

include::../message.adoc[]

include::../parameters.adoc[]

'''
== Comments And Links
(visible only on this page)

include::../comments-and-links.adoc[]

endif::env-github,rspecator-view[]
