Add gitea-vet #312

Merged
6543 merged 10 commits from 6543/go-sdk:add-gitea-vet into master 2021-08-13 14:21:18 +00:00
3 changed files with 11 additions and 2 deletions
Showing only changes of commit dd2b0aa917 - Show all commits

1
.gitignore vendored
View File

@ -18,6 +18,7 @@ _cgo_gotypes.go
_cgo_export.*
_testmain.go
/gitea-vet
*.exe
*.test

View File

@ -6,6 +6,8 @@ GITEA_SDK_TEST_URL ?= http://localhost:3000
GITEA_SDK_TEST_USERNAME ?= test01
GITEA_SDK_TEST_PASSWORD ?= test01
PACKAGE := code.gitea.io/sdk/gitea
.PHONY: all
all: clean test build
@ -33,7 +35,12 @@ fmt:
.PHONY: vet
vet:
cd gitea && $(GO) vet ./...
# Default vet
cd gitea && $(GO) vet $(PACKAGE)
# Custom vet
$(GO) get gitea.com/jolheiser/gitea-vet
6543 marked this conversation as resolved Outdated

path is now gitea.com/gitea/gitea-vet (sidenote: we should probably serve this under code.gitea.io)

path is now `gitea.com/gitea/gitea-vet` (sidenote: we should probably serve this under `code.gitea.io`)
$(GO) build gitea.com/jolheiser/gitea-vet
cd gitea && $(GO) vet -vettool=../gitea-vet $(PACKAGE)
.PHONY: lint
lint:

View File

@ -5,9 +5,10 @@
package gitea
import (
"github.com/stretchr/testify/assert"
"log"
"testing"
"github.com/stretchr/testify/assert"
)
// TestIssueComment creat a issue and test comment creation/edit/deletion on it