2015-09-15 113 views
3

我試圖安裝的Checkstyle包括SevNTU Checkstyle的擴展中的IntelliJ IDEA由Checkstyle的安裝錯誤的IntelliJ IDEA

https://github.com/sevntu-checkstyle/sevntu.checkstyle/wiki/How-to-use-SevNTU-Checkstyle-in-Intellij-IDEA

然而,我當我加入配置文件sevntu-的CheckStyle默認了一個錯誤-configuration.xml:

org.infernus.idea.checkstyle.exception.CheckStylePluginException: <html><b>The Checkstyle rules file could not be loaded.</b><br> 
    cannot initialize module TreeWalker - Unable to instantiate com.github.sevntu.checkstyle.checks.design.VariableDeclarationUsageDistanceCheck<br> 
    The file has been blacklisted for 60s.</html> 
at org.infernus.idea.checkstyle.checker.CheckerFactory.blacklistAndShowMessage(CheckerFactory.java:183) 
at org.infernus.idea.checkstyle.checker.CheckerFactory.createChecker(CheckerFactory.java:139) 
at org.infernus.idea.checkstyle.checker.CheckerFactory.getOrCreateCachedChecker(CheckerFactory.java:84) 
at org.infernus.idea.checkstyle.checker.CheckerFactory.checker(CheckerFactory.java:63) 
at org.infernus.idea.checkstyle.checker.CheckerFactory.verify(CheckerFactory.java:44) 
at org.infernus.idea.checkstyle.ui.LocationDialogue.attemptLoadOfFile(LocationDialogue.java:198) 
at org.infernus.idea.checkstyle.ui.LocationDialogue.access$800(LocationDialogue.java:24) 
at org.infernus.idea.checkstyle.ui.LocationDialogue$NextAction.actionPerformed(LocationDialogue.java:241) 
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022) 
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2346) 
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402) 
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) 
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252) 
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289) 
at java.awt.Component.processMouseEvent(Component.java:6525) 
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324) 
at java.awt.Component.processEvent(Component.java:6290) 
at java.awt.Container.processEvent(Container.java:2234) 
at java.awt.Component.dispatchEventImpl(Component.java:4881) 
at java.awt.Container.dispatchEventImpl(Container.java:2292) 
at java.awt.Component.dispatchEvent(Component.java:4703) 
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4898) 
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4533) 
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4462) 
at java.awt.Container.dispatchEventImpl(Container.java:2278) 
at java.awt.Window.dispatchEventImpl(Window.java:2750) 
at java.awt.Component.dispatchEvent(Component.java:4703) 
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:751) 
at java.awt.EventQueue.access$500(EventQueue.java:97) 
at java.awt.EventQueue$3.run(EventQueue.java:702) 
at java.awt.EventQueue$3.run(EventQueue.java:696) 
at java.security.AccessController.doPrivileged(Native Method) 
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75) 
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86) 
at java.awt.EventQueue$4.run(EventQueue.java:724) 
at java.awt.EventQueue$4.run(EventQueue.java:722) 
at java.security.AccessController.doPrivileged(Native Method) 
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75) 
at java.awt.EventQueue.dispatchEvent(EventQueue.java:721) 
at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:734) 
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:565) 
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:382) 
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) 
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) 
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109) 
at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:184) 
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:229) 
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:227) 
at java.security.AccessController.doPrivileged(Native Method) 
at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:227) 
at java.awt.Dialog.show(Dialog.java:1084) 
at java.awt.Component.show(Component.java:1654) 
at java.awt.Component.setVisible(Component.java:1606) 
at java.awt.Window.setVisible(Window.java:1014) 
at java.awt.Dialog.setVisible(Dialog.java:1005) 
at org.infernus.idea.checkstyle.ui.LocationDialogue.setVisible(LocationDialogue.java:151) 
at org.infernus.idea.checkstyle.ui.CheckStyleConfigPanel$AddLocationAction.actionPerformed(CheckStyleConfigPanel.java:324) 
at org.infernus.idea.checkstyle.ui.CheckStyleConfigPanel$ToolbarAction.run(CheckStyleConfigPanel.java:399) 
at org.infernus.idea.checkstyle.ui.CheckStyleConfigPanel$ToolbarAction.run(CheckStyleConfigPanel.java:394) 
at com.intellij.ui.ToolbarDecorator$3.doAdd(ToolbarDecorator.java:433) 
at com.intellij.ui.CommonActionsPanel$Buttons.performAction(CommonActionsPanel.java:70) 
at com.intellij.ui.CommonActionsPanel$MyActionButton.actionPerformed(CommonActionsPanel.java:247) 
at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:182) 
at com.intellij.openapi.actionSystem.impl.ActionButton.a(ActionButton.java:162) 
at com.intellij.openapi.actionSystem.impl.ActionButton.a(ActionButton.java:126) 
at com.intellij.openapi.actionSystem.impl.ActionButton.processMouseEvent(ActionButton.java:303) 
at java.awt.Component.processEvent(Component.java:6290) 
at java.awt.Container.processEvent(Container.java:2234) 
at java.awt.Component.dispatchEventImpl(Component.java:4881) 
at java.awt.Container.dispatchEventImpl(Container.java:2292) 
at java.awt.Component.dispatchEvent(Component.java:4703) 
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4898) 
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4533) 
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4462) 
at java.awt.Container.dispatchEventImpl(Container.java:2278) 
at java.awt.Window.dispatchEventImpl(Window.java:2750) 
at java.awt.Component.dispatchEvent(Component.java:4703) 
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:751) 
at java.awt.EventQueue.access$500(EventQueue.java:97) 
at java.awt.EventQueue$3.run(EventQueue.java:702) 
at java.awt.EventQueue$3.run(EventQueue.java:696) 
at java.security.AccessController.doPrivileged(Native Method) 
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75) 
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86) 
at java.awt.EventQueue$4.run(EventQueue.java:724) 
at java.awt.EventQueue$4.run(EventQueue.java:722) 
at java.security.AccessController.doPrivileged(Native Method) 
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75) 
at java.awt.EventQueue.dispatchEvent(EventQueue.java:721) 
at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:734) 
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:565) 
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:382) 
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) 
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) 
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109) 
at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:184) 
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:229) 
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:227) 
at java.security.AccessController.doPrivileged(Native Method) 
at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:227) 
at java.awt.Dialog.show(Dialog.java:1084) 
at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:778) 
at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:465) 
at com.intellij.openapi.ui.DialogWrapper.invokeShow(DialogWrapper.java:1614) 
at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1571) 
at com.intellij.ide.actions.ShowSettingsUtilImpl.showSettingsDialog(ShowSettingsUtilImpl.java:114) 
at com.intellij.ide.actions.ShowSettingsAction.actionPerformed(ShowSettingsAction.java:65) 
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher$3.performAction(IdeKeyEventDispatcher.java:593) 
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:644) 
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.d(IdeKeyEventDispatcher.java:483) 
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.dispatchKeyEvent(IdeKeyEventDispatcher.java:213) 
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:538) 
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:382) 
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) 
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) 
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) 
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) 
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) 
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82) 

謝謝大家幫忙

+0

此外,我試圖遵循一些建議,但每次都得到同樣的問題 – quento

回答

2

原因你的問題是t他在當前版本的GitHub wiki document中鏈接的sevntu-checkstyle-default-configuration.xml已過時。 VariableDeclarationUsageDistance檢查已移至SevNTU Checkstyle 1.13.0的常規Checkstyle工具,因此它不再存在於SevNTU Checkstyle中。

這實際上只能由SevNTU傢伙修復,所以你可以考慮使用他們的opening an issue。在它被修復之前,我相信你最好的選擇是刪除導致文件錯誤的檢查,直到它發揮作用。

您沒有提供版本號,但您可能正在使用當前版本,這意味着Checkstyle 6.10.1和SevNTU Checkstyle 1.13.6。那些是not fully compatible。考慮使用Checkstyle-IDEA 4.17.3與SevNTU Checkstyle擴展兼容。

+1

你說得對,我使用了Checkstyle 6.10.1和SevNTU Checkstyle 1.13.6。 現在我安裝了Checkstyle-IDEA 4.17.3和SevNTU Checkstyle <1.13.0,並且沒有錯誤。謝謝你的幫助! – quento