Skip to content

Commit

Permalink
add-新增NC代码规范检查功能,可支持检查是否client private public 导包存在错误.
Browse files Browse the repository at this point in the history
  • Loading branch information
ts1993 committed Feb 17, 2023
1 parent 7a5b00d commit 3ac0720
Show file tree
Hide file tree
Showing 316 changed files with 18,738 additions and 477 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ Yonyou NC5x or U8Cloud or NC6x or NCCloud or YonBIP Idea devtool Plugin
![补丁导出界面](readme/imgs/3.png "补丁导出界面")

![日志窗口](https://s1.ax1x.com/2020/11/11/BjAgvn.png "日志窗口")


![NC代码规范检查](readme/imgs/4.png "NC代码规范检查")

![重置密码](https://s1.ax1x.com/2020/11/11/BjAWD0.png "重置密码")

![数据库连接生成](https://s1.ax1x.com/2020/11/11/BjA4ET.png "数据库连接生成")
Expand Down Expand Up @@ -113,6 +115,11 @@ deleteDir=true

# 版本更新
```
<em>3.3 版本 更新:</em> <br>
<ul>
<li>1. 新增NC代码规范检查功能,可支持检查是否client private public 导包存在错误.</li>
</ul>
<em>3.1 版本 更新:</em> <br>
<ul>
<li>1. 支持导出补丁右侧选则只导出哪些模块或文件.</li>
Expand Down Expand Up @@ -215,7 +222,8 @@ deleteDir=true
部分代码 参考或使用了 部分插件开源项目的代码和功能灵感设计。
涉及到的有(列表可能不全,请谅解,实际已源码和项目为准):
IDEA plugin 官方示例项目 或 开源插件:
比如 https://github.com/SonarSource/sonarlint-intellij , https://github.com/gejun123456/intellij-generateAllSetMethod
比如 https://github.com/SonarSource/sonarlint-intellij , https://github.com/gejun123456/intellij-generateAllSetMethod
,https://github.com/jshiell/checkstyle-idea
框架比如 guava hutool 小乖乖 等等
再次感谢开源项目参与者们的无私奉献!

Expand Down
51 changes: 51 additions & 0 deletions bak/1/checkstyle-classpaths.properties

Large diffs are not rendered by default.

Binary file added bak/1/checkstyle/lib/Saxon-HE-12.0.jar
Binary file not shown.
Binary file not shown.
Binary file added bak/1/checkstyle/lib/antlr-2.7.7.jar
Binary file not shown.
Binary file added bak/1/checkstyle/lib/antlr4-runtime-4.11.1.jar
Binary file not shown.
Binary file not shown.
Binary file added bak/1/checkstyle/lib/checker-qual-3.27.0.jar
Binary file not shown.
Binary file added bak/1/checkstyle/lib/checkstyle-10.7.0.jar
Binary file not shown.
Binary file added bak/1/checkstyle/lib/commons-beanutils-1.9.4.jar
Binary file not shown.
Binary file added bak/1/checkstyle/lib/commons-cli-1.4.jar
Binary file not shown.
Binary file added bak/1/checkstyle/lib/commons-codec-1.15.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added bak/1/checkstyle/lib/failureaccess-1.0.1.jar
Binary file not shown.
Binary file added bak/1/checkstyle/lib/guava-31.1-jre.jar
Binary file not shown.
Binary file added bak/1/checkstyle/lib/httpclient-4.5.13.jar
Binary file not shown.
Binary file added bak/1/checkstyle/lib/httpclient5-5.1.3.jar
Binary file not shown.
Binary file added bak/1/checkstyle/lib/httpcore-4.4.13.jar
Binary file not shown.
Binary file added bak/1/checkstyle/lib/httpcore5-5.1.3.jar
Binary file not shown.
Binary file added bak/1/checkstyle/lib/httpcore5-h2-5.1.3.jar
Binary file not shown.
Binary file added bak/1/checkstyle/lib/icu4j-63.1.jar
Binary file not shown.
Binary file added bak/1/checkstyle/lib/j2objc-annotations-1.3.jar
Binary file not shown.
Binary file added bak/1/checkstyle/lib/javassist-3.28.0-GA.jar
Binary file not shown.
Binary file added bak/1/checkstyle/lib/jsr305-3.0.2.jar
Binary file not shown.
Binary file not shown.
Binary file added bak/1/checkstyle/lib/picocli-4.7.1.jar
Binary file not shown.
Binary file added bak/1/checkstyle/lib/reflections-0.10.2.jar
Binary file not shown.
Binary file added bak/1/checkstyle/lib/slf4j-api-1.7.32.jar
Binary file not shown.
Binary file added bak/1/checkstyle/lib/xmlresolver-4.6.0-data.jar
Binary file not shown.
Binary file added bak/1/checkstyle/lib/xmlresolver-4.6.0.jar
Binary file not shown.
Binary file modified idea_plugin_ncdevplugin.zip
Binary file not shown.
Binary file added libs/commons-codec-1.15.jar
Binary file not shown.
Binary file added libs/commons-io-2.11.0.jar
Binary file not shown.
Binary file added libs/commons-logging-1.2.jar
Binary file not shown.
File renamed without changes.
Binary file added libs/fastjson-1.2.83.jar
Binary file not shown.
Binary file added libs/httpclient-4.4.1.jar
Binary file not shown.
Binary file added libs/httpcore-4.4.1.jar
Binary file not shown.
Binary file added libs/jackson-annotations-2.10.1.jar
Binary file not shown.
Binary file added libs/jackson-annotations-2.10.5.jar
Binary file not shown.
Binary file added libs/jackson-core-2.10.1.jar
Binary file not shown.
Binary file added libs/jackson-core-2.10.5.jar
Binary file not shown.
Binary file added libs/jackson-core-asl-1.9.13.jar
Binary file not shown.
Binary file added libs/jackson-databind-2.10.1.jar
Binary file not shown.
Binary file added libs/jackson-databind-2.10.5.1.jar
Binary file not shown.
Binary file added libs/jackson-dataformat-csv-2.10.5.jar
Binary file not shown.
Binary file added libs/jackson-dataformat-xml-2.10.1.jar
Binary file not shown.
Binary file added libs/jackson-datatype-jdk8-2.10.5.jar
Binary file not shown.
Binary file added libs/jackson-datatype-jsr310-2.10.1.jar
Binary file not shown.
Binary file added libs/jackson-mapper-asl-1.9.13.jar
Binary file not shown.
Binary file added libs/jackson-module-jaxb-annotations-2.10.1.jar
Binary file not shown.
Binary file added libs/jackson-module-paranamer-2.10.5.jar
Binary file not shown.
Binary file added libs/jackson-module-scala_2.12-2.10.5.jar
Binary file not shown.
Binary file added libs/jcip-annotations-1.0.jar
Binary file not shown.
Binary file added libs/jdom-1.1.jar
Binary file not shown.
Binary file added libs/jsr305-3.0.2.jar
Binary file not shown.
Binary file added libs/log4j-1.2.17.jar
Binary file not shown.
Binary file removed libs/lombok-1.18.10.jar
Binary file not shown.
397 changes: 294 additions & 103 deletions out/production/idea_plugin_ncdevplugin/META-INF/plugin.xml

Large diffs are not rendered by default.

85 changes: 85 additions & 0 deletions out/production/idea_plugin_ncdevplugin/checkstyle-idea.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# Checkstyle-IDEA plugin configuration

checkstyle.versions.supported = \
8.0, 8.1, 8.2, 8.3, 8.5, 8.6, 8.7, 8.8, 8.10.1, 8.14, 8.16, 8.17, 8.18, \
8.20, 8.23, 8.24, 8.25, 8.26, 8.27, 8.28, 8.29, 8.30, 8.31, 8.32, 8.33, \
8.34, 8.35, 8.36.2, 8.37, 8.38, 8.39, 8.40, 8.41.1, 8.42, 8.43, 8.44, \
8.45.1, \
9.0.1, 9.1, 9.2.1, 9.3, \
10.0, 10.1, 10.2, 10.3.4, 10.4, 10.5.0, 10.6.0, 10.7.0

# The "base version" must be one of the versions listed above. The sources are compiled against this version, so it is
# the dependency shown in the IDE and the runtime used when unit tests are run from the IDE or via 'runCsaccessTests'.
baseVersion = 8.2

# Maps unsupported Checkstyle versions onto their supported alternative versions. If one of the keys in this map is
# found in the plugin configuration the value in this map is used instead. A mapping is valid only if both check
# behavior and API are compatible: https://checkstyle-addons.thomasjensen.com/checkstyle-compatibility-matrix.html
checkstyle.versions.map = \
8.4 -> 8.5, \
8.9 -> 8.10.1, 8.10 -> 8.10.1, \
8.11 -> 8.14, 8.12 -> 8.14, 8.13 -> 8.14, \
8.15 -> 8.16, \
8.19 -> 8.20, \
8.21 -> 8.23, 8.22 -> 8.23, \
8.36 -> 8.36.2, 8.36.1 -> 8.36.2, \
8.41 -> 8.41.1, \
8.45 -> 8.45.1, \
9.0 -> 9.0.1, \
9.2 -> 9.2.1, \
10.3 -> 10.3.4, \
10.3.1 -> 10.3.4, \
10.3.2 -> 10.3.4, \
10.3.3 -> 10.3.4

# Maps dependencies to compatible versions, allowing us to save archive space where the dependencies
# are sufficiently compatible.
checkstyle.dependencies.map = \
animal-sniffer-annotations-1.14.jar -> animal-sniffer-annotations-1.18.jar, \
animal-sniffer-annotations-1.17.jar -> animal-sniffer-annotations-1.18.jar, \
antlr4-runtime-4.5.2-1.jar -> antlr4-runtime-4.5.3.jar, \
antlr4-runtime-4.7.jar -> antlr4-runtime-4.7.2.jar, \
antlr4-runtime-4.7.1.jar -> antlr4-runtime-4.7.2.jar, \
antlr4-runtime-4.9.1.jar -> antlr4-runtime-4.9.3.jar, \
antlr4-runtime-4.9.2.jar -> antlr4-runtime-4.9.3.jar, \
commons-beanutils-1.9.2.jar -> commons-beanutils-1.9.4.jar, \
commons-beanutils-1.9.3.jar -> commons-beanutils-1.9.4.jar, \
commons-cli-1.3.1.jar -> commons-cli-1.4.jar, \
commons-collections-3.2.1.jar -> commons-collections-3.2.2.jar, \
error_prone_annotations-2.3.2.jar -> error_prone_annotations-2.3.4.jar, \
guava-19.0.jar -> guava-23.2-jre.jar, \
guava-21.0.jar -> guava-23.2-jre.jar, \
guava-22.0.jar -> guava-23.2-jre.jar, \
guava-23.0.jar -> guava-23.2-jre.jar, \
guava-23.6-jre.jar -> guava-29.0-jre.jar, \
guava-25.1-jre.jar -> guava-29.0-jre.jar, \
guava-26.0-jre.jar -> guava-29.0-jre.jar, \
guava-27.0.1-jre.jar -> guava-29.0-jre.jar, \
guava-27.1-jre.jar -> guava-29.0-jre.jar, \
guava-28.0-jre.jar -> guava-29.0-jre.jar, \
guava-28.1-jre.jar -> guava-29.0-jre.jar, \
guava-28.2-jre.jar -> guava-29.0-jre.jar, \
guava-30.0-jre.jar -> guava-31.1-jre.jar, \
guava-30.1.1-jre.jar -> guava-31.1-jre.jar, \
guava-31.0.1-jre.jar -> guava-31.1-jre.jar, \
picocli-3.9.0.jar -> picocli-3.9.6.jar, \
picocli-3.9.5.jar -> picocli-3.9.6.jar, \
picocli-4.0.3.jar -> picocli-4.0.4.jar, \
picocli-4.1.1.jar -> picocli-4.1.4.jar, \
picocli-4.3.1.jar -> picocli-4.3.2.jar, \
picocli-4.5.1.jar -> picocli-4.5.2.jar, \
picocli-4.6.1.jar -> picocli-4.6.3.jar, \
picocli-4.6.2.jar -> picocli-4.6.3.jar, \
Saxon-HE-9.8.0-4.jar -> Saxon-HE-9.8.0-14.jar, \
Saxon-HE-9.8.0-5.jar -> Saxon-HE-9.8.0-14.jar, \
Saxon-HE-9.8.0-7.jar -> Saxon-HE-9.8.0-14.jar, \
Saxon-HE-9.8.0-12.jar -> Saxon-HE-9.8.0-14.jar, \
Saxon-HE-9.9.0-2.jar -> Saxon-HE-9.9.1-7.jar, \
Saxon-HE-9.9.1-1.jar -> Saxon-HE-9.9.1-7.jar, \
Saxon-HE-9.9.1-2.jar -> Saxon-HE-9.9.1-7.jar, \
Saxon-HE-9.9.1-4.jar -> Saxon-HE-9.9.1-7.jar, \
Saxon-HE-9.9.1-5.jar -> Saxon-HE-9.9.1-7.jar, \
Saxon-HE-9.9.1-6.jar -> Saxon-HE-9.9.1-7.jar, \
Saxon-HE-10.2.jar -> Saxon-HE-10.6.jar, \
Saxon-HE-10.5.jar -> Saxon-HE-10.6.jar, \
Saxon-HE-10.3.jar -> Saxon-HE-10.6.jar
18 changes: 18 additions & 0 deletions out/production/idea_plugin_ncdevplugin/dtd/configuration_1_0.dtd
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- Add the following to any file that is to be validated against this DTD:
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.0//EN"
"http://www.puppycrawl.com/dtds/configuration_1_0.dtd">
-->

<!ELEMENT module (module|property)*>
<!ATTLIST module name NMTOKEN #REQUIRED>

<!ELEMENT property EMPTY>
<!ATTLIST property
name NMTOKEN #REQUIRED
value CDATA #REQUIRED
>
37 changes: 37 additions & 0 deletions out/production/idea_plugin_ncdevplugin/dtd/configuration_1_1.dtd
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- Add the following to any file that is to be validated against this DTD:
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.1//EN"
"http://www.puppycrawl.com/dtds/configuration_1_1.dtd">
-->

<!ELEMENT module (module|property|metadata)*>
<!ATTLIST module name NMTOKEN #REQUIRED>

<!ELEMENT property EMPTY>
<!ATTLIST property
name NMTOKEN #REQUIRED
value CDATA #REQUIRED
>

<!--
Used to store metadata in the Checkstyle configuration file. This
information is ignored by Checkstyle. This may be useful if you want to
store plug-in specific information.
To avoid name clashes between different tools/plug-ins you are *strongly*
encouraged to prefix all names with your domain name. For example, use the
name "com.mycompany.parameter" instead of "parameter".
The prefix "com.puppycrawl." is reserved for Checkstyle.
-->

<!ELEMENT metadata EMPTY>
<!ATTLIST metadata
name NMTOKEN #REQUIRED
value CDATA #REQUIRED
>
38 changes: 38 additions & 0 deletions out/production/idea_plugin_ncdevplugin/dtd/configuration_1_2.dtd
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- Add the following to any file that is to be validated against this DTD:
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.2//EN"
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
-->

<!ELEMENT module (module|property|metadata)*>
<!ATTLIST module name NMTOKEN #REQUIRED>

<!ELEMENT property EMPTY>
<!ATTLIST property
name NMTOKEN #REQUIRED
value CDATA #REQUIRED
default CDATA #IMPLIED
>

<!--
Used to store metadata in the Checkstyle configuration file. This
information is ignored by Checkstyle. This may be useful if you want to
store plug-in specific information.
To avoid name clashes between different tools/plug-ins you are *strongly*
encouraged to prefix all names with your domain name. For example, use the
name "com.mycompany.parameter" instead of "parameter".
The prefix "com.puppycrawl." is reserved for Checkstyle.
-->

<!ELEMENT metadata EMPTY>
<!ATTLIST metadata
name NMTOKEN #REQUIRED
value CDATA #REQUIRED
>
56 changes: 56 additions & 0 deletions out/production/idea_plugin_ncdevplugin/dtd/configuration_1_3.dtd
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- Add the following to any file that is to be validated against this DTD:
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
-->

<!ELEMENT module (module|property|metadata|message)*>
<!ATTLIST module name NMTOKEN #REQUIRED>

<!ELEMENT property EMPTY>
<!ATTLIST property
name NMTOKEN #REQUIRED
value CDATA #REQUIRED
default CDATA #IMPLIED
>

<!--
Used to store metadata in the Checkstyle configuration file. This
information is ignored by Checkstyle. This may be useful if you want to
store plug-in specific information.
To avoid name clashes between different tools/plug-ins you are *strongly*
encouraged to prefix all names with your domain name. For example, use the
name "com.mycompany.parameter" instead of "parameter".
The prefix "com.puppycrawl." is reserved for Checkstyle.
-->

<!ELEMENT metadata EMPTY>
<!ATTLIST metadata
name NMTOKEN #REQUIRED
value CDATA #REQUIRED
>

<!--
Can be used to replaced some generic Checkstyle messages with a custom
messages.
The 'key' attribute specifies for which actual Checkstyle message the
replacing should occur, look into Checkstyles message.properties for
the according message keys.
The 'value' attribute defines the custom message patterns including
message parameter placeholders as defined in the original Checkstyle
messages (again see message.properties for reference).
-->
<!ELEMENT message EMPTY>
<!ATTLIST message
key NMTOKEN #REQUIRED
value CDATA #REQUIRED
>
72 changes: 72 additions & 0 deletions out/production/idea_plugin_ncdevplugin/dtd/import_control_1_0.dtd
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- Add the following to any file that is to be validated against this DTD:
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Import Control 1.0//EN"
"http://www.puppycrawl.com/dtds/import_control_1_0.dtd">
-->

<!--
The root element of the configuration file.
-->
<!ELEMENT import-control ((allow|disallow)*,subpackage*)>

<!--
pkg - The root package to be checked. For example "com.puppycrawl".
-->
<!ATTLIST import-control
pkg NMTOKEN #REQUIRED>

<!--
Represents a subpackage of the parent element.
-->
<!ELEMENT subpackage ((allow|disallow)*,subpackage*)>

<!--
name - The name of the subpackage. For example if the name is "tools"
and the pa the parent is "com.puppycrawl", then it corresponds to the
package "com.puppycrawl.tools".
-->
<!ATTLIST subpackage
name NMTOKEN #REQUIRED>

<!--
Represents attributes for a guard which can either allow or disallow
access.
pkg - The fully qualified name of the package to guard. Cannot be
specified in conjunction with "class".
class - The fully qualified name of the class to guard. Cannot be
specified in conjunction with "pkg".
exact-match - Only valid with "pkg". Specifies whether the package
name matching should be exact. For example, the pkg
"com.puppycrawl.tools" will match the import
"com.puppycrawl.tools.checkstyle.api.*" when the option is not set,
but will not match is the option is set.
local-only - Indicates that the guard is to apply only to the current
package and not to subpackages.
-->
<!ENTITY % attlist.guard "
pkg NMTOKEN #IMPLIED
exact-match (true) #IMPLIED
class NMTOKEN #IMPLIED
local-only (true) #IMPLIED">

<!--
Represents a guard that will allow access.
-->
<!ELEMENT allow EMPTY>
<!ATTLIST allow
%attlist.guard;>

<!--
Represents a guard that will disallow access.
-->
<!ELEMENT disallow EMPTY>
<!ATTLIST disallow
%attlist.guard;>
Loading

0 comments on commit 3ac0720

Please sign in to comment.