You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For Java sources we have the convention that "Tab characters are not used for indentation" (from Google Java Style Guide) and recently we got #43 (which among other things requires discussing which character to use for indenting XML files).
Regardless of the file format, tab characters should not be used to replace a specific number of whitespace characters, as their appearance cannot be consistently guaranteed across different devices.
While shunning tabs entirely feels too extreme, even unconventional indentation will appear consistent as long as tabs aren’t used in place of a specific number of spaces. For example, spaces and tabs could alternate based on the Fibonacci sequence (one space, one tab, two spaces, three tabs, five spaces). I’m not saying it’s a good practice, but it’s consistent.
Then, we could add recommendations shunning tabs for specific formats.
The text was updated successfully, but these errors were encountered:
javier-godoy
added
discuss
The issue is scheduled for internal discussion
agreed
An agreement on the resolution has been reached
and removed
discuss
The issue is scheduled for internal discussion
labels
Sep 30, 2024
For Java sources we have the convention that "Tab characters are not used for indentation" (from Google Java Style Guide) and recently we got #43 (which among other things requires discussing which character to use for indenting XML files).
Regardless of the file format, tab characters should not be used to replace a specific number of whitespace characters, as their appearance cannot be consistently guaranteed across different devices.
While shunning tabs entirely feels too extreme, even unconventional indentation will appear consistent as long as tabs aren’t used in place of a specific number of spaces. For example, spaces and tabs could alternate based on the Fibonacci sequence (one space, one tab, two spaces, three tabs, five spaces). I’m not saying it’s a good practice, but it’s consistent.
but not
Then, we could add recommendations shunning tabs for specific formats.
The text was updated successfully, but these errors were encountered: