vmd action
v0.0.7
一种用于检测代码气味和最佳实践违规的静态代码分析工具。
轻松将VUE MESS探测器集成到您的CI管道中,以接收拉动请求警报并毫不费力地显示徽章。

提示
参考:如何使用VUE MESS探测器
您可以将此操作添加为GitHub操作工作流程中的一步。这是如何使用它的示例:
name : VMD Analysis
on :
workflow_dispatch :
pull_request :
branches :
- main
push :
branches :
- main
permissions :
contents : read
pull-requests : write
jobs :
detect-mess :
runs-on : ubuntu-latest
name : Detect Vue Mess
steps :
- name : Checkout
uses : actions/checkout@v4
- uses : pnpm/action-setup@v4
name : Install pnpm
with :
run_install : false
version : ' latest ' # delete this line if you have packageManager defined in package.json
- name : Install Node.js
uses : actions/setup-node@v4
with :
node-version : 20
cache : ' pnpm '
- name : Vue Mess Detector Analysis
uses : brenoepics/[email protected] name : VMD Analysis
on :
workflow_dispatch :
pull_request :
branches :
- main
push :
branches :
- main
permissions :
contents : read
pull-requests : write
jobs :
detect-mess :
runs-on : ubuntu-latest
name : Detect Vue Mess
steps :
- name : Checkout
uses : actions/checkout@v4
- name : Install Node.js
uses : actions/setup-node@v4
with :
node-version : 20
- name : Vue Mess Detector Analysis
uses : brenoepics/[email protected] name : VMD Analysis
on :
workflow_dispatch :
pull_request :
branches :
- main
push :
branches :
- main
permissions :
contents : read
pull-requests : write
jobs :
detect-mess :
runs-on : ubuntu-latest
name : Detect Vue Mess
steps :
- name : Checkout
uses : actions/checkout@v4
- name : Install Node.js
uses : actions/setup-node@v4
with :
node-version : 20
cache : ' yarn '
- name : Vue Mess Detector Analysis
uses : brenoepics/[email protected] name : VMD Analysis
on :
workflow_dispatch :
pull_request :
branches :
- main
push :
branches :
- main
permissions :
contents : read
pull-requests : write
jobs :
detect-mess :
runs-on : ubuntu-latest
name : Detect Vue Mess
steps :
- name : Checkout
uses : actions/checkout@v4
- name : Install Bun
uses : oven-sh/setup-bun@v2
with :
bun-version : ' latest '
- name : Vue Mess Detector Analysis
uses : brenoepics/[email protected] 参见Action.yml
- uses : brenoepics/[email protected]
with :
# Personal access token (PAT) used to fetch the repository. The PAT is
# configured with the local git config, which enables your scripts to run
# authenticated git commands. The post-job step removes the PAT.
#
# We recommend using a service account with the least permissions necessary.
# Also when generating a new PAT, select the least scopes necessary.
#
# [Learn more about creating and using encrypted
# secrets](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets)
github-token : ' '
# Version of Vue Mess Detector to use. This can be a specific version number
# or 'latest' to use the most recent version available.
version : ' '
# If set to 'true', the action will skip the installation of Vue Mess Detector.
# This can be useful if Vue Mess Detector is already installed in your environment.
skipInstall : ' '
# If set to 'true', the action will skip running analysis on pull requests
# created by bots. This can help reduce unnecessary analysis runs.
skipBots : ' '
# If set to 'true', the action will post comments on pull requests with the
# results of the analysis. If set to 'false', no comments will be posted.
commentsEnabled : ' '
# The package manager to use for installing dependencies. Supported values
# are 'npm', 'yarn', 'pnpm', and 'bun'. If not specified, the action will
# attempt to detect the package manager based on the lock file present in
# the repository.
packageManager : ' '
# Additional arguments to pass to Vue Mess Detector when running the analysis.
# This can be used to customize the behavior of the analysis.
runArgs : ' '
# The entry point for Vue Mess Detector. This is the directory where the
# analysis will start. If not specified, the current directory will be used.
entryPoint : ' '
# The source directory to analyze. This should be the path to the directory
# containing the source code you want to analyze. If not specified, 'src/'
# will be used.
srcDir : ' '
# If set to 'true', the action will delete old comments on pull requests
# before posting new ones. This can help keep the comment section clean.
deleteOldComments : ' '
# If set to 'true', the action will generate a report comparing the current
# branch with the target branch. This can be useful for identifying changes
# introduced in a pull request.
relativeMode : ' ' 提示
您可以在action.yml文件中找到输入及其描述列表。
| 输入 | 描述 | 必需的 | 默认 |
|---|---|---|---|
| github token | github令牌评论拉的请求 | false | github.token |
| 版本 | VUE MESS探测器的版本 | true | latest |
| 跳过 | 跳过VUE MESS探测器的安装 | true | false |
| 跳过 | 跳过机器人的拉力请求分析 | true | true |
| 评论已找到 | 评论拉请求? | true | true |
| PackageManager | 使用的软件包管理器 | false | (探测) |
| Runargs | 争论传递给VUE MESS探测器 | false | --group=file |
| 入口点 | VUE MESS探测器的入口点 | false | ./ |
| srcdir | 来源目录进行分析 | true | src/ |
| 删除 | 删除有关拉请求的旧报告评论? | false | false |
| RelativeMode | 比较当前分支与目标(仅PR) | true | true |
我们欢迎对这个项目的贡献!请阅读我们的贡献指南,了解有关如何贡献的更多信息。
如果您发现此项目有用,请考虑在GitHub上提供一个。这有助于传播对项目的认识,是表达您支持的好方法!
该项目已根据MIT许可获得许可。