Skip to content

Commit

Permalink
update to support sonarqube scanning; improved docs; add local-scan a…
Browse files Browse the repository at this point in the history
…nd godoc Makefile targets
  • Loading branch information
thisisaaronland committed Jun 24, 2022
1 parent 784f625 commit 9e8498e
Show file tree
Hide file tree
Showing 11 changed files with 37 additions and 9 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*~
config*.json
*.zip
*.zip
.scannerwork
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,9 @@ cli:
go build -mod vendor -o bin/webhookd-generate-hook cmd/webhookd-generate-hook/main.go
go build -mod vendor -o bin/webhookd-flatten-config cmd/webhookd-flatten-config/main.go
go build -mod vendor -o bin/webhookd-inflate-config cmd/webhookd-inflate-config/main.go

local-scan:
/usr/local/bin/sonar-scanner/bin/sonar-scanner -Dsonar.projectKey=go-webhookd -Dsonar.sources=. -Dsonar.host.url=http://localhost:9000 -Dsonar.login=$(TOKEN)

godoc:
godoc -http=:6060
3 changes: 2 additions & 1 deletion cmd/cmd.go
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
// package cmd provides command line tools for working with go-webhookd services.
// Package cmd provides command line tools for working with go-webhookd services.
package cmd
2 changes: 1 addition & 1 deletion config/config.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// package config provides data structures and methods for configuring a `webhookd` instance.
// Package config provides data structures and methods for configuring a `webhookd` instance.
package config

import (
Expand Down
2 changes: 1 addition & 1 deletion daemon/daemon.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// package daemon provides methods for implementing a long-running daemon to listen for and process webhooks.
// Package daemon provides methods for implementing a long-running daemon to listen for and process webhooks.
package daemon

import (
Expand Down
2 changes: 1 addition & 1 deletion dispatcher/dispatcher.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// package dispatcher provides methods for relaying webhook messages after they have been transformed.
// Package dispatcher provides methods for relaying webhook messages after they have been transformed.
package dispatcher

import (
Expand Down
2 changes: 1 addition & 1 deletion doc.go
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// package webhook implements a bucket-brigrade style webhook server where requests are relayed through a receiver, one or more transformations and one or more dispatchers each of which have interfaces and are defined using a URI-based syntax to allow for custom processing.
// Package webhookd implements a bucket-brigrade style webhook server where requests are relayed through a receiver, one or more transformations and one or more dispatchers each of which have interfaces and are defined using a URI-based syntax to allow for custom processing.
package webhookd
2 changes: 1 addition & 1 deletion receiver/receiver.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// package receiver provides an interface for the receipt of webhook messages.
// Package receiver provides an interface for the receipt of webhook messages.
package receiver

import (
Expand Down
20 changes: 20 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# must be unique in a given SonarQube instance
sonar.projectKey=go-webhookd

# --- optional properties ---

# defaults to project key
sonar.projectName=go-webhookd
# defaults to 'not provided'
#sonar.projectVersion=1.0

# Path is relative to the sonar-project.properties file. Defaults to .
#sonar.sources=.

sonar.exclusions=**/*_test.go

sonar.tests=.
sonar.test.inclusions=**/*_test.go

# Encoding of the source code. Default is default system encoding
#sonar.sourceEncoding=UTF-8
2 changes: 1 addition & 1 deletion transformation/transformation.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// package transformation provides an interface to altering (transforming) webhook messages.
// Package transformation provides an interface to altering (transforming) webhook messages.
package transformation

import (
Expand Down
2 changes: 1 addition & 1 deletion webhook/webhook.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// package webhook provides data structures and methods for definining and configuring individual webhooks.
// Package webhook provides data structures and methods for definining and configuring individual webhooks.
package webhook

import (
Expand Down

0 comments on commit 9e8498e

Please sign in to comment.