---
options:
  fast:
    usage: Skip slow linters/tests
    type: bool

tasks:
  bootstrap:
    usage: Set up the app for first time use
    description: |
      Install all dependencies for building and testing the application.
    run:
      - go get -u github.com/alecthomas/gometalinter
      - go get -u github.com/golang/dep/cmd/dep
      - dep ensure

  lint:
    usage: Run the linter
    description: |
      Runs gometalinter using the configuration specified in .gometalinter.json.
    options:
      opts:
        private: true
        default:
          when:
            equal:
              fast: true
          value: --fast
    run: gometalinter --config .gometalinter.json ${opts} ./...

  test:
    usage: Run tests
    description: |
      Runs the full test suite using `go test -cover ./...`. Also runs the
      linter by default, and linter errors are considered failed tests.
    options:
      lint:
        usage: Run the linter with the tests
        default: true
        type: bool
      verbose:
        usage: Run the tests in verbose mode
        short: v
        default: false
        type: bool
      verbose_string:
        private: true
        default:
          when:
            equal:
              verbose: true
          value: -v
    run:
      - when:
          equal:
            lint: true
        task: lint
      - command: go test -cover -race ${verbose_string} ./...

---
options:
  fast:
    usage: Skip slow linters/tests
    type: bool

tasks:
  bootstrap:
    usage: Set up the app for first time use
    description: |
      Install all dependencies for building and testing the application.
    run:
      - go get -u github.com/alecthomas/gometalinter
      - gometalinter --install --update
      - go get -u github.com/golang/dep/cmd/dep
      - dep ensure

  lint:
    usage: Run the linter
    description: |
      Runs gometalinter using the configuration specified in .gometalinter.json.
    options:
      opts:
        private: true
        default:
          when:
            equal:
              fast: true
          value: --fast
    run: gometalinter --config .gometalinter.json ${opts} ./...

  test:
    usage: Run tests
    description: |
      Runs the full test suite using `go test -cover ./...`. Also runs the
      linter by default, and linter errors are considered failed tests.
    options:
      lint:
        usage: Run the linter with the tests
        default: true
        type: bool
      verbose:
        usage: Run the tests in verbose mode
        short: v
        default: false
        type: bool
      verbose_string:
        private: true
        default:
          when:
            equal:
              verbose: true
          value: -v
    run:
      - when:
          equal:
            lint: true
        task: lint
      - command: go test -cover -race ${verbose_string} ./...

Add gometalinter install to bootstrap
Add gometalinter install to bootstrap
