-
Notifications
You must be signed in to change notification settings - Fork 94
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
Integrate shfmt #128
Integrate shfmt #128
Conversation
I've updated to the latest code with git pull. failures:
---- tests::validity::array_init stdout ----
thread 'tests::validity::array_init' panicked at src/modules/formatter.rs:57:30:
Couldn't spawn shfmt: Os { code: 2, kind: NotFound, message: "No such file or directory" }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
---- tests::validity::bool stdout ----
thread 'tests::validity::bool' panicked at src/tests/validity.rs:53:5:
assertion `left == right` failed
left: ""
right: "1"
---- tests::validity::add stdout ----
thread 'tests::validity::add' panicked at src/tests/validity.rs:23:5:
assertion `left == right` failed
left: ""
right: "60"
failures:
tests::validity::add
tests::validity::array_init
tests::validity::bool
test result: FAILED. 87 passed; 3 failed; 0 ignored; 0 measured; 0 filtered out; finished in 12.05s
error: test failed, to rerun pass `--bin amber` At other times, the following error may occur during execution. failures:
---- tests::validity::array_assign stdout ----
thread 'tests::validity::array_assign' panicked at src/modules/formatter.rs:57:30:
Couldn't spawn shfmt: Os { code: 2, kind: NotFound, message: "No such file or directory" }
---- tests::validity::array_init stdout ----
thread 'tests::validity::array_init' panicked at src/modules/formatter.rs:57:30:
Couldn't spawn shfmt: Os { code: 2, kind: NotFound, message: "No such file or directory" }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
---- tests::validity::add_arrays_literal stdout ----
thread 'tests::validity::add_arrays_literal' panicked at src/modules/formatter.rs:57:30:
Couldn't spawn shfmt: Os { code: 2, kind: NotFound, message: "No such file or directory" }
---- tests::validity::array_assign_out_of_bounds stdout ----
thread 'tests::validity::array_assign_out_of_bounds' panicked at src/modules/formatter.rs:57:30:
Couldn't spawn shfmt: Os { code: 2, kind: NotFound, message: "No such file or directory" }
---- tests::validity::bool stdout ----
thread 'tests::validity::bool' panicked at src/modules/formatter.rs:57:30:
Couldn't spawn shfmt: Os { code: 2, kind: NotFound, message: "No such file or directory" }
---- tests::validity::add stdout ----
thread 'tests::validity::add' panicked at src/tests/validity.rs:23:5:
assertion `left == right` failed
left: ""
right: "60"
failures:
tests::validity::add
tests::validity::add_arrays_literal
tests::validity::array_assign
tests::validity::array_assign_out_of_bounds
tests::validity::array_init
tests::validity::bool
test result: FAILED. 84 passed; 6 failed; 0 ignored; 0 measured; 0 filtered out; finished in 11.92s
error: test failed, to rerun pass `--bin amber` |
@arapower what is your default shell? It seems that this code doesn't run on bash? Correct me if I'm wrong |
@Ph0enixKM $ echo $SHELL
/bin/bash |
Co-authored-by: Phoenix Himself <[email protected]>
@b1ek btw I was thinking since Beacuse |
sure, that makes sense
wouldn't it be better to create a separate guide for contributing in |
Oh yeah. It would. I'll create an issue for that |
I've added a draft issue in our project |
Any updates for this? |
This issue should also cover the installation process of shfmt in the installer script. It should as user if they want to install it. If user has no bash formatted installed - then there shouldn’t be any warning.
Could you make an amber script to compile and run and format in the meantime? I think that @b1ek has a lot of things on her plate right now. I don’t want to hurry anyone here as we all have other duties |
The command is |
The code now compiles and I tested locally and works :-D |
@Ph0enixKM fixed and tested locally. |
Co-authored-by: Hubert Jabłoński <[email protected]>
Co-authored-by: Hubert Jabłoński <[email protected]>
Co-authored-by: Hubert Jabłoński <[email protected]>
So I think that we can approve this PR, later we can create a ticket on how to evolve this integration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good enough
The mechanism can support multiple formatters, and selects the first one available in current environment
Closes #103