Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify member variable naming #9061

Open
vaxerski opened this issue Jan 14, 2025 · 14 comments
Open

Unify member variable naming #9061

vaxerski opened this issue Jan 14, 2025 · 14 comments
Labels
help wanted Extra attention is needed Minor This bug has a minor impact on Hyprland's usability

Comments

@vaxerski
Copy link
Member

Description

If someone is bored, can you unify member variable naming? I've initially used hungarian + m, m_bBooleanValue but then I stopped, if someone can just move it to camel + m_ for members it would be nice. (m_value, m_speed, m_amogus)

obviously m_ for members of classes / structs

@vaxerski vaxerski added help wanted Extra attention is needed Minor This bug has a minor impact on Hyprland's usability labels Jan 14, 2025
@ninetailedtori
Copy link
Contributor

I could for sure :)
Lemme go through it all with a linter or smth, I'll write up a linter format for hypr :)

@vaxerski
Copy link
Member Author

we have clang-tidy, if you know how to write a lint rule for that and auto apply it, would be appreciated

@ninetailedtori
Copy link
Contributor

Ah, yea I can do that :)

@vaxerski
Copy link
Member Author

@ninetailedtori any progress on that?

@ninetailedtori
Copy link
Contributor

Yep, it's nearly done. Lemme commit it to my fork in a bit :)

@vaxerski
Copy link
Member Author

vaxerski commented Mar 1, 2025

thanks! no hurries, just wanted to check in

@ninetailedtori
Copy link
Contributor

Yep, after my clang-tidy and redo of several grammatical fixes...there's about 850 renames I'm about to push to my fork...heheh. Do you want ALL global pointers to have g_, or only the singleton pointers? If all, I can more easily do the formatting, but if not, then I'll need to be a little more careful.

@vaxerski
Copy link
Member Author

vaxerski commented Mar 2, 2025

are there any other global pointers? all is fine.

@ninetailedtori
Copy link
Contributor

ninetailedtori commented Mar 2, 2025

misc-use-internal-linkage wants us to move a bunch of functions into a single file, but the intent is to forward-declare, yes? So it might be worth modifying clang-tidy again. I'll fix the config. Unless you'd like me to move everything into an anonymous namespace for each file, and fix the includes? It will break a lot of shit though, as I can't forward declare it. It will have to move to just cpp source files and inline exports.

@ninetailedtori
Copy link
Contributor

ninetailedtori commented Mar 2, 2025

To be honest, hyprctl is already in a single file, and can be statically linked, or anonymous namespaced with ease. It might be worth moving some of the others over too, but it depends on compile time. It's a lot faster at runtime to use anonymous, but to forward-declare is faster compile.

@vaxerski
Copy link
Member Author

vaxerski commented Mar 3, 2025

ignore clang-tidy for now, just change the variable naming. Other clang-tidy stuff can be dealt with later.

@ninetailedtori
Copy link
Contributor

Yep it's bed time, I'm gonna sort the rest out tmr and hopefully can get the whole repo sorted within a few days. We'll have to do the others as well though...aquamarine especially.

@vaxerski
Copy link
Member Author

vaxerski commented Mar 3, 2025

no, just Hyprland. Libraries can't be changed due to API breaks. We'll have to live with that.

@ninetailedtori
Copy link
Contributor

That's fair. I've had a blood test today so I'll be out of it for a bit, but I'll get back to it when I can, and update this thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed Minor This bug has a minor impact on Hyprland's usability
Projects
None yet
Development

No branches or pull requests

2 participants