mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-23 02:35:49 +08:00
chore(ci): add linter the check go code style (#991)
* feat(ci): auto format go code * fix: fix #997 * chore(ci): add go code style linter * fix: fix cmd error * chore: add `linter` of needs * chore: modiy commnet style
This commit is contained in:
parent
a741c5179a
commit
108fdc174f
21
.github/workflows/build.yml
vendored
21
.github/workflows/build.yml
vendored
@ -57,11 +57,30 @@ jobs:
|
|||||||
go build -race -ldflags "-extldflags '-static'"
|
go build -race -ldflags "-extldflags '-static'"
|
||||||
working-directory: ./
|
working-directory: ./
|
||||||
|
|
||||||
|
linter:
|
||||||
|
name: Go-Linter
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [ go-tests ]
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: actions/setup-go@v3
|
||||||
|
with:
|
||||||
|
go-version: '^1.16.5'
|
||||||
|
|
||||||
|
# gen a dummy config file
|
||||||
|
- run: touch dummy.yml
|
||||||
|
|
||||||
|
- name: golangci-lint
|
||||||
|
uses: golangci/golangci-lint-action@v3
|
||||||
|
with:
|
||||||
|
version: latest
|
||||||
|
args: --disable-all -c dummy.yml -E=gofumpt --max-same-issues=0 --timeout 5m --modules-download-mode=mod
|
||||||
|
|
||||||
release-and-push:
|
release-and-push:
|
||||||
name: Release And Push
|
name: Release And Push
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.repository == 'casdoor/casdoor' && github.event_name == 'push'
|
if: github.repository == 'casdoor/casdoor' && github.event_name == 'push'
|
||||||
needs: [ frontend, backend ]
|
needs: [ frontend, backend, linter ]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
@ -31,7 +31,7 @@ run:
|
|||||||
- api
|
- api
|
||||||
# skip-files:
|
# skip-files:
|
||||||
# - ".*_test\\.go$"
|
# - ".*_test\\.go$"
|
||||||
modules-download-mode: vendor
|
modules-download-mode: mod
|
||||||
# all available settings of specific linters
|
# all available settings of specific linters
|
||||||
linters-settings:
|
linters-settings:
|
||||||
lll:
|
lll:
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
package conf
|
package conf
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
@ -273,6 +273,7 @@ func (c *ApiController) TokenLogout() {
|
|||||||
// representing the meta information surrounding the
|
// representing the meta information surrounding the
|
||||||
// token, including whether this token is currently active.
|
// token, including whether this token is currently active.
|
||||||
// This endpoint only support Basic Authorization.
|
// This endpoint only support Basic Authorization.
|
||||||
|
//
|
||||||
// @Param token formData string true "access_token's value or refresh_token's value"
|
// @Param token formData string true "access_token's value or refresh_token's value"
|
||||||
// @Param token_type_hint formData string true "the token type access_token or refresh_token"
|
// @Param token_type_hint formData string true "the token type access_token or refresh_token"
|
||||||
// @Success 200 {object} object.IntrospectionResponse The Response object
|
// @Success 200 {object} object.IntrospectionResponse The Response object
|
||||||
|
Loading…
x
Reference in New Issue
Block a user