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

shfmt pre-commit #36

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

shfmt pre-commit #36

wants to merge 2 commits into from

Conversation

PLangowski
Copy link
Contributor

No description provided.

@PLangowski PLangowski changed the base branch from main to check-fused October 16, 2024 10:23
@PLangowski
Copy link
Contributor Author

I set the indent to 4 spaces, although I think 2 spaces also look okay.

@macpijan
Copy link
Contributor

macpijan commented Oct 16, 2024

although I think 2 spaces also look okay.

Then we can try to go with 2 spaces, following https://google.github.io/styleguide/shellguide.html as well. Likely it will also trigger less changes?

@PLangowski
Copy link
Contributor Author

@macpijan done

@macpijan
Copy link
Contributor

Thanks, LGTM.

Would it be a problem for your UEFI capsule changes @DaniilKl if we merge this?
If so, we can hold off with merging.

@DaniilKl
Copy link
Contributor

@macpijan, yep, definitely there will be some rebasing, could you please merge it after QEMU/Capsule Update?

@macpijan
Copy link
Contributor

Sure, I guess we can run shfmt again after we merge capsule PR.

@m-iwanicki
Copy link
Contributor

@PLangowski QEMU/capsule update has been merged, are you going to rebase this PR?

@PLangowski PLangowski changed the base branch from check-fused to main December 6, 2024 09:28
@PLangowski
Copy link
Contributor Author

rebased

Signed-off-by: Pawel Langowski <[email protected]>
Signed-off-by: Pawel Langowski <[email protected]>
Copy link
Contributor

@m-iwanicki m-iwanicki left a comment

Choose a reason for hiding this comment

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

Looks good. Not sure how much I like >"$file" as I always added space unless it's 2>&1 type redirect but otherwise I think it's great addition.

Copy link
Contributor

@m-iwanicki m-iwanicki left a comment

Choose a reason for hiding this comment

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

Wrong button I wanted to approve

Copy link
Contributor

@m-iwanicki m-iwanicki left a comment

Choose a reason for hiding this comment

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

@PLangowski just noticed, shftm in pre-commit doesn't fix files without .sh suffix. shftm used manually installed from dnf:

# dnf list --installed shfmt
Installed packages
shfmt.x86_64 3.7.0-5.fc41 fedora

fixes any file I point at it.
Can you check if this is fixable or maybe we should add suffix to all scripts?

@DaniilKl
Copy link
Contributor

DaniilKl commented Dec 9, 2024

Can you check if this is fixable or maybe we should add suffix to all scripts?

If you add the suffix to all scripts - make sure to check everything that depends on the scripts and add suffixes there as well.

@m-iwanicki
Copy link
Contributor

@PLangowski Probably in Makefile. Install script without extension so we don't have to make changes in scripts

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.

4 participants