Skip to content

Instantly share code, notes, and snippets.

@jbleduigou
Created February 19, 2020 21:04
Show Gist options
  • Save jbleduigou/ea21f197b46ef3bff17a0beb9aa5c97c to your computer and use it in GitHub Desktop.
Save jbleduigou/ea21f197b46ef3bff17a0beb9aa5c97c to your computer and use it in GitHub Desktop.
stage('Violations') {
steps {
// Retrieve golint tool
sh 'go get -u golang.org/x/lint/golint'
// Run golint
sh 'cd $GOPATH/src/github/jbleduigou/budgetcategorizer && golint ./...'
// Run go vet
sh 'cd $GOPATH/src/github/jbleduigou/budgetcategorizer && go vet ./... || true'
}
post {
always {
recordIssues enabledForFailure: true, tool: goLint(), qualityGates: [[threshold: 1, type: 'TOTAL', unstable: true]]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment