All Projects → shellspec → shellmetrics

shellspec / shellmetrics

Licence: MIT license
Cyclomatic Complexity Analyzer for bash, mksh, zsh and POSIX shells

Programming Languages

shell
77523 projects
Makefile
30231 projects

Projects that are alternatives of or similar to shellmetrics

last fm
A simple app to demonstrate a testable, maintainable, and scalable architecture for flutter. flutter_bloc, get_it, hive, and REST API are some of the tech stacks used in this project.
Stars: ✭ 134 (+272.22%)
Mutual labels:  test
html-comment-regex
Regular expression for matching HTML comments
Stars: ✭ 15 (-58.33%)
Mutual labels:  test
ngx-testbedder
CLI tool for writing the test bed for Angular integration test
Stars: ✭ 13 (-63.89%)
Mutual labels:  test
jest-retry
Jest retry pattern for flaky E2E tests
Stars: ✭ 36 (+0%)
Mutual labels:  test
awesome-testing
Software Testing for QA.
Stars: ✭ 48 (+33.33%)
Mutual labels:  test
cypress-maildev
Cypress Maildev is a bunch of Cypress commands in order to test your messages (SMS and Emails) by using Maildev REST API.
Stars: ✭ 19 (-47.22%)
Mutual labels:  test
assert
Go 语言 assert 断言函数
Stars: ✭ 17 (-52.78%)
Mutual labels:  test
vue-testing-with-jest-conf17
Examples on how to test Vue with Jest, based on the presentation at VueConf17
Stars: ✭ 37 (+2.78%)
Mutual labels:  test
sa11y
Salesforce Automated Accessibility Testing Libraries
Stars: ✭ 58 (+61.11%)
Mutual labels:  test
phpunit-injector
Injects services from a PSR-11 dependency injection container to PHPUnit test cases
Stars: ✭ 62 (+72.22%)
Mutual labels:  test
octane-testbench
⛽ Set of utilities to test Laravel applications powered by Octane.
Stars: ✭ 35 (-2.78%)
Mutual labels:  test
lint-html-with-css
Lint HTML with CSS. A collection of CSS snippets from the hashtag #lintHTMLwithCSS on twitter. These CSS snippets intend to warn developers about common mistakes made in HTML.
Stars: ✭ 35 (-2.78%)
Mutual labels:  test
TestTarget
🐳 Notes on configuring test targets
Stars: ✭ 44 (+22.22%)
Mutual labels:  test
es-feature-detection
ECMAScript feature and API detection
Stars: ✭ 16 (-55.56%)
Mutual labels:  test
carina
Carina automation framework: Web, Mobile, API, DB etc testing...
Stars: ✭ 652 (+1711.11%)
Mutual labels:  test
J1939-Framework
Framework to work with J1939 Frames used in CAN bus in bus, car and trucks industries
Stars: ✭ 123 (+241.67%)
Mutual labels:  test
raise if
one liner `raise Exception if condition` for Python
Stars: ✭ 15 (-58.33%)
Mutual labels:  test
typescript-test-utils
Helper types for testing your package exported types
Stars: ✭ 16 (-55.56%)
Mutual labels:  test
mutode
Mutation testing for JavaScript and Node.js
Stars: ✭ 61 (+69.44%)
Mutual labels:  test
pest-plugin-laravel-octane
⛽ Pest plugin to test Laravel applications powered by Octane.
Stars: ✭ 21 (-41.67%)
Mutual labels:  test

ShellMetrics

ShellMetrics is Cyclomatic Complexity Analyzer for shell script.

Travis CI Coveralls CodeFactor Grade GitHub top language License

Requirements

ShellMetrics is written by shell script. One of the following shells is required: bash, mksh, yash, zsh

Installation

curl -fsSL https://git.io/shellmetrics > ~/bin/shellmetrics
chmod +x ~/bin/shellmetrics

or

wget https://git.io/shellmetrics -O ~/bin/shellmetrics
chmod +x ~/bin/shellmetrics

Usage

Usage: shellmetrics [options] files...

  -s, --shell           The path of shell to use as parser [default: bash]
                          Supported shells: bash, mksh, yash, zsh
      --[no-]color      Enable / Disable color [default: enabled]
      --csv             Generate CSV output
  -p, --pretty          Format pretty with wrapper function(s)
  -d, --debug           Display parsed data for debug instead of report
  -v, --version         Display the version
  -h, --help            You're looking at it

Metric values vary slightly depending on the shell used.

Example

ShellMetrics self metrics.

  • NLOC - Non-comment Lines of Code
  • LLOC - Logical Lines of Code
  • CCN - Cyclomatic Complexity number
$ shellmetrics ./shellmetrics
==============================================================================
  LLOC  CCN  Location
------------------------------------------------------------------------------
     1    1  usage:9 shellmetrics
     1    1  proxy:35 shellmetrics
     1    1  putsn:40 shellmetrics
     1    1  putsn:44 shellmetrics
     4    2  putsn:39 shellmetrics
     9    2  count:51 shellmetrics
     2    1  is_comment_line:64 shellmetrics
     2    2  is_blank_line:69 shellmetrics
     3    1  repeat_string:73 shellmetrics
     3    2  array:79 shellmetrics
     2    1  array_is_empty:86 shellmetrics
     7    2  push_array:91 shellmetrics
    11    3  pop_array:102 shellmetrics
    11    3  shift_array:119 shellmetrics
     8    3  peel:136 shellmetrics
     7    3  pretty:149 shellmetrics
     2    1  process:162 shellmetrics
    65   27  parse:167 shellmetrics
    21    8  analyze:238 shellmetrics
    56    6  default_report:274 shellmetrics
    10    4  csv_report:372 shellmetrics
     3    1  title:389 shellmetrics
     9    5  init_mode:395 shellmetrics
     9    2  main:412 shellmetrics
     4    2  error:426 shellmetrics
     2    1  abort:435 shellmetrics
     1    1  unknown:440 shellmetrics
     1    1  required:441 shellmetrics
     1    1  param:442 shellmetrics
     1    1  params:443 shellmetrics
     2    1  params_:444 shellmetrics
    20   12  parse_options:446 shellmetrics
    52    2  <main> shellmetrics
------------------------------------------------------------------------------
 1 file(s), 33 function(s) analyzed. [bash 4.4.20(1)-release]

==============================================================================
 NLOC    NLOC  LLOC    LLOC    CCN Func File (lines:comment:blank)
total     avg total     avg    avg  cnt
------------------------------------------------------------------------------
  412   12.48   332   10.06   3.18   33 shellmetrics (479:5:62)
------------------------------------------------------------------------------

==============================================================================
 NLOC    NLOC  LLOC    LLOC    CCN Func File    lines comment   blank
total     avg total     avg    avg  cnt  cnt    total   total   total
------------------------------------------------------------------------------
  412   12.48   332   10.06   3.18   33    1      479       5      62
------------------------------------------------------------------------------

Contribution

How to test

ShellMetrics tested by ShellSpec. To test, install ShellSpec and run spellspec on the project root directory.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].