-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
99 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
directory: ./ | ||
file_types: | ||
- .go | ||
- .yaml | ||
- .yml | ||
languages: | ||
- Chinese |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: Go Typecheck Workflow Test | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
comment-language-detector: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Code Language Detector | ||
uses: kubecub/typecheck@latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: Language Check Workflow Test | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
comment-language-detector: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Code Language Detector | ||
uses: kubecub/[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Type Check | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
comment-language-detector: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: '^1.21' | ||
|
||
- name: Install typecheck | ||
run: | | ||
go install github.com/kubecub/typecheck@latest | ||
- name: Run typecheck Detector | ||
run: typecheck |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,3 +19,6 @@ | |
|
||
# Go workspace file | ||
go.work | ||
|
||
typecheck | ||
bin/typecheck |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Copyright © 2024 KubeCub open source community. All rights reserved. | ||
# Licensed under the MIT License (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
|
||
name: 'Code Language Detector' | ||
description: 'Detects specified languages in comments within code files.' | ||
inputs: | ||
go-version: | ||
description: 'The version of Go to use for running the detector.' | ||
required: true | ||
default: '1.21' | ||
detector-version: | ||
description: 'The version of the Comment Language Detector to install.' | ||
required: false | ||
default: 'latest' | ||
config-path: | ||
description: 'Path to the configuration file for the detector.' | ||
required: false | ||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ${{ inputs.go-version }} | ||
|
||
- name: Install Comment Language Detector | ||
run: go install github.com/kubecub/typecheck@${{ inputs.detector-version }} | ||
shell: bash | ||
|
||
- name: Run Comment Language Detector | ||
run: typecheck | ||
shell: bash | ||
|
||
branding: | ||
icon: 'search' | ||
color: 'blue' |