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

fetch-configlet_v3: Improve style #113

Merged
merged 13 commits into from
Jan 13, 2021

Conversation

ee7
Copy link
Member

@ee7 ee7 commented Jan 12, 2021

The commits are atomic - please see the commit messages. (I'd prefer to squash this PR, though).

@IsaacG very kindly gave me a detailed review of the first 6 commits here and suggested the changes given by:

  • f393d8a fetch-configlet_v3: Remove `(` in case statements
  • 550a4c3 fetch-configlet_v3: Prefer `[[` to `[`
  • 97e852d fetch-configlet_v3: Move options before arguments

The commit 774305f attempts to address some of their other comments, but it wasn't reviewed.

Note that we indent using 2 spaces in the version of this script in exercism/github-actions and in our other scripts in this repo:
https://github.com/exercism/canonical-data-syncer/blob/7edf852ae6f4fd382be402d43dda81ee1a92e9a4/bin/release#L8-L10
https://github.com/exercism/canonical-data-syncer/blob/7edf852ae6f4fd382be402d43dda81ee1a92e9a4/.github/bin/build#L5-L7
https://github.com/exercism/canonical-data-syncer/blob/7edf852ae6f4fd382be402d43dda81ee1a92e9a4/.github/bin/create-artifact#L8-L10

Copy link
Member

@ErikSchierboom ErikSchierboom left a comment

Choose a reason for hiding this comment

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

LGTM

@ee7 ee7 force-pushed the fetch-configlet_v3-improve-style branch from 01fca83 to 6015427 Compare January 13, 2021 11:50
@ee7 ee7 merged commit 1a97e53 into exercism:master Jan 13, 2021
@ee7 ee7 deleted the fetch-configlet_v3-improve-style branch January 13, 2021 12:01
ee7 added a commit to ee7/exercism-configlet that referenced this pull request Jan 21, 2021
Changes:
- Refactor the archive extraction logic, giving a single source of truth
  for the name of the archive and for the `curl` command.
- Use lowercase for most script-scoped variables, leaving uppercase only
  for environmental variables, and `readonly` constants that are
  declared at the top of the file.
- Prefer "${my_variable}" to "$my_variable".
- Rename a function and a variable to decrease the diff between this
  script and the version in the `exercism/github-actions` repo.
- Add and remove some quotes.
- Remove space before function parens.
- Put `then` at the end of the line.
- Remove `(` in case statements.
- Prefer `[[` to `[`.
- Move options before arguments.
- Prefer long options where possible. Long options for the remaining
  short options are either less portable or do not exist.
- Use two spaces to indent. This is consistent with the other scripts in
  this repo, as well as the version of this script in
  `exercism/github-actions`.
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.

None yet

2 participants