diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bf9d945..b3dac73 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,11 +14,13 @@ jobs: steps: - name: Setup GStreamer id: setup_gstreamer - uses: blinemedical/setup-gstreamer@45324555100927b587d390d8cf3940f91fd3bdc9 + uses: RSWilli/setup-gstreamer@5472e33168ba7b1f3bb01dc81ca067e263633824 with: version: 1.22.0 - uses: actions/setup-go@v4 with: + cache-dependency-path: | + go.sum go-version: "^1.21.0" - name: checkout uses: actions/checkout@v3 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0d8b321..da0ad8a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -16,13 +16,14 @@ jobs: - name: Check formatting uses: Jerome1337/gofmt-action@v1.0.5 with: - gofmt-path: '.' - gofmt-flags: '-l -d' + gofmt-flags: "-l -d" - name: Check spellings uses: reviewdog/action-misspell@v1 with: locale: "US" fail_on_error: true - - + filter_mode: nofilter + - uses: dominikh/staticcheck-action@v1.3.0 + with: + min-go-version: "1.21" diff --git a/cmd/gst-plugin-gen/main.go b/cmd/gst-plugin-gen/main.go index 6e043e8..f6dbad9 100644 --- a/cmd/gst-plugin-gen/main.go +++ b/cmd/gst-plugin-gen/main.go @@ -123,10 +123,7 @@ var pluginTmpl = template.Must(template.New("").Funcs(template.FuncMap{ return strings.Split(ifacesString, ",") }, "extendsFromBase": func(subclass string) bool { - if strings.HasPrefix(subclass, "base.") { - return true - } - return false + return strings.HasPrefix(subclass, "base.") }, }).Parse(`// !WARNING! THIS FILE WAS GENERATED BY GST-PLUGIN-GEN !WARNING! // package main diff --git a/examples/plugins/boilerplate/boilerplate.go b/examples/plugins/boilerplate/boilerplate.go index 73417b7..6f874bd 100644 --- a/examples/plugins/boilerplate/boilerplate.go +++ b/examples/plugins/boilerplate/boilerplate.go @@ -1,3 +1,5 @@ +//lint:file-ignore U1000 Ignore all unused code, this is example code + // +plugin:Name=boilerplate // +plugin:Description=My plugin written in go // +plugin:Version=v0.0.1 diff --git a/examples/plugins/gobin/gobin.go b/examples/plugins/gobin/gobin.go index 14bba2c..e798de3 100644 --- a/examples/plugins/gobin/gobin.go +++ b/examples/plugins/gobin/gobin.go @@ -1,3 +1,5 @@ +//lint:file-ignore U1000 Ignore all unused code, this is a work in progress + // +plugin:Name=gobin // +plugin:Description=A bin element written in go // +plugin:Version=v0.0.1