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

[Feature] Improve whitespace consistency in standard library and integration tests #523

Closed
hdwalters opened this issue Oct 20, 2024 · 5 comments · Fixed by #543
Closed
Assignees
Labels
enhancement New feature or request

Comments

@hdwalters
Copy link
Contributor

Is your feature request related to a problem? Please describe.
I note that most of the examples of Bash command fragments in the standard library and integration tests look like:

$echo "Factorial is {fact}"$?

When reading this, the average person will tokenise on spaces, reading $echo as a single token, and the average Bash user will probably interpret that as "the value of the echo environment variable".

Describe the solution you'd like
In the absence of an official style guide, I would like to change all the standard library functions and integration tests to something like this, and fix up any inconsistent indentation while I'm at it:

$ echo "Factorial is {fact}" $?

This might seem like a small request, but it's simple to do, and may improve our development lives that tiny bit.

Describe alternatives you've considered
N/A

Additional context
If we do this, we should probably make similar changes to the documentation as well.

@hdwalters hdwalters added the enhancement New feature or request label Oct 20, 2024
@github-project-automation github-project-automation bot moved this to 🆕 New in Amber Project Oct 20, 2024
@hdwalters hdwalters self-assigned this Oct 20, 2024
@hdwalters hdwalters changed the title [Feature] Improve consistency of whitespace in standard library and integration tests [Feature] Improve whitespace consistency in standard library and integration tests Oct 20, 2024
@Mte90
Copy link
Member

Mte90 commented Oct 21, 2024

There was the plan to do a static code analysis in Amber but first it is needed a LSP that is in progress.

Maybe in the meantime we can do a Bash script that fix those stuff.

@hdwalters
Copy link
Contributor Author

Maybe in the meantime we can do a Bash script that fix those stuff.

I think you're talking about writing some sort of linter/formatter?

I was thinking to just make a one-off change, and leave the modified scripts as an exemplar for ongoing changes.

@Mte90
Copy link
Member

Mte90 commented Oct 21, 2024

I was thinking to just make a one-off change, and leave the modified scripts as an exemplar for ongoing changes.

I think that we need something that let us also after months to keep the consistency, so not just once.

@hdwalters
Copy link
Contributor Author

Fair enough, but that's outside the scope of the change I wanted to make. If there are no objections from anyone on my proposal, I will go ahead and raise a PR.

@hdwalters
Copy link
Contributor Author

I would also like to replace "Succeded" with "Succeeded" while I'm at it.

@github-project-automation github-project-automation bot moved this from 🆕 New to 🏁 Done in Amber Project Oct 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants