Project

General

Profile

Feature #20901

Run a shell linter on bash scripts and add unit tests

Added by Marco Mambelli almost 2 years ago. Updated 3 months ago.

Status:
New
Priority:
Normal
Category:
-
Target version:
Start date:
09/05/2019
Due date:
% Done:

100%

Estimated time:
(Total: 0.00 h)
Stakeholders:
Duration:

Description

There are shell linters like shellcheck that could improve the quality of the shell scripts.
Shell scripts could have unit tests too, see Bats for a framework.
Useful links:
- https://github.com/progrium/bashstyle
- https://github.com/koalaman/shellcheck
- https://github.com/sstephenson/bats

Here some more details about unit tests for shell Other unit tests:

Infos about testing:
https://www.leadingagile.com/2018/10/unit-testing-shell-scriptspart-one/
https://www.leadingagile.com/2018/10/unit-testing-shell-scriptspart-two/
https://stackoverflow.com/questions/971945/unit-testing-for-shell-scripts


Subtasks

Feature #23235: Run shellcheck linter on bash scripts automaticallyClosedLeonardo Lai

Feature #24296: Add initial unit tests for shell scriptsClosedMarco Mambelli

History

#1 Updated by Marco Mambelli over 1 year ago

  • Target version changed from v3_5 to v3_5_1

#2 Updated by Marco Mambelli 12 months ago

  • Target version changed from v3_5_1 to v3_6_1

#3 Updated by Marco Mambelli 12 months ago

  • Target version changed from v3_6_1 to v3_4_7
  • Assignee changed from Marco Mambelli to Leonardo Lai

Temporary reassignment, to provide suggestions about linting bash.

Ticket completion will include also a script to run the linter in CI.

#4 Updated by Leonardo Lai 11 months ago

  • Start date changed from 09/20/2018 to 09/05/2019
  • Due date set to 09/05/2019

due to changes in a related task: #23235

#5 Updated by Marco Mambelli 10 months ago

  • Target version changed from v3_4_7 to v3_6_1

#6 Updated by Marco Mambelli 9 months ago

  • Target version changed from v3_6_1 to v3_7

#7 Updated by Marco Mambelli 5 months ago

  • Target version changed from v3_7 to v3_7_x

#8 Updated by Marco Mambelli 4 months ago

  • Assignee changed from Leonardo Lai to Marco Mambelli
  • Description updated (diff)

#9 Updated by Marco Mambelli 4 months ago

  • Due date set to 04/08/2020

due to changes in a related task: #24296



Also available in: Atom PDF