debug: 去除 qodana,添加 检查
This commit is contained in:
parent
7d680aeb87
commit
34c6ea1a8b
63
.github/workflows/checkstyle.xml
vendored
Normal file
63
.github/workflows/checkstyle.xml
vendored
Normal file
|
@ -0,0 +1,63 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE module PUBLIC
|
||||
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
|
||||
"https://checkstyle.org/dtds/configuration_1_3.dtd">
|
||||
|
||||
<module name="Checker">
|
||||
<!-- 设置换行符 -->
|
||||
<property name="lineSeparator" value="lf"/>
|
||||
|
||||
<!-- 检查文件头部 -->
|
||||
<module name="FileTabCharacter">
|
||||
<property name="eachLine" value="true"/>
|
||||
</module>
|
||||
|
||||
<!-- 检查文件的末尾是否有换行符 -->
|
||||
<module name="NewlineAtEndOfFile"/>
|
||||
|
||||
<!-- 检查缩进是否使用空格而不是 Tab -->
|
||||
<module name="Checker">
|
||||
<property name="fileExtensions" value="java"/>
|
||||
<module name="Indentation">
|
||||
<property name="basicOffset" value="4"/>
|
||||
<property name="braceAdjustment" value="0"/>
|
||||
<property name="caseIndent" value="4"/>
|
||||
<property name="throwsIndent" value="4"/>
|
||||
<property name="lineWrappingIndentation" value="4"/>
|
||||
</module>
|
||||
</module>
|
||||
|
||||
<!-- 检查代码中的注释 -->
|
||||
<module name="Checker">
|
||||
<property name="fileExtensions" value="java"/>
|
||||
<module name="TreeWalker">
|
||||
<module name="JavadocMethod"/>
|
||||
<module name="JavadocVariable"/>
|
||||
<module name="JavadocStyle"/>
|
||||
</module>
|
||||
</module>
|
||||
|
||||
<!-- 检查空白行 -->
|
||||
<module name="Checker">
|
||||
<property name="fileExtensions" value="java"/>
|
||||
<module name="TreeWalker">
|
||||
<module name="EmptyLineSeparator">
|
||||
<property name="tokens" value="CLASS_DEF,INTERFACE_DEF,ENUM_DEF,METHOD_DEF,CTOR_DEF"/>
|
||||
</module>
|
||||
</module>
|
||||
</module>
|
||||
|
||||
<!-- 检查行长度 -->
|
||||
<module name="Checker">
|
||||
<property name="fileExtensions" value="java"/>
|
||||
<module name="TreeWalker">
|
||||
<module name="LineLength">
|
||||
<property name="max" value="120"/>
|
||||
<property name="ignorePattern" value="^import .*"/>
|
||||
</module>
|
||||
</module>
|
||||
</module>
|
||||
|
||||
<!-- 其他规则可以根据需要添加 -->
|
||||
|
||||
</module>
|
4
.github/workflows/code-check.yaml
vendored
4
.github/workflows/code-check.yaml
vendored
|
@ -30,5 +30,5 @@ jobs:
|
|||
- name: Super-linter
|
||||
uses: super-linter/super-linter@v6.3.1
|
||||
env:
|
||||
# To report GitHub Actions status checks
|
||||
GITHUB_TOKEN: ${{ secrets.MyGitHubToken }}
|
||||
GITHUB_TOKEN: ${{ secrets.MyGitHubToken }}
|
||||
CHECKSTYLE_FILTER_PATH: ".github/workflows/checkstyle.xml"
|
41
qodana.yaml
41
qodana.yaml
|
@ -1,41 +0,0 @@
|
|||
#-------------------------------------------------------------------------------#
|
||||
# Qodana analysis is configured by qodana.yaml file #
|
||||
# https://www.jetbrains.com/help/qodana/qodana-yaml.html #
|
||||
#-------------------------------------------------------------------------------#
|
||||
version: "1.0"
|
||||
#Specify inspection profile for code analysis
|
||||
profile:
|
||||
name: qodana.starter
|
||||
#Enable inspections
|
||||
#include:
|
||||
# - name: <SomeEnabledInspectionId>
|
||||
#Disable inspections
|
||||
#exclude:
|
||||
# - name: <SomeDisabledInspectionId>
|
||||
# paths:
|
||||
# - <path/where/not/run/inspection>
|
||||
projectJDK: 17 #(Applied in CI/CD pipeline)
|
||||
#Execute shell command before Qodana execution (Applied in CI/CD pipeline)
|
||||
#bootstrap: sh ./prepare-qodana.sh
|
||||
#Install IDE plugins before Qodana execution (Applied in CI/CD pipeline)
|
||||
#plugins:
|
||||
# - id: <plugin.id> #(plugin id can be found at https://plugins.jetbrains.com)
|
||||
#Specify Qodana linter for analysis (Applied in CI/CD pipeline)
|
||||
linter: jetbrains/qodana-jvm:latest
|
||||
include:
|
||||
- name: ClassLoaderInstantiation
|
||||
- name: NonThreadSafeLazyInitialization
|
||||
- name: DoubleBraceInitialization
|
||||
- name: JavaLangImport
|
||||
- name: UNUSED_IMPORT
|
||||
- name: SamePackageImport
|
||||
- name: ArgNamesErrorsInspection
|
||||
- name: ArgNamesWarningsInspection
|
||||
- name: AssertMessageNotString
|
||||
- name: EqualsCalledOnEnumConstant
|
||||
- name: ListIndexOfReplaceableByContains
|
||||
- name: ObjectsEqualsCanBeSimplified
|
||||
- name: SizeReplaceableByIsEmpty
|
||||
- name: ArrayCreationWithoutNewKeyword
|
||||
exclude:
|
||||
- name: VulnerableLibrariesLocal
|
Loading…
Reference in New Issue
Block a user