apolopena / gitpod-laravel-starter

Configurable LAMP or LEMP stack starter project powered by Laravel and Gitpod. Supports Laravel 6, 7, and 8. Out of the box support for React, Vue, and Bootstrap frontends, with or without built-in auth .
https://github.com/apolopena/gitpod-laravel-starter/wiki
MIT License
40 stars 44 forks source link

♻️ REFACTOR: bash scripts to pass shellcheck #93

Closed apolopena closed 3 years ago

apolopena commented 3 years ago

Problem this feature will solve

The bash scripts for this starter need code coverage. The first step before unit tests is to get them to pass a linter (shellcheck).

Background

Linting the codebase is an essential step in writing clean, solid code.

Proposed Solution

Refactor all the starter scripts to pass the shellcheck linter

Constraints and Assumptions

Just the command line shellcheck will be used to to limitation of the shellcheck IDE extension (see issue 88) Depends on https://github.com/apolopena/gitpod-laravel8-starter/issues/88 The following files will be refactored.

.gp/bash/spinner.sh
.gp/bash/init-optional-scaffolding.sh
.gp/bash/change-passwords.sh
.gp/bash/before-tasks.sh
.gp/bash/scaffold-project.sh
.gp/bash/update-composer.sh
.gp/bash/helpers.sh
.gp/bash/init-project.sh
.gp/bash/third-party/bash-spinner/spinner.sh
.gp/bash/init-react-example.sh
.gp/bash/init-rake-tasks.sh
.gp/bash/init-gitpod.sh
.gp/bash/workspace-init-logger.sh
.gp/bash/init-phpmyadmin.sh
.gp/bash/init-complete.sh
.gp/bash/utils.sh
.gp/snippets/browser-functions.sh
.gp/snippets/server-functions.sh

~Snippets (files with no extension) should be refactored too allthough they not be included in this refactor because they may be refactored in a way that gives them an extension so they dont have to be treated specially .gp/snippets/browser-functions .gp/snippet/server-functions~

Alternatives or Workarounds

Additional context

~File with no extension will need their own command~ Relates to https://github.com/apolopena/gitpod-laravel8-starter/issues/98

apolopena commented 3 years ago

Fixed and pretty with a --verbose option. image