How to disable naming convention warnings? #98
-
|
The naming convention enforcement does not work for me. For example, when creating a function named
The first part about the pascalcase miiiight be debatable, but the last one about the function not starting with a verb is very hard for me to understand. What is the recommended naming for such a case where we are trying name e.g. a vtable function name or other opaque loosely related prefixed function? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
|
Two things that I think clear this up:
There is currently no off-switch to silence the warnings entirely. If a flag (e.g. |
Beta Was this translation helpful? Give feedback.
-
|
Closing the loop on this one — the toggle you asked about now exists. Three separate Ghidra Tool Options control the strictness, and each one downgrades the hard rejects/structural rewrites to advisory warnings when disabled:
Find them in Ghidra: Edit → Tool Options → GhidraMCP. For your |
Beta Was this translation helpful? Give feedback.
-
|
@Serentty — your timing is good: v5.11.2 shipped today with exactly the two things you asked for. 1. Turn warnings off entirely — drop a {
"strict_mode": "off"
}That collapses all naming validation to no-ops, so the worker never burns tokens reading or acting on a warning. Or set it per-call by passing 2. Customize the style granularly — same file, five sections: {
"function_naming": {
"min_length": 6,
"verbs_add": ["Init", "Cleanup"],
"verbs_remove": ["Process"],
"verb_tier_overrides": { "Render": 1 },
"weak_nouns_add": ["Widget"],
"weak_nouns_remove": ["Data"]
},
"hungarian": {
"auto_fix_struct_fields": false
},
"global_naming": {
"require_g_prefix": false
},
"plate_comments": {
"validate": true,
"required_sections": ["Purpose", "Notes"],
"min_first_line_words": 3
}
}Every section is optional — provide only the knobs you want to change; the rest fall back to the built-in defaults so you're not copy-pasting the full ruleset. Full schema reference, three-layer precedence (Tool Option → project file → per-call), and a worked non-Hungarian C++ example are in docs/prompts/CUSTOMIZING_CONVENTIONS.md. Defaults reproduce the pre-v5.11.2 behavior exactly, so existing setups don't change unless they opt in. |
Beta Was this translation helpful? Give feedback.
Two things that I think clear this up:
The warnings are advisory, not blocking. The function was actually renamed successfully — the response includes
status: "success"alongside thewarningsarray. Anything inwarningsis just a flag for review; it does not roll back the operation. So yourGameApp_InitInstance_candidaterename did go through.For module-prefix style names (vtable methods, opaque containers, etc.), use an
UPPERCASE_prefix followed by_. The validator recognizes this pattern (NamingConventions.MODULE_PREFIX = ^[A-Z]+_[A-Z].*) and strips the prefix before applying the PascalCase / verb-first checks to the remainder. SoGAMEAPP_InitInstanceCandidate(uppercase module pr…