Skip to content

Commit 9e8498e

Browse files
author
thisisaaronland
committed
update to support sonarqube scanning; improved docs; add local-scan and godoc Makefile targets
1 parent 784f625 commit 9e8498e

File tree

11 files changed

+37
-9
lines changed

11 files changed

+37
-9
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
*~
22
config*.json
3-
*.zip
3+
*.zip
4+
.scannerwork

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,9 @@ cli:
88
go build -mod vendor -o bin/webhookd-generate-hook cmd/webhookd-generate-hook/main.go
99
go build -mod vendor -o bin/webhookd-flatten-config cmd/webhookd-flatten-config/main.go
1010
go build -mod vendor -o bin/webhookd-inflate-config cmd/webhookd-inflate-config/main.go
11+
12+
local-scan:
13+
/usr/local/bin/sonar-scanner/bin/sonar-scanner -Dsonar.projectKey=go-webhookd -Dsonar.sources=. -Dsonar.host.url=http://localhost:9000 -Dsonar.login=$(TOKEN)
14+
15+
godoc:
16+
godoc -http=:6060

cmd/cmd.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
// package cmd provides command line tools for working with go-webhookd services.
1+
// Package cmd provides command line tools for working with go-webhookd services.
2+
package cmd

config/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// package config provides data structures and methods for configuring a `webhookd` instance.
1+
// Package config provides data structures and methods for configuring a `webhookd` instance.
22
package config
33

44
import (

daemon/daemon.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// package daemon provides methods for implementing a long-running daemon to listen for and process webhooks.
1+
// Package daemon provides methods for implementing a long-running daemon to listen for and process webhooks.
22
package daemon
33

44
import (

dispatcher/dispatcher.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// package dispatcher provides methods for relaying webhook messages after they have been transformed.
1+
// Package dispatcher provides methods for relaying webhook messages after they have been transformed.
22
package dispatcher
33

44
import (

doc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
// 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.
1+
// 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.
22
package webhookd

receiver/receiver.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// package receiver provides an interface for the receipt of webhook messages.
1+
// Package receiver provides an interface for the receipt of webhook messages.
22
package receiver
33

44
import (

sonar-project.properties

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# must be unique in a given SonarQube instance
2+
sonar.projectKey=go-webhookd
3+
4+
# --- optional properties ---
5+
6+
# defaults to project key
7+
sonar.projectName=go-webhookd
8+
# defaults to 'not provided'
9+
#sonar.projectVersion=1.0
10+
11+
# Path is relative to the sonar-project.properties file. Defaults to .
12+
#sonar.sources=.
13+
14+
sonar.exclusions=**/*_test.go
15+
16+
sonar.tests=.
17+
sonar.test.inclusions=**/*_test.go
18+
19+
# Encoding of the source code. Default is default system encoding
20+
#sonar.sourceEncoding=UTF-8

transformation/transformation.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// package transformation provides an interface to altering (transforming) webhook messages.
1+
// Package transformation provides an interface to altering (transforming) webhook messages.
22
package transformation
33

44
import (

0 commit comments

Comments
 (0)