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

tools: disallow multiple spaces except for indentation #6645

Closed
wants to merge 2 commits into from

Conversation

Trott
Copy link
Member

@Trott Trott commented May 9, 2016

Checklist
  • tests and code linting passes
  • the commit message follows commit guidelines
Affected core subsystem(s)

tools test benchmark lib

Description of change

Except for indentation, disallow multiple whitespace around logical
expressions, conditional expressions, declarations, array elements,
object properties, sequences and function parameters.

This stems from comments in #6592
where five collaborators expressed frustration with the use of spaces to
align things that do not appear first on a line. I would not be surprised if there
are others who feel differently, but rather than make an assumption, I'm
putting this out there and we'll see....

Anyway, @cjihrig probably stated the argument for this rule the clearest:

I'm in favor of not lining these up. It looks nice, but almost always ends with something being added that requires everything to be realigned, leading to more churn.

/cc @jasnell @targos @mscdex @jbergstroem @cjihrig

@Trott Trott added the tools Issues and PRs related to the tools directory. label May 9, 2016
Trott added 2 commits May 8, 2016 23:04
In preparation for stricter linting, remove extra spaces.
Except for indentation, disallow multiple whitespace around logical
expressions, conditional expressions, declarations, array elements,
object properties, sequences and function parameters.
@targos
Copy link
Member

targos commented May 9, 2016

Totally +1 on this. LGTM if CI is happy

@mscdex
Copy link
Contributor

mscdex commented May 9, 2016

LGTM if CI is good: https://ci.nodejs.org/job/node-test-pull-request/2542/

@Trott
Copy link
Member Author

Trott commented May 9, 2016

Only CI failure is a known flaky that will be fixed when #6633 lands.

@Trott
Copy link
Member Author

Trott commented May 9, 2016

By the way, I used the -F flag for this.:tada: /cc @mscdex

@silverwind
Copy link
Contributor

LGTM

Trott added a commit to Trott/io.js that referenced this pull request May 12, 2016
In preparation for stricter linting, remove extra spaces.

PR-URL: nodejs#6645
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Roman Reiss <me@silverwind.io>
Trott added a commit to Trott/io.js that referenced this pull request May 12, 2016
Except for indentation, disallow multiple whitespace around logical
expressions, conditional expressions, declarations, array elements,
object properties, sequences and function parameters.

PR-URL: nodejs#6645
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Roman Reiss <me@silverwind.io>
@Trott
Copy link
Member Author

Trott commented May 12, 2016

Landed in a56da51 and 6979632

@Trott Trott closed this May 12, 2016
evanlucas pushed a commit that referenced this pull request May 17, 2016
In preparation for stricter linting, remove extra spaces.

PR-URL: #6645
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Roman Reiss <me@silverwind.io>
evanlucas pushed a commit that referenced this pull request May 17, 2016
Except for indentation, disallow multiple whitespace around logical
expressions, conditional expressions, declarations, array elements,
object properties, sequences and function parameters.

PR-URL: #6645
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Roman Reiss <me@silverwind.io>
@Trott Trott deleted the no-multi-spaces branch January 13, 2022 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tools Issues and PRs related to the tools directory.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants