Skip to content

Commit 96e2e80

Browse files
committed
Add new coding standard for local (internal) function names.
1 parent d36bfab commit 96e2e80

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

devin_lifeguard.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,3 +143,13 @@ rules:
143143
144144
ensure ephemeral structures are freed once no longer needed, and avoid
145145
reusing pointers after free
146+
- name: use-proper-function-visibility
147+
trigger: >-
148+
functions must use appropriate visibility modifiers. Public functions
149+
should use WOLFSSL_API, local functions should use WOLFSSL_LOCAL, and
150+
non-static local functions should have a wolfssl_local_ or wc_local_ prefix.
151+
solution: >-
152+
for public functions that are part of the external API, declare them with
153+
WOLFSSL_API. For functions local to the library but not static, use
154+
WOLFSSL_LOCAL and prefix the function name with wolfssl_local_ or wc_local_
155+
to clearly indicate internal usage.

0 commit comments

Comments
 (0)