Find the answer to your Linux question:
Results 1 to 4 of 4
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    code coverage tools for validating the scripts


    Is there any way to validate the coverage of the shell scripts ? i have project having lot's of shell scripting, i need to ensure static Analysis can be performed on the coverage for the shell scripts, is there any tool available ?

  2. #2
    I'm not sure what you mean by "static Analysis", but if you want to check that the syntax of the shell scripts (and they are bash/sh) are okay, you can use Bash's built-in feature:
    Code:
    bash -n script.sh;echo $?
    If the syntax is okay, a '0' will be printed. If there is something wrong with the syntax, then errors will no doubt be spewed to the terminal, and a non-zero exit status will be printed.

  3. #3

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Engineer drl's Avatar
    Join Date
    Apr 2006
    Location
    Saint Paul, MN, USA / CentOS, Debian, Slackware, {Free, Open, Net}BSD, Solaris
    Posts
    1,381
    Hi.

    A work in progress:
    https://github.com/feuerbach/loker

    and possibly not quite what you want:
    checkbashisms

    cheers, drl
    Welcome - get the most out of the forum by reading forum basics and guidelines: click here.
    90% of questions can be answered by using man pages, Quick Search, Advanced Search, Google search, Wikipedia.
    We look forward to helping you with the challenge of the other 10%.
    ( Mn, 2.6.n, AMD-64 3000+, ASUS A8V Deluxe, 1 GB, SATA + IDE, Matrox G400 AGP )

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •