OdysseyDecomp
OdysseyDecomp copied to clipboard
Custom linter: Add requirement for `_OFFSET` variable names to be lowercase
Example: _1d8, _c8, ...
Reason for this is that Begins with underscore and uppercase letter are technically reserved by the C++ spec and should not be used for own variable names. _C throws an error in some compilers, while _c does not - thus, we should use the latter, to improve compatibility with different systems.
Source: https://devblogs.microsoft.com/oldnewthing/20230109-00/?p=107685
What about the difference between field_xxx and _xxx? HexRaysPyTools generates field_xxx (and the fork I use adds the generated type into the name, like char_xxx) while the built-in struct creator uses _xxx. I'm far more in favor of field_xxx for the record.
Isn't "field" already just implied by the _xxx scheme?
That's also what I'm thinking. It does not add information/value, just make the name longer, and one advantage of having a very short name for these placeholders is that they stick out from proper namings, are immediately apparent that they do not have their final name yet and thus need to be adjusted.