Skip to content

Update general guideline #746

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

slickepinne
Copy link
Member

We updated the general guidelines and moved language specific guidelines to the relevant folders.

Co-authored-by: Valeria Graffeo [email protected]
Co-authored-by: Rob Whittaker [email protected]
Co-authored-by: Trésor Bireke [email protected]

Co-authored-by: Valeria Graffeo <[email protected]>
Co-authored-by: Rob Whittaker <[email protected]>
Co-authored-by: Trésor Bireke <[email protected]>
@thoughtbot-github thoughtbot-github force-pushed the update_general_guideline branch from eb96218 to 60e3c61 Compare April 4, 2025 13:44
Copy link
Contributor

@JoelQ JoelQ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels like a mix of multiple unrelated changes:

  1. Delete Hound guideline
  2. Move some guidelines out general
  3. Reformat part of general
  4. Change guideline on whitespace

Thoughts on making each of these their own commit? Maybe even their own PR? That would allow conversation to happen independently for each, and if one proves controversial then it doesn't block merging the others.

Comment on lines -26 to +23
- Delete trailing whitespace.
- Delete trailing spaces.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whitespace is more than just spaces. It includes other invisible characters such as tabs, newlines, carriage returns or the unicode zero-width-joiner.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would "blank spaces" include these characters? Our main goal was to not use "whitespace".

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe, but I think it's more ambiguous because some of the characters aren't spaces.

"Whitespace" seems to be the precise technical term used in e.g. the whatwg spec, the ECMAScript spec, or the Unicode spec to describe the class of characters (although they all define the set slightly differently).

Is "whitespace" in the context of characters and typography considered problematic?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd also want to ensure we're covering more than just trailing spaces as there's many other characters that one should avoid trailing a line.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JoelQ Not sure about being considered problematic but in our playbook and best practices chapter, we write:

Use negative space instead of white space.
Of course, it's important to consider the "environment" of where we use a terminology – I just feel if there is a more inclusive naming that captures the same intent, I would prefer using it.

@vburzynski How do you feel about adding these other characters we should avoid to this list?

- Don't misspell.
- Use empty lines around multi-line blocks.
- Use spaces around operators, except for unary operators, such as `!`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious, why wouldn't one want to use spaces around operators? adding them in can improve readability/legibility. It also applies more broadly than just Ruby.

arr << 1
arr<<2
const result=1+1;
const other = 1 + 2;

EDIT: saw this was moved to ruby; I think this guidance would apply broadly to most if not all programming languages

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm with you and happy to move it back.

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

Successfully merging this pull request may close these issues.

3 participants