
如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。
只需在 AI 对话中先发送下面这句话即可:
请先完整阅读并严格遵守以下文档中的全部规则与要求:
https://xuanyuan.cloud/agents.md
在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
violations-command-line是一个用于处理静态代码分析报告的工具,能够从静态代码分析结果中查找报告文件,解析并展示内容,还可根据分析结果选择是否使命令执行失败。该工具广泛支持多种静态分析工具的报告格式,适用于代码质量监控和自动化流程集成。
以下是支持的报告器(Reporter)和对应的解析器(Parser)列表,包含使用说明:
| 报告器 | 解析器 | 说明 |
|---|---|---|
| ARM-GCC | CLANG | |
| http://developer.android.com/tools/help/lint.html | ANDROIDLINT | |
| https://github.com/thegeeklab/ansible-later | ANSIBLELATER | 使用json格式 |
| https://github.com/willthames/ansible-lint | FLAKE8 | 需带-p参数 |
| https://github.com/PyCQA/bandit | CLANG | 使用命令bandit -r examples/ -f custom -o bandit.out --msg-template "{abspath}:{line}: {severity}: {test_id}: {msg}" |
| https://clang-analyzer.llvm.org/ | CLANG | |
| http://pmd.sourceforge.net/pmd-4.3.0/cpd.html | CPD | |
| http://cppcheck.sourceforge.net/ | CPPCHECK | 使用命令cppcheck test.cpp --output-file=cppcheck.xml --xml |
| https://github.com/theandrewdavis/cpplint | CPPLINT | |
| https://github.com/CSSLint/csslint | CSSLINT | |
| http://checkstyle.sourceforge.net/ | CHECKSTYLE | |
| https://github.com/aws-cloudformation/cfn-lint | JUNIT | 使用命令cfn-lint . -f junit --output-file report-junit.xml |
| https://codeclimate.com/ | CODECLIMATE | |
| http://codenarc.sourceforge.net/ | CODENARC | |
| Coverity | COVERITY | |
| https://dart.dev/ | MACHINE | 使用命令dart analyze --format=machine |
| https://jeremylong.github.io/DependencyCheck/ | SARIF | 使用--format SARIF参数 |
| https://github.com/arturbosch/detekt | CHECKSTYLE | 使用--output-format xml参数 |
| http://dotnet.github.io/docfx/ | DOCFX | |
| Doxygen | CLANG | |
| ERB | CLANG | 使用命令erb -P -x -T '-' "${it}" | ruby -c 2>&1 >/dev/null | grep '^-' | sed -E 's/^-([a-zA-Z0-9:]+)/${filename}\1 ERROR:/p' > erbfiles.out |
| https://github.com/sindresorhus/grunt-eslint | CHECKSTYLE | 使用format: 'checkstyle'配置 |
| http://findbugs.sourceforge.net/ | FINDBUGS | |
| http://flake8.readthedocs.org/en/latest/ | FLAKE8 | |
| FxCop | FXCOP | |
| https://gcc.gnu.org/ | CLANG | |
| GHS | GHS | |
| Gendarme | GENDARME | |
| Generic reporter | GENERIC | 创建包含所有内容的单个违规记录 |
| https://github.com/golang/lint | GOLINT | |
| https://golang.org/cmd/vet/ | GOLINT | 与GoLint格式相同 |
| https://github.com/golangci/golangci-lint/ | CHECKSTYLE | 使用--out-format=checkstyle参数 |
| https://github.com/google/error-prone | GOOGLEERRORPRONE | |
| https://github.com/hadolint/hadolint/ | CHECKSTYLE | 使用-f checkstyle参数 |
| IAR | IAR | 使用--no_wrap_diagnostics参数 |
| Infer | PMD | *** Infer,使用--pmd-xml参数 |
| JACOCO | JACOCO | |
| https://github.com/jCoderZ/fawkez/wiki/JcReport | JCREPORT | |
| JSHint | JSLINT | 使用--reporter=jslint,或使用CHECKSTYLE解析器配合--reporter=checkstyle |
| https://junit.org/junit4/ | JUNIT | 仅包含失败记录 |
| https://github.com/shyiko/ktlint | CHECKSTYLE | |
| Klocwork | KLOCWORK | |
| https://github.com/JetBrains/kotlin | KOTLINGRADLE | Kotlin Gradle插件输出 |
| https://github.com/JetBrains/kotlin | KOTLINMAVEN | Kotlin Maven插件输出 |
| Lint | LINT | 多种检查工具使用的通用XML格式 |
| MSBuildLog | MSBULDLOG | 使用-fileLogger时,需将`.*msbuild\.log# violations-command-line Docker镜像文档 |
violations-command-line是一个用于处理静态代码分析报告的工具,能够从静态代码分析结果中查找报告文件,解析并展示内容,还可根据分析结果选择是否使命令执行失败。该工具广泛支持多种静态分析工具的报告格式,适用于代码质量监控和自动化流程集成。
以下是支持的报告器(Reporter)和对应的解析器(Parser)列表,包含使用说明:
| 报告器 | 解析器 | 说明 |
|---|---|---|
| ARM-GCC | CLANG | |
| http://developer.android.com/tools/help/lint.html | ANDROIDLINT | |
| https://github.com/thegeeklab/ansible-later | ANSIBLELATER | 使用json格式 |
| https://github.com/willthames/ansible-lint | FLAKE8 | 需带-p参数 |
| https://github.com/PyCQA/bandit | CLANG | 使用命令bandit -r examples/ -f custom -o bandit.out --msg-template "{abspath}:{line}: {severity}: {test_id}: {msg}" |
| https://clang-analyzer.llvm.org/ | CLANG | |
| http://pmd.sourceforge.net/pmd-4.3.0/cpd.html | CPD | |
| http://cppcheck.sourceforge.net/ | CPPCHECK | 使用命令cppcheck test.cpp --output-file=cppcheck.xml --xml |
| https://github.com/theandrewdavis/cpplint | CPPLINT | |
| https://github.com/CSSLint/csslint | CSSLINT | |
| http://checkstyle.sourceforge.net/ | CHECKSTYLE | |
| https://github.com/aws-cloudformation/cfn-lint | JUNIT | 使用命令cfn-lint . -f junit --output-file report-junit.xml |
| https://codeclimate.com/ | CODECLIMATE | |
| http://codenarc.sourceforge.net/ | CODENARC | |
| Coverity | COVERITY | |
| https://dart.dev/ | MACHINE | 使用命令dart analyze --format=machine |
| https://jeremylong.github.io/DependencyCheck/ | SARIF | 使用--format SARIF参数 |
| https://github.com/arturbosch/detekt | CHECKSTYLE | 使用--output-format xml参数 |
| http://dotnet.github.io/docfx/ | DOCFX | |
| Doxygen | CLANG | |
| ERB | CLANG | 使用命令erb -P -x -T '-' "${it}" | ruby -c 2>&1 >/dev/null | grep '^-' | sed -E 's/^-([a-zA-Z0-9:]+)/${filename}\1 ERROR:/p' > erbfiles.out |
| https://github.com/sindresorhus/grunt-eslint | CHECKSTYLE | 使用format: 'checkstyle'配置 |
| http://findbugs.sourceforge.net/ | FINDBUGS | |
| http://flake8.readthedocs.org/en/latest/ | FLAKE8 | |
| FxCop | FXCOP | |
| https://gcc.gnu.org/ | CLANG | |
| GHS | GHS | |
| Gendarme | GENDARME | |
| Generic reporter | GENERIC | 创建包含所有内容的单个违规记录 |
| https://github.com/golang/lint | GOLINT | |
| https://golang.org/cmd/vet/ | GOLINT | 与GoLint格式相同 |
| https://github.com/golangci/golangci-lint/ | CHECKSTYLE | 使用--out-format=checkstyle参数 |
| https://github.com/google/error-prone | GOOGLEERRORPRONE | |
| https://github.com/hadolint/hadolint/ | CHECKSTYLE | 使用-f checkstyle参数 |
| IAR | IAR | 使用--no_wrap_diagnostics参数 |
| Infer | PMD | *** Infer,使用--pmd-xml参数 |
| JACOCO | JACOCO | |
| https://github.com/jCoderZ/fawkez/wiki/JcReport | JCREPORT | |
| JSHint | JSLINT | 使用--reporter=jslint,或使用CHECKSTYLE解析器配合--reporter=checkstyle |
| https://junit.org/junit4/ | JUNIT | 仅包含失败记录 |
| https://github.com/shyiko/ktlint | CHECKSTYLE | |
| Klocwork | KLOCWORK | |
| https://github.com/JetBrains/kotlin | KOTLINGRADLE | Kotlin Gradle插件输出 |
| https://github.com/JetBrains/kotlin | KOTLINMAVEN | Kotlin Maven插件输出 |
| Lint | LINT | 多种检查工具使用的通用XML格式 |
| MSBuildLog | MSBULDLOG | 使用-fileLogger时,需将作为模式,或使用-fl -flp:logfile=MyProjectOutput.log;verbosity=diagnostic自定义输出文件名 |
| MSCpp | MSCPP | |
| https://pypi.python.org/pypi/mccabe | FLAKE8 | |
| https://pypi.python.org/pypi/mypy-lang | MYPY | |
| https://github.com/uber/NullAway | GOOGLEERRORPRONE | 与Google Error Prone格式相同 |
| PCLint | PCLINT | PC-Lint使用与Jenkins警告插件相同的输出格式,https://wiki.jenkins.io/display/JENKINS/PcLint+options |
| https://github.com/squizlabs/PHP_CodeSniffer | CHECKSTYLE | 使用phpcs api.php --report=checkstyle命令 |
| PHPPMD | PMD | 使用phpmd api.php xml ruleset.xml命令 |
| https://pmd.github.io/ | PMD | |
| https://github.com/PyCQA/pycodestyle | FLAKE8 | |
| https://github.com/Perl-Critic | PERLCRITIC | |
| PiTest | PITEST | |
| https://github.com/yoheimuta/protolint | PROTOLINT | |
| Puppet-Lint | CLANG | 使用-log-format %{fullpath}:%{line}:%{column}: %{kind}: %{message}参数 |
| https://pypi.python.org/pypi/pydocstyle | PYDOCSTYLE | |
| https://pypi.python.org/pypi/pyflakes | FLAKE8 | |
| PyLint | PYLINT | 使用pylint --output-format=parseable命令 |
| https://www.jetbrains.com/resharper/ | RESHARPER | |
| http://rubocop.readthedocs.io/en/latest/formatters/ | CLANG | 使用rubycop -f clang file.rb命令 |
| https://github.com/oasis-tcs/sarif-spec | SARIF | v2.x版本。Microsoft Visual C#可使用ErrorLog="BuildErrors.sarif,version=2"生成 |
| http://www.scala-sbt.org/ | SBTSCALAC | |
| Scalastyle | CHECKSTYLE | |
| https://semgrep.dev/ | SEMGREP | 使用--json参数 |
| Simian | SIMIAN | |
| https://www.sonarqube.org/ | SONAR | 使用mvn sonar:sonar -Dsonar.analysis.mode=preview -Dsonar.report.export.path=sonar-report.json命令(SonarQube 7.7后移除该功能,可通过curl --silent 'http://sonar-server/api/issues/search?componentKeys=unique-key&resolved=false' | jq -f sonar-report-builder.jq > sonar-report.json获取) |
| https://spotbugs.github.io/ | FINDBUGS | |
| StyleCop | STYLECOP | |
| https://github.com/realm/SwiftLint | CHECKSTYLE | 使用--reporter checkstyle参数 |
| https://palantir.github.io/tslint/usage/cli/ | CHECKSTYLE | 使用-t checkstyle参数 |
| Valgrind | VALGRIND | 使用--xml=yes参数 |
| XMLLint | XMLLINT | |
| XUnit | XUNIT | 仅包含失败记录 |
| https://yamllint.readthedocs.io/en/stable/index.html | YAMLLINT | 使用-f parsable参数 |
| https://pypi.python.org/pypi/zptlint | ZPTLINT |
目前工具支持52种解析器和79种报告器。如缺少所需格式,请在此处提交issue:https://github.com/tomasbjerre/violations-lib/issues%E3%80%82
详细文档参见:https://github.com/tomasbjerre/violations-command-line
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务