Shared utilities used across Apache OpenWhisk project repositories.

Clone this repo:
  1. da454bc use python3 instead of python (#84) by David Grove · 23 hours ago master
  2. 404aa94 fix travis url (#83) by David Grove · 11 months ago
  3. 91c0e83 Include php, dotnet, typescript for scancode (#82) by Seonghyun Oh · 1 year, 3 months ago
  4. d7b65d0 chore: fix grammar, spelling and link (#80) by John Bampton · 1 year, 5 months ago
  5. acd41f0 configure github project via .asf.yaml (#79) by David Grove · 1 year, 5 months ago

Build Status License

OpenWhisk Utilities

Shared utilities used across Apache OpenWhisk project repositories.

Utility listing

The following utilities are included in this repository (by subdirectory):

  • scancode - Configurable code scanning utility that performs file and line-level checks on all files (exclusions permitted) on a provided path. It is intended for Git commit hooks and continuous integration (CI) builds to enforce certain coding conventions.

If you “push” code that follows all conventions, you will see the message:

Scanning files starting at [./mycodepath/]...
All checks passed.

However, if you push code containing tabs, trailing whitespace or missing Apache License headers, your build will fail immediately with one of the following messages:

Scan detected 3 error(s) in 1 file(s):
       1: file does not include required license header.
      18: line contains tabs.
      27: line has trailing whitespaces.

To make sure this never happens to you, you can run the same tests on your local machine every time you commit changes.

  1. Clone the OpenWhisk utilities project:
$ git clone
  1. Run the scancode utility against the root directory of your project or subdirectory where your code changes live:
# Invoke Python utility (works with either Python 2 or 3)
$ python ./openwhisk-utilities/scancode/ $ROOTDIR

It is worth adding a Git pre-commit hook to automatically run the checks before you can even type in a Git commit message. Here is a sample pre-commit file:

$ cat /path/to/openwhisk/.git/hooks/pre-commit
#!/usr/bin/env bash

# -- Code scanning --
# See
# determine openwhisk base directory
root="$(git rev-parse --show-toplevel)"
python $scancode_path/ --config $scancode_path/ASF-Release.cfg --gitignore $root/.gitignore $root

Note: A hook a locally installed, so if you check out the repository again, you will need to reinstall it.

If your project repo. is new or does not run scancode yet, you can choose to create a “pre-build” Bash script that can be included in your Travis CI integration that includes code similar to Step 1 and 2. You can invoke this script within the “.travis.yml” file early in your install or build scripts.


Report bugs, ask questions and request features here on GitHub.

You can also join our Slack channel and chat with developers. To get access to our Slack channel, request an invite here.