Skip to content

Git pre-commit hook to format src.#324

Merged
dubee merged 1 commit intoapache:masterfrom
rabbah:githook
Jun 14, 2018
Merged

Git pre-commit hook to format src.#324
dubee merged 1 commit intoapache:masterfrom
rabbah:githook

Conversation

@rabbah
Copy link
Copy Markdown
Member

@rabbah rabbah commented Jun 11, 2018

Adds a pre-commit hook script to format go src.

Sample hook:

> cat .git/hooks/pre-commit
#!/usr/bin/env bash

set -e

# format all scala soruce
$OPENWHISK_HOME/tools/git/pre-commit-scalafmt-native.sh

# format all go source
ROOT_DIR="$(git rev-parse --show-toplevel)"
$ROOT_DIR/tools/git/pre-commit-gofmt.sh

# scan all other files for conformance
python $OPENWHISK_UTILS_HOME/scancode/scanCode.py --config $OPENWHISK_UTILS_HOME/scancode/ASF-Release.cfg "$ROOT_DIR"

@mrutkows perhaps we should add the scala formatting and pre-commit hooks to the utils repo so that there is a canonical place for these to be accessed from all the repos.

Related to #324.

val wsk: common.Wsk = new Wsk

it should "reject apimgmt actions that are invoked with not enough parameters" in {
val x = true
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure where x is used

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure where that came from! removed. thanks.

@rabbah
Copy link
Copy Markdown
Member Author

rabbah commented Jun 14, 2018

@dubee @mdeuser if you're ok with the PR can you approve and merge?

@dubee dubee merged commit a4ca79a into apache:master Jun 14, 2018
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

Successfully merging this pull request may close these issues.

4 participants