Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git pre-commit hook to format src. #324

Merged
merged 1 commit into from
Jun 14, 2018
Merged

Git pre-commit hook to format src. #324

merged 1 commit into from
Jun 14, 2018

Conversation

rabbah
Copy link
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.

@@ -42,6 +42,7 @@ class WskApiGwTests extends BaseApiGwTests with WskActorSystem with JsHelpers wi
val wsk: common.Wsk = new Wsk

it should "reject apimgmt actions that are invoked with not enough parameters" in {
val x = true
Copy link
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
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
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.

None yet

4 participants