rectcircle / vscode-p3c

阿里巴巴Java编程规范 (P3C/阿里巴巴Java开发手册) VSCode 扩展 Alibaba Java Coding Guidelines VSCode implements

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

VSCode P3C

阿里巴巴Java编程规范 (P3C/阿里巴巴Java开发手册) VSCode 扩展

Alibaba Java Coding Guidelines VSCode implements

基于 Based on

路线图 Route Map

  • 实现基于 PMD XML 的配置

  • 优化分析速度,基于 LSP (语言服务器)实现

  • 细节优化

    • 支持中英双语
    • 支持自定义 fat p3c-pmd.jar
  • 支持 Quick fix

  • 实现基于 JSON 灵活的配置

    • 支持配置 各个检查项的 错误等级/是否检测
    • 支持配置 忽略目录 文件
    • 支持生成 XML 配置 (用于 maven pmd plugin)
    • 支持生成 JOSN 配置智能提示 https://github.com/SchemaStore/schemastore pull request
  • pmd xml configuration

  • Optimize analysis speed, Base on VSCode LSP

  • detail optimization

    • support chinese and english language
    • support fat p3c-pmd.jar config
  • support Quick fix

  • customize json configuration

    • config: each check item error level (e.g. error warn info)
    • config: ignore file or directory
    • generate XML config for maven-pmd-plugin
    • supper JOSN config smart suggest by pull request https://github.com/SchemaStore/schemastore pull request

Features

开箱即用的 P3C 代码规约检查,同时支持灵活配置。

Out-of-the-box P3C code protocol checking, while supporting flexible configuration.

创建配置文件 >Java P3C Checker: Create PMD RUle XML File,这个XML文件的语法参见 https://pmd.github.io/

Create configuration file >Java P3C Checker: Create PMD Rule XML File, the XML file syntax to see https://pmd.github.io/

Configuration

  • rulesets (optional): set to override default ruleset (see "Defining your own ruleset" for more details)
  • runOnFileOpen: run every time a file is opened in vscode
  • runOnFileSave: run every time a file is saved
  • runWorkspaceOnActive Will run once workspace checker on vscode started
  • priorityErrorThreshold: Determines at what priority level 'errors' will be added. Anything less will be a warning or hint
  • priorityWarnThreshold: Determines at what priority level 'warnings' will be added. Anything less will be a hint
  • showErrors: Show errors in output window
  • showStdOut: Show showStdOut in output window
  • enableCache: Creates a cache file for PMD to run faster. Will create a .pmdCache file in your workspace
  • additionalClassPaths (optional): set of paths to be appended to classpath. Used to find jar files containing custom rule definitions. Can be absolute or relative to workspace.
  • commandBufferSize Size of buffer used to collect PMD command output (MB), may need to be increased for very large projects

Developing/Contributing

Setup & Run

  1. git clone
  2. npm install
  3. debug -> "launch extension"

Legal Stuff

Copyright (c) 2003-2009, InfoEther, LLC
All rights reserved.

This product includes software developed in part by support from
the Defense Advanced Research Project Agency (DARPA)

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

The full license (BSD-style) can be found in the PMD repo

About

阿里巴巴Java编程规范 (P3C/阿里巴巴Java开发手册) VSCode 扩展 Alibaba Java Coding Guidelines VSCode implements

License:MIT License


Languages

Language:TypeScript 76.6%Language:Shell 17.5%Language:Batchfile 5.4%Language:Java 0.5%