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

util: properly indent special properties #22291

Closed
wants to merge 1 commit into from

Conversation

BridgeAR
Copy link
Member

Calling formatValue() directly requires the indentation level to
be set manually. This was not the case so far in most cases and the
indentation was off in all these cases.

I tried to fix this by moving the indentation correction directly into formatValue()
but that is tricky due to a lot of special handling and early returns. Therefore it
seemed easier to just change the indentation everywhere where it's necessary.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

Calling `formatValue()` directly requires the indentation level to
be set manually. This was not the case so far in most cases and the
indentation was off in all these cases.
@nodejs-github-bot nodejs-github-bot added the util Issues and PRs related to the built-in util module. label Aug 12, 2018
Copy link
Member

@devsnek devsnek left a comment

Choose a reason for hiding this comment

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

something for another pr might be changing indentationLvl to work in single steps

@BridgeAR
Copy link
Member Author

@BridgeAR BridgeAR added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Aug 13, 2018
@BridgeAR
Copy link
Member Author

BridgeAR added a commit to BridgeAR/node that referenced this pull request Aug 15, 2018
Calling `formatValue()` directly requires the indentation level to
be set manually. This was not the case so far in most cases and the
indentation was off in all these cases.

PR-URL: nodejs#22291
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
@BridgeAR
Copy link
Member Author

Landed in 1abc613 🎉

@BridgeAR BridgeAR closed this Aug 15, 2018
@targos targos added backport-requested-v10.x and removed author ready PRs that have at least one approval, no pending requests for changes, and a CI started. labels Aug 19, 2018
@targos
Copy link
Member

targos commented Aug 19, 2018

Depends on #21869 to land on v10.x-staging

targos pushed a commit that referenced this pull request Aug 19, 2018
Calling `formatValue()` directly requires the indentation level to
be set manually. This was not the case so far in most cases and the
indentation was off in all these cases.

PR-URL: #22291
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
targos pushed a commit that referenced this pull request Sep 3, 2018
Calling `formatValue()` directly requires the indentation level to
be set manually. This was not the case so far in most cases and the
indentation was off in all these cases.

PR-URL: #22291
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
@BridgeAR BridgeAR deleted the fix-compact-indentation branch January 20, 2020 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
util Issues and PRs related to the built-in util module.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants