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

Line numbers for debug mode #105

Open
gdevenyi opened this issue Jul 20, 2018 · 3 comments
Open

Line numbers for debug mode #105

gdevenyi opened this issue Jul 20, 2018 · 3 comments

Comments

@gdevenyi
Copy link
Contributor

Possible implementation here:
https://coderwall.com/p/wil8da/debug-bash-scripts-with-line-numbers-more-info

virgilwashere added a commit to virgilwashere/bash3boilerplate that referenced this issue Jun 27, 2019
virgilwashere added a commit to virgilwashere/bash3boilerplate that referenced this issue Jun 27, 2019
@virgilwashere
Copy link

virgilwashere commented Jun 27, 2019

Expanding upon #103, I've finished the code portion of adding colour and line numbers to debug mode.

SC2235 is a legit suggestion/critique

Incidentally, this PR passes shellcheck linting on main.sh so that should help close off #107. Will add another PR for updating shellcheck installation in .travis.yml

All current tests are passing on 👷 TravisCI.

PR coming next, and then I plan to add ✅ tests to cover the expected output.

Virgil

@virgilwashere
Copy link

@kvz any idea what went wrong with the 🍏osx tests here: https://travis-ci.com/virgilwashere/bash3boilerplate/builds/117169882 ??

🐧linux passed!

This should be the extent of the changes...

dist: xenial
addons:
 homebrew:
    update: true
    packages:
      - coreutils
      - gnu-sed

and the homebrew is just moving to addons: from before_install:

virgilwashere added a commit to virgilwashere/bash3boilerplate that referenced this issue Jun 28, 2019
Need to send in TZ=UTC for test otherwise it will use current
environment variable and fail to pass diff

Closes kvz#105
virgilwashere added a commit to virgilwashere/bash3boilerplate that referenced this issue Jun 28, 2019
This is a well known function, and this commit eliminates 10 or lines of
redunandant output on each execution.

Closes kvz#105
virgilwashere added a commit to virgilwashere/bash3boilerplate that referenced this issue Jun 28, 2019
change PS4 prompt to use strftime(3) formatting
standardise timestamps to UTC
save and restore existing environment variable TZ if sourced

Closes kvz#105 kvz#107
virgilwashere added a commit to virgilwashere/bash3boilerplate that referenced this issue Jun 28, 2019
- [x] feat(debug): ✨ add color to PS4 prompt
  - [x] use `strftime(3)` formatting
  - [x] standardise timestamps to UTC
  - [x] save and restore TZ if sourced
- [x] perf(log): ⚡️ use `printf` to remove fork() to date in
  - [x] perf(debug): do not `xtrace` log function
- [x] refactor(err_report): 🔨 prevent potential ERR trap recursion
- [x] style(): 🚨 shellcheck linting to pass CI
- [x] docs(README): 👥 add @virgilwashere to authors
- [x] docs(changelog): 📝 changelog entries for debug mode

- [x] ✅ `main-debug-ps4` scenario and fixture

- kvz#103
- kvz#105
- kvz#107

----

PR created with `GitHub Pull Request` inside `vscode` 😁
virgilwashere added a commit to virgilwashere/bash3boilerplate that referenced this issue Jun 28, 2019
- [x] feat(debug): ✨ add color to PS4 prompt
  - [x] use `strftime(3)` formatting
  - [x] standardise timestamps to UTC
  - [x] save and restore TZ if sourced
- [x] perf(log): ⚡️ use `printf` to remove fork() to date in
  - [x] perf(debug): do not `xtrace` log function
- [x] refactor(err_report): 🔨 prevent potential ERR trap recursion
- [x] style(): 🚨 shellcheck linting to pass CI
- [x] docs(README): 👥 add @virgilwashere to authors
- [x] docs(changelog): 📝 changelog entries for debug mode

- [x] ✅ `main-debug-ps4` scenario and fixture

- kvz#103
- kvz#105
- kvz#107

----

PR created with `GitHub Pull Request` inside `vscode` 😁
@kvz
Copy link
Owner

kvz commented Nov 3, 2019

Left a comment in that PR 👌

virgilwashere added a commit to virgilwashere/bash3boilerplate that referenced this issue Nov 8, 2019
- [x] feat(debug): ✨ add color to PS4 prompt
  - [x] use `strftime(3)` formatting
  - [x] standardise timestamps to UTC
  - [x] save and restore TZ if sourced
- [x] perf(log): ⚡️ use `printf` to remove fork() to date in
  - [x] perf(debug): do not `xtrace` log function
- [x] refactor(err_report): 🔨 prevent potential ERR trap recursion
- [x] style(): 🚨 shellcheck linting to pass CI
- [x] docs(README): 👥 add @virgilwashere to authors
- [x] docs(changelog): 📝 changelog entries for debug mode

- [x] ✅ `main-debug-ps4` scenario and fixture

- kvz#103
- kvz#105
- kvz#107

----

PR created with `GitHub Pull Request` inside `vscode` 😁
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

No branches or pull requests

3 participants