本文介绍了Checkstyle的问题:创建格式化程序配置文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我下载了大学的checkstyle插件,以便按照教授的要求检查代码。我们得到了一个xml配置文件,并使用另一个checkstyle配置(首选项-> Checkstyle-> New ...)创建了该文件。同时,我将其设置为默认值。现在,我们必须创建一个自动格式化程序,例如 Rightclick项目-> Checkstyle->创建格式化程序配置文件。现在,我从eclipse中弹出一条消息,消息为:
在发生内部错误: transformCheckstyle。
org / eclipse / jdt / internal / ui / preferences / PreferencesAccess

I downloaded the checkstyle plugin for university in order to check the code like my professor wants it. We got an xml configuration file and i created with that another checkstyle configuration (Preferences -> Checkstyle -> New...) Also I set it as default. Now we have to create an automatic formatter like "Rightclick project -> Checkstyle -> Create Formatter-profile". Now I get an problem popup from eclipse with the message:"An internal error occurred during: "transformCheckstyle".org/eclipse/jdt/internal/ui/preferences/PreferencesAccess

这是日志中的完整错误消息:

This is the full error message from the log:

!ENTRY org.eclipse.core.jobs 4 2 2018-12-02 16:42:24.496
!MESSAGE An internal error occurred during: "transformCheckstyle".
!STACK 0
java.lang.NoClassDefFoundError: org/eclipse/jdt/internal/ui/preferences/PreferencesAccess
    at net.sf.eclipsecs.core.transformer.FormatterConfigWriter.writeCleanupSettings(FormatterConfigWriter.java:95)
    at net.sf.eclipsecs.core.transformer.FormatterConfigWriter.writeSettings(FormatterConfigWriter.java:89)
    at net.sf.eclipsecs.core.transformer.FormatterConfigWriter.<init>(FormatterConfigWriter.java:81)
    at net.sf.eclipsecs.core.transformer.CheckstyleTransformer.transformRules(CheckstyleTransformer.java:124)
    at net.sf.eclipsecs.core.jobs.TransformCheckstyleRulesJob.runInWorkspace(TransformCheckstyleRulesJob.java:117)
    at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:42)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
!SESSION 2018-12-02 16:44:15.808 -----------------------------------------------
eclipse.buildId=4.9.0.I20180906-0745
java.version=1.8.0_191
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=de_DE
Framework arguments:  -product org.eclipse.epp.package.java.product
Command-line arguments:  -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.java.product


推荐答案

CheckStyle似乎将删除该功能。这就是开发人员所说的话。

It looks like CheckStyle will be removing that feature. Here is what the developer said.

格式化程序配置文件生成功能已无法维护
几年了。剩下2个选择:

The formatter-profile generating functionality has gone unmaintained for several years now. This leaves 2 options:


  1. 一起删除此功能2.有人加紧进行修复

由于它现在已经坏掉,我将为下一个
版本(8.19)选择第一个替代方案。

Since its broken right now, I'll go for the first alternative for the next release (8.19).

这篇关于Checkstyle的问题:创建格式化程序配置文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-09 17:27