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

Disable keep-padding option in shfmt #1810

Merged
merged 1 commit into from
Jan 23, 2021

Conversation

NoahGorny
Copy link
Member

Has some serious bugs and not really needed

Description

Disable the -kp option in shfmt by disabling it in our editorconfig
Also fixed all files that need to be changed after this

Motivation and Context

This was needed as -kp is buggy (mvdan/sh#652)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • If my change requires a change to the documentation, I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • If I have added a new file, I also added it to clean_files.txt and formatted it using lint_clean_files.sh.
  • I have added tests to cover my changes, and all the new and existing tests pass.

Has some serious bugs and not really needed
Also fixed all files that need to be changed after this
Comment on lines -210 to +213
if ${SCM_GIT_USE_GITSTATUS} && _command_exists gitstatus_query && gitstatus_query && [[ "${VCS_STATUS_RESULT}" == "ok-sync" ]]; then # use faster gitstatus
SCM_GIT_GITSTATUS_RAN=true # use this in githelpers and below to choose gitstatus output
if ${SCM_GIT_USE_GITSTATUS} && _command_exists gitstatus_query && gitstatus_query && [[ "${VCS_STATUS_RESULT}" == "ok-sync" ]]; then
# we can use faster gitstatus
# use this variable in githelpers and below to choose gitstatus output
SCM_GIT_GITSTATUS_RAN=true
Copy link
Contributor

Choose a reason for hiding this comment

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

Was this change related to the keep-padding setting?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, as shfmt did a pretty wierd formatting to the comment, so I preferred to change it entirely

@NoahGorny
Copy link
Member Author

Copy link
Contributor

@davidpfarrell davidpfarrell left a comment

Choose a reason for hiding this comment

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

Overall I think the new formatting changes on the affected files are better now than before, and doesn't seem to be a big change in general, so I'm good with it.

@cornfeedhobo
Copy link
Member

Same. And it sounds like mvdan doesn't want to support this feature anymore anyways.

@NoahGorny NoahGorny merged commit 2a2741d into Bash-it:master Jan 23, 2021
@NoahGorny NoahGorny deleted the disable-keep-padding branch January 23, 2021 08:08
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