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

Clean up #7

Open
izgeri opened this issue Jul 3, 2019 · 1 comment
Open

Clean up #7

izgeri opened this issue Jul 3, 2019 · 1 comment

Comments

@izgeri
Copy link
Contributor

izgeri commented Jul 3, 2019

Copying from this last comment on the first (primary) PR - there is some outstanding work that may be worth doing, and it may make sense to break these up into separate issues. For now here is the full list:

Feel strongly about

  • Subtrees get out of hand quickly for even the smallest of repos. We should try to find a way to not force all users to deal with ever-growing helper lib checkouts.
  • filehandling/lib (even though it was straight from SO) at the very least needs some comments but it really could be better if the logic flow was cleaned up to be more readable.
  • The : ${FOO:?"Something"} pattern is really hard to read when compared to an if/else
  • The [[ <check> ]] | die "foo" and <cmd> || die patterns are also really hard to read when compared to an if/else
  • If/else pattern where the else is returning 1 should be changed to be if !condition return 1 and then do the positive condition (unconditionally)
  • tests-for-this-repo needs a better name. Don't know what it should be but the current one isn't great.
  • Bats tests and Dockerfiles should have more liberal use of newlines in tests to show given/when/then sections
  • [[ <check> ]] by itself should go away as a pattern as it's unclear what it's doing without knowing bash in depth

Should probably fix

On the fence but leaning towards needing a fix

  • Some of your awk chomping of refs could be done with sed
  • Even though all of the script import -e flag, I think it would be good to explicitly set it in all toplevelish scripts that you expect might want to bail on errors
  • k8s/platform_login seems like it probably doesn't need main function given that the whole thing is tiny

Nits

Random thoughts

@izgeri
Copy link
Contributor Author

izgeri commented Jul 3, 2019

@sgnn7 @dividedmind you were both involved with this before, please feel free to update / revise this if it makes sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant