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

Code style #8

Open
dkfellows opened this issue Feb 19, 2024 · 0 comments
Open

Code style #8

dkfellows opened this issue Feb 19, 2024 · 0 comments

Comments

@dkfellows
Copy link

Pick one indentation rule for your code. Use only that indentation rule. Use it everywhere in your code (never mind what third-party dependencies do). In general, that applies to everything to do with basic code style; pick one rule (there are many viable options; I have my favourites but it's not my code) and stick to it.

Using a single style helps your code be a lot easier to read. Most of your code seems to be using 4 spaces as the basic indentation unit, which is good, but it definitely isn't universal and that makes things look very sloppy.

There are multiple options for doing code style enforcement. It's a much messier topic in C++ (and C) than in some other languages. However, until you have defined rules for what things ought to be like, enforcement in any form is impossible.

@dkfellows dkfellows mentioned this issue Feb 19, 2024
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant