jshiell / checkstyle-idea Goto Github PK
View Code? Open in Web Editor NEWCheckStyle plug-in for IntelliJ IDEA
Home Page: https://plugins.jetbrains.com/plugin/1065-checkstyle-idea
License: Other
CheckStyle plug-in for IntelliJ IDEA
Home Page: https://plugins.jetbrains.com/plugin/1065-checkstyle-idea
License: Other
Errors from CheckStyle (e.g. invalid file) are currently badly handled. The user
should receive some suitable feedback for these.
It would be nice to have a button (or context menu) to check-style "all" OR
"selected" items in the idea search results.
This looks to be in the CheckStyle code, but may be something we're passing it.
org.infernus.idea.checkstyle.exception.CheckStylePluginException: The inspection could not be executed.
at org.infernus.idea.checkstyle.CheckStylePlugin.processError(CheckStylePlugin.java:340)
at org.infernus.idea.checkstyle.CheckStyleInspection.scanFile(CheckStyleInspection.java:255)
at org.infernus.idea.checkstyle.CheckStyleInspection.checkFile(CheckStyleInspection.java:208)
at com.intellij.codeInspection.LocalInspectionTool$1.visitFile(LocalInspectionTool.java:129)
at com.intellij.psi.impl.source.PsiJavaFileBaseImpl.accept(PsiJavaFileBaseImpl.java:406)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.a(LocalInspectionsPass.java:403)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.access$400(LocalInspectionsPass.java:76)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass$3.process(LocalInspectionsPass.java:379)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass$3.process(LocalInspectionsPass.java:373)
at com.intellij.concurrency.JobUtil$2$1.run(JobUtil.java:117)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:218)
at com.intellij.concurrency.JobUtil$2.process(JobUtil.java:115)
at com.intellij.concurrency.JobUtil$1.run(JobUtil.java:57)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at com.intellij.concurrency.PrioritizedFutureTask.access$101(PrioritizedFutureTask.java:31)
at com.intellij.concurrency.PrioritizedFutureTask$1.run(PrioritizedFutureTask.java:70)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1053)
at com.intellij.concurrency.PrioritizedFutureTask.run(PrioritizedFutureTask.java:97)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.NullPointerException
at com.puppycrawl.tools.checkstyle.Checker.fireAuditStarted(Checker.java:455)
at com.puppycrawl.tools.checkstyle.Checker.process(Checker.java:248)
at org.infernus.idea.checkstyle.CheckStyleInspection.scanFile(CheckStyleInspection.java:239)
... 21 more
What steps will reproduce the problem?
What is the expected output? What do you see instead?
Plug-in lever message. System error.
What version of the product are you using? On what operating system?
Idea 8.0, Latest version of plug-in.
Please provide any additional information below.
I just thought that invalid file may be disabled in the list with relevant comment
added to it on user's click to the file. E.g.
CSIssue.java : 2 item(s) - does not exist
I installed CheckStyle plugin 3.8.1 in fresh installation of IDEA Community Edition 11.1.1 (current) and 11.0.2 (previous)
In Settings menu there is no additional configuration tab for CheckStyle (see http://imgur.com/TMBMY).
Environment:
ubuntu 2.6.31-23-generic-pae
java version "1.6.0_31"
Java(TM) SE Runtime Environment (build 1.6.0_31-b04)
Java HotSpot(TM) Server VM (build 20.6-b01, mixed mode
Error occurred when I tried running check style. What have I done: I clicked "Check Files In the Current Changelist."
Stack trace:
An error occurred while scanning a file.: An error occurred during a file scan. org.infernus.idea.checkstyle.exception.CheckStylePluginException: An error occurred during a file scan. at org.infernus.idea.checkstyle.CheckStylePlugin.processError(CheckStylePlugin.java:340) at org.infernus.idea.checkstyle.checker.CheckFilesThread.run(CheckFilesThread.java:75) Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: cannot initialize module TreeWalker - Unable to instantiate DoubleCheckedLocking at com.puppycrawl.tools.checkstyle.Checker.setupChild(Checker.java:178) at com.puppycrawl.tools.checkstyle.api.AutomaticBean.configure(AutomaticBean.java:184) at org.infernus.idea.checkstyle.checker.CheckerFactory$CheckerFactoryWorker.run(CheckerFactory.java:293) Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: Unable to instantiate DoubleCheckedLocking at com.puppycrawl.tools.checkstyle.PackageObjectFactory.createModule(PackageObjectFactory.java:155) at com.puppycrawl.tools.checkstyle.TreeWalker.setupChild(TreeWalker.java:161) at com.puppycrawl.tools.checkstyle.api.AutomaticBean.configure(AutomaticBean.java:184) at com.puppycrawl.tools.checkstyle.Checker.setupChild(Checker.java:157) ... 2 more Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: Unable to instantiate DoubleCheckedLockingCheck at com.puppycrawl.tools.checkstyle.PackageObjectFactory.doMakeObject(PackageObjectFactory.java:98) at com.puppycrawl.tools.checkstyle.PackageObjectFactory.createModule(PackageObjectFactory.java:152) ... 5 more
We use an external file for our HeaderFile Regex. We include it as follows:
<module name="RegexpHeader">
<property name="headerFile" value="java.header"/>
<property name="charset" value="UTF-8"/>
</module>
In the file "java.header" we use Non-Iso characters. Also, all our Java-Files are in UTF-8.
If I use ant to run checkstyle with the above configuration, it reports no errors. If I use checkstyle-idea, however, checkstyle reports errors in the form "Line does not match expected header line of ...". I can only guess that checkstyle-idea does either not respect the "charset" setting in Regexp Header (see above) or it does not recognize our Java-Files to be UTF-8 encoded.
IDEA 12.0.1
CheckStyle-IDEA 4.0
Today i got a new version, and time to time i get this npe (previous version was ok):
Checker could not be created.
java.lang.NullPointerException
at org.infernus.idea.checkstyle.CheckStyleInspection.moduleClassPathBuilder(CheckStyleInspection.java:81)
at org.infernus.idea.checkstyle.CheckStyleInspection.getChecker(CheckStyleInspection.java:69)
at org.infernus.idea.checkstyle.CheckStyleInspection.scanFile(CheckStyleInspection.java:221)
at org.infernus.idea.checkstyle.CheckStyleInspection.checkFile(CheckStyleInspection.java:212)
at com.intellij.codeInspection.LocalInspectionTool$1.visitFile(LocalInspectionTool.java:143)
at com.intellij.psi.impl.source.PsiCodeFragmentImpl.accept(PsiCodeFragmentImpl.java:178)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.a(LocalInspectionsPass.java:411)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.a(LocalInspectionsPass.java:369)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.access$100(LocalInspectionsPass.java:78)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass$2.process(LocalInspectionsPass.java:328)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass$2.process(LocalInspectionsPass.java:306)
at com.intellij.concurrency.JobLauncherImpl$2$1.run(JobLauncherImpl.java:115)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:232)
at com.intellij.concurrency.JobLauncherImpl$2.process(JobLauncherImpl.java:113)
at com.intellij.concurrency.JobLauncherImpl$1.run(JobLauncherImpl.java:54)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at com.intellij.concurrency.PrioritizedFutureTask.access$101(PrioritizedFutureTask.java:31)
at com.intellij.concurrency.PrioritizedFutureTask$1.run(PrioritizedFutureTask.java:70)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1155)
at com.intellij.concurrency.PrioritizedFutureTask.run(PrioritizedFutureTask.java:97)
at com.intellij.concurrency.JobImpl.scheduleAndWaitForResults(JobImpl.java:136)
at com.intellij.concurrency.JobLauncherImpl.a(JobLauncherImpl.java:68)
at com.intellij.concurrency.JobLauncherImpl.invokeConcurrentlyUnderProgress(JobLauncherImpl.java:110)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.a(LocalInspectionsPass.java:305)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.a(LocalInspectionsPass.java:219)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.collectInformationWithProgress(LocalInspectionsPass.java:136)
at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:58)
at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:62)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1$1.run(PassExecutorService.java:357)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1155)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1.run(PassExecutorService.java:348)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:232)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.a(PassExecutorService.java:345)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:321)
at com.intellij.concurrency.JobLauncherImpl$3.call(JobLauncherImpl.java:129)
at com.intellij.concurrency.JobLauncherImpl$3.call(JobLauncherImpl.java:126)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at com.intellij.concurrency.PrioritizedFutureTask.access$101(PrioritizedFutureTask.java:31)
at com.intellij.concurrency.PrioritizedFutureTask$1.run(PrioritizedFutureTask.java:70)
at com.intellij.concurrency.PrioritizedFutureTask.run(PrioritizedFutureTask.java:113)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
What steps will reproduce the problem
What is the expected output? Please provide any additional information below.
It would be nice to have magic buttons that would allow re-checking single
file or a list of selected "problematic" files without loosing the rest of
the style check results and without having to re-run the style check
completely. A sort of "refresh".
Idea 12.x running latest plugin on Mac
prior to updating to latest plugin I had setup the checkstyle inspection to report at a custom severity level that I had set to a custom color so I can tell the difference between checkstyle issues, warnings, and true errors
Now with the latest plugin everything is being reported as a regular error, my custom severity level is being ignored
Any idea on how I can get my custom severity level back?
Currently, the plugin only allows checkstyle to warn at one severity level (set in the Inspections project settings), but checkstyle supports multiple severities: ignore, info, warning, and error.
It would be great if there was a mapping between those four levels and IDEA levels, where the default might probably be something like:
Checkstyle error => IDEA error
Checkstyle warning => IDEA warning
Checkstyle info => IDEA info
Checkstyle ignore => suppress
And maybe it would be cool if there was a way to override this, so that you could make Checkstyle infos into IDEA weak warnings, or Checkstyle warnings to IDEA errors, or whatever you like.
What steps will reproduce the problem?
Expected result:
Dialog window with the "checkstyle.header.file" property.
Actual result:
Empty dialog window.
Version 3.4.1.
I'm not able to define the "checkstyle.header.file" property. And there is the following text in IDEA's error log:
org.infernus.idea.checkstyle.exception.CheckStylePluginException: An error occurred during a file scan.
at org.infernus.idea.checkstyle.CheckStylePlugin.processError(CheckStylePlugin.java:426)
at org.infernus.idea.checkstyle.checker.CheckFilesThread.run(CheckFilesThread.java:72)
Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: cannot initialize module RegexpHeader - unable to load header file Property 'checkstyle.header.file' has no value defined in the configuration.
at com.puppycrawl.tools.checkstyle.Checker.setupChild(Checker.java:178)
at com.puppycrawl.tools.checkstyle.api.AutomaticBean.configure(AutomaticBean.java:184)
at org.infernus.idea.checkstyle.checker.CheckerFactory$CheckerFactoryWorker.run(CheckerFactory.java:288)
Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: unable to load header file Property 'checkstyle.header.file' has no value defined in the configuration.
at com.puppycrawl.tools.checkstyle.checks.header.AbstractHeaderCheck.loadHeaderFile(AbstractHeaderCheck.java:109)
at com.puppycrawl.tools.checkstyle.checks.header.AbstractHeaderCheck.finishLocalSetup(AbstractHeaderCheck.java:189)
at com.puppycrawl.tools.checkstyle.api.AutomaticBean.configure(AutomaticBean.java:180)
at com.puppycrawl.tools.checkstyle.Checker.setupChild(Checker.java:157)
... 2 more
Caused by: java.io.FileNotFoundException: Property 'checkstyle.header.file' has no value defined in the configuration. (The system cannot find the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(FileInputStream.java:106)
at java.io.FileInputStream.(FileInputStream.java:66)
at com.puppycrawl.tools.checkstyle.checks.header.AbstractHeaderCheck.loadHeaderFile(AbstractHeaderCheck.java:104)
... 5 more
checkstyle.xml
8.0 KB Download
Checkstyle itself will run on non-java files, for things like line length etc. At the moment if you use the plugin, if you go to a non-java plugin, the "Play" (Check current file) is disabled, and I think they also don't show up on check modified files.
Would it be possible to enable this?
I tend to utilise changelists pretty heavily. I normally create one changelist per tracker item, and in addition I keep a few permanent changelists with local changes that I don't want to commit.
It would be very helpful if Checkstyle panel had an action/button to quickly run a check against the files in the current changelist (or, if possible, integrate it into context menu of "local changes" panel, and add an action to check any selected changelist).
Received the following stacktrace after commiting some files with the "Scan with Checkstyle" pre-commit option checked.
IntelliJ 11.1.3
java version "1.6.0_24"
OpenJDK Runtime Environment (IcedTea6 1.11.3) (6b24-1.11.3-1ubuntu0.12.04.1)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)
Read access is allowed from event dispatch thread or inside read-action only (see com.intellij.openapi.application.Application.runReadAction())
Details: Current thread: Thread[Thread-15,4,Idea Thread Group] 795657317
Our dispatch thread:Thread[AWT-EventQueue-1 11.1.3#IU-117.798, eap:false,6,Idea Thread Group] 1559127116
SystemEventQueueThread: Thread[AWT-EventQueue-1 11.1.3#IU-117.798, eap:false,6,Idea Thread Group] 1559127116
java.lang.Throwable
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:61)
at com.intellij.openapi.application.impl.ApplicationImpl.assertReadAccessAllowed(ApplicationImpl.java:932)
at com.intellij.psi.impl.file.impl.FileManagerImpl.findFile(FileManagerImpl.java:314)
at com.intellij.psi.impl.file.PsiBinaryFileImpl.isValid(PsiBinaryFileImpl.java:253)
at org.infernus.idea.checkstyle.checker.FileScanner.checkPsiFile(FileScanner.java:120)
at org.infernus.idea.checkstyle.checker.FileScanner.run(FileScanner.java:59)
at org.infernus.idea.checkstyle.checker.ScanFilesThread.runFileScanner(ScanFilesThread.java:61)
at org.infernus.idea.checkstyle.checker.AbstractCheckerThread.processFilesForModuleInfoAndScan(AbstractCheckerThread.java:131)
at org.infernus.idea.checkstyle.checker.ScanFilesThread.run(ScanFilesThread.java:46)java.lang.Throwable
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:61)
at com.intellij.openapi.application.impl.ApplicationImpl.assertReadAccessAllowed(ApplicationImpl.java:932)
at com.intellij.psi.impl.file.impl.FileManagerImpl.findFile(FileManagerImpl.java:314)
at com.intellij.psi.impl.file.PsiBinaryFileImpl.isValid(PsiBinaryFileImpl.java:253)
at com.intellij.openapi.module.ModuleUtil.findModuleForPsiElement(ModuleUtil.java:108)
at org.infernus.idea.checkstyle.checker.FileScanner.checkPsiFile(FileScanner.java:130)
at org.infernus.idea.checkstyle.checker.FileScanner.run(FileScanner.java:59)
at org.infernus.idea.checkstyle.checker.ScanFilesThread.runFileScanner(ScanFilesThread.java:61)
at org.infernus.idea.checkstyle.checker.AbstractCheckerThread.processFilesForModuleInfoAndScan(AbstractCheckerThread.java:131)
at org.infernus.idea.checkstyle.checker.ScanFilesThread.run(ScanFilesThread.java:46)java.lang.Throwable
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:61)
at com.intellij.openapi.application.impl.ApplicationImpl.assertReadAccessAllowed(ApplicationImpl.java:932)
at com.intellij.psi.impl.file.impl.FileManagerImpl.findFile(FileManagerImpl.java:314)
at com.intellij.psi.impl.file.PsiBinaryFileImpl.isValid(PsiBinaryFileImpl.java:253)
at org.infernus.idea.checkstyle.checker.FileScanner.checkPsiFile(FileScanner.java:120)
at org.infernus.idea.checkstyle.checker.FileScanner.run(FileScanner.java:59)
at org.infernus.idea.checkstyle.checker.ScanFilesThread.runFileScanner(ScanFilesThread.java:61)
at org.infernus.idea.checkstyle.checker.AbstractCheckerThread.processFilesForModuleInfoAndScan(AbstractCheckerThread.java:131)
at org.infernus.idea.checkstyle.checker.ScanFilesThread.run(ScanFilesThread.java:46)java.lang.Throwable
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:61)
at com.intellij.openapi.application.impl.ApplicationImpl.assertReadAccessAllowed(ApplicationImpl.java:932)
at com.intellij.psi.impl.file.impl.FileManagerImpl.findFile(FileManagerImpl.java:314)
at com.intellij.psi.impl.file.PsiBinaryFileImpl.isValid(PsiBinaryFileImpl.java:253)
at com.intellij.openapi.module.ModuleUtil.findModuleForPsiElement(ModuleUtil.java:108)
at org.infernus.idea.checkstyle.checker.FileScanner.checkPsiFile(FileScanner.java:130)
at org.infernus.idea.checkstyle.checker.FileScanner.run(FileScanner.java:59)
at org.infernus.idea.checkstyle.checker.ScanFilesThread.runFileScanner(ScanFilesThread.java:61)
at org.infernus.idea.checkstyle.checker.AbstractCheckerThread.processFilesForModuleInfoAndScan(AbstractCheckerThread.java:131)
at org.infernus.idea.checkstyle.checker.ScanFilesThread.run(ScanFilesThread.java:46)
''''
What steps will reproduce the problem?
What is the expected output? What do you see instead?
Load spread across CPU cores
What version of the product are you using? On what operating system?
Checkstyle plugin 3.1.2
Intellij 10.0.3
Mac OS 10.6.6
Please provide any additional information below.
Also, the scan seems to take much longer than running checkstyle from Ant.
I use mercurial
I realize that this isn't the most helpful bug report, but I wanted to make it anyway. After upgrading from 1.8.4 to 1.9: Fixed. I'm running IJ 11.1 on OSX. The exception is below and let me know if you need any additional information.
Checker could not be created.: cannot initialize module TreeWalker - Unable to instantiate DoubleCheckedLocking
com.puppycrawl.tools.checkstyle.api.CheckstyleException: cannot initialize module TreeWalker - Unable to instantiate DoubleCheckedLocking
at com.puppycrawl.tools.checkstyle.Checker.setupChild(Checker.java:178)
at com.puppycrawl.tools.checkstyle.api.AutomaticBean.configure(AutomaticBean.java:184)
at org.infernus.idea.checkstyle.checker.CheckerFactory$CheckerFactoryWorker.run(CheckerFactory.java:293)
Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: Unable to instantiate DoubleCheckedLocking
at com.puppycrawl.tools.checkstyle.PackageObjectFactory.createModule(PackageObjectFactory.java:155)
at com.puppycrawl.tools.checkstyle.TreeWalker.setupChild(TreeWalker.java:161)
at com.puppycrawl.tools.checkstyle.api.AutomaticBean.configure(AutomaticBean.java:184)
at com.puppycrawl.tools.checkstyle.Checker.setupChild(Checker.java:157)
... 2 more
Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: Unable to instantiate DoubleCheckedLockingCheck
at com.puppycrawl.tools.checkstyle.PackageObjectFactory.doMakeObject(PackageObjectFactory.java:98)
at com.puppycrawl.tools.checkstyle.PackageObjectFactory.createModule(PackageObjectFactory.java:152)
... 5 more
org.infernus.idea.checkstyle.exception.CheckStylePluginException: The inspection could not be executed.
at org.infernus.idea.checkstyle.CheckStylePlugin.processError(CheckStylePlugin.java:340)
at org.infernus.idea.checkstyle.CheckStyleInspection.scanFile(CheckStyleInspection.java:258)
at org.infernus.idea.checkstyle.CheckStyleInspection.checkFile(CheckStyleInspection.java:208)
at com.intellij.codeInspection.LocalInspectionTool$1.visitFile(LocalInspectionTool.java:129)
at com.intellij.psi.impl.source.PsiJavaFileBaseImpl.accept(PsiJavaFileBaseImpl.java:406)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.a(LocalInspectionsPass.java:403)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.access$400(LocalInspectionsPass.java:76)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass$3.process(LocalInspectionsPass.java:379)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass$3.process(LocalInspectionsPass.java:373)
at com.intellij.concurrency.JobUtil$2$1.run(JobUtil.java:117)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:218)
at com.intellij.concurrency.JobUtil$2.process(JobUtil.java:115)
at com.intellij.concurrency.JobUtil$1.run(JobUtil.java:57)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at com.intellij.concurrency.PrioritizedFutureTask.access$101(PrioritizedFutureTask.java:31)
at com.intellij.concurrency.PrioritizedFutureTask$1.run(PrioritizedFutureTask.java:70)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1053)
at com.intellij.concurrency.PrioritizedFutureTask.run(PrioritizedFutureTask.java:97)
at com.intellij.concurrency.JobImpl.scheduleAndWaitForResults(JobImpl.java:136)
at com.intellij.concurrency.JobUtil.a(JobUtil.java:71)
at com.intellij.concurrency.JobUtil.invokeConcurrentlyUnderProgress(JobUtil.java:112)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.a(LocalInspectionsPass.java:389)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.a(LocalInspectionsPass.java:225)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.collectInformationWithProgress(LocalInspectionsPass.java:134)
at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:58)
at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:61)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1$1.run(PassExecutorService.java:350)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1053)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1.run(PassExecutorService.java:342)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:218)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.a(PassExecutorService.java:340)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:316)
at com.intellij.concurrency.JobUtil$3.call(JobUtil.java:134)
at com.intellij.concurrency.JobUtil$3.call(JobUtil.java:131)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at com.intellij.concurrency.PrioritizedFutureTask.access$101(PrioritizedFutureTask.java:31)
at com.intellij.concurrency.PrioritizedFutureTask$1.run(PrioritizedFutureTask.java:70)
at com.intellij.concurrency.PrioritizedFutureTask.run(PrioritizedFutureTask.java:113)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: cannot initialize module TreeWalker - Unable to instantiate DoubleCheckedLocking
at com.puppycrawl.tools.checkstyle.Checker.setupChild(Checker.java:178)
at com.puppycrawl.tools.checkstyle.api.AutomaticBean.configure(AutomaticBean.java:184)
at org.infernus.idea.checkstyle.checker.CheckerFactory$CheckerFactoryWorker.run(CheckerFactory.java:293)
Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: Unable to instantiate DoubleCheckedLocking
at com.puppycrawl.tools.checkstyle.PackageObjectFactory.createModule(PackageObjectFactory.java:155)
at com.puppycrawl.tools.checkstyle.TreeWalker.setupChild(TreeWalker.java:161)
at com.puppycrawl.tools.checkstyle.api.AutomaticBean.configure(AutomaticBean.java:184)
at com.puppycrawl.tools.checkstyle.Checker.setupChild(Checker.java:157)
... 2 more
Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: Unable to instantiate DoubleCheckedLockingCheck
at com.puppycrawl.tools.checkstyle.PackageObjectFactory.doMakeObject(PackageObjectFactory.java:98)
at com.puppycrawl.tools.checkstyle.PackageObjectFactory.createModule(PackageObjectFactory.java:152)
... 5 more
What steps will reproduce the problem?
What is the expected output? What do you see instead?
Expect: OK
Get: "The location could not be loaded"
What version of the product are you using? On what operating system?
Checkstyle-IDEA 3.1
IDEA 9.0.3 (build 95.214)
Ubuntu Linux 9.10 x86_64 kernel 2.6.31-22-generic
It appears the plugin is not correctly checking paths for properties before trying to use them. For example, we have the following in our checkstyle.xml:
<module name="SuppressionFilter">
<property name="file" value="${config_loc}/suppressions.xml"/>
</module>
I have set the value for config_loc to be the path to the directory containing suppressions.xml and it does not appear to be honored.
If I replace ${config_loc} with the path directly in the checkstyle.xml, everything works as expected.
Just updated and the real-time scan marks all Checkstyle violations as errors, even though I had it set to show them as warnings in the inspections config.
Not sure if this is by design or a regression.
It looks like the configuration file is cached into memory. Because changes to that file are only applied after restarting Intellij.
Granted, it doesn't happen often this file will be modified. Except for people investigating what checks should be enabled and disabled for a project. :-)
I'm using Intellij IDEA 11.1.1 Build #IU-117.117, JDK: 1.6.0_07
After plugin installation and IDE restart, I get the following exception:
[Lcom/puppycrawl/tools/checkstyle/api/SeverityLevel;
java.lang.NoClassDefFoundError: [Lcom/puppycrawl/tools/checkstyle/api/SeverityLevel;
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
at java.lang.Class.getDeclaredMethod(Class.java:1935)
at java.awt.Component.isCoalesceEventsOverriden(Component.java:5726)
at java.awt.Component.access$100(Component.java:162)
at java.awt.Component$2.run(Component.java:5680)
at java.awt.Component$2.run(Component.java:5678)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Component.checkCoalescing(Component.java:5677)
at java.awt.Component.(Component.java:5646)
at java.awt.Container.(Container.java:245)
at javax.swing.JComponent.(JComponent.java:581)
at javax.swing.JPanel.(JPanel.java:65)
at javax.swing.JPanel.(JPanel.java:78)
at org.infernus.idea.checkstyle.toolwindow.ToolWindowPanel.(ToolWindowPanel.java:95)
at org.infernus.idea.checkstyle.CheckStylePlugin.registerToolWindow(CheckStylePlugin.java:183)
at org.infernus.idea.checkstyle.CheckStylePlugin.projectOpened(CheckStylePlugin.java:211)
at com.intellij.openapi.project.impl.ProjectImpl.c(ProjectImpl.java:400)
at com.intellij.openapi.project.impl.ProjectImpl.access$200(ProjectImpl.java:74)
at com.intellij.openapi.project.impl.ProjectImpl$MyProjectManagerListener.projectOpened(ProjectImpl.java:435)
at com.intellij.openapi.project.impl.ProjectManagerImpl$2.projectOpened(ProjectManagerImpl.java:153)
at com.intellij.openapi.project.impl.ProjectManagerImpl.d(ProjectManagerImpl.java:1077)
at com.intellij.openapi.project.impl.ProjectManagerImpl.openProject(ProjectManagerImpl.java:418)
at com.intellij.openapi.project.impl.ProjectManagerImpl.loadAndOpenProject(ProjectManagerImpl.java:484)
at com.intellij.ide.impl.ProjectUtil.openProject(ProjectUtil.java:175)
at com.intellij.ide.RecentProjectsManager.doOpenProject(RecentProjectsManager.java:44)
at com.intellij.ide.RecentProjectsManagerBase$MyAppLifecycleListener.appStarting(RecentProjectsManagerBase.java:322)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.util.messages.impl.MessageBusConnectionImpl.deliverMessage(MessageBusConnectionImpl.java:110)
at com.intellij.util.messages.impl.MessageBusImpl.doPumpMessages(MessageBusImpl.java:220)
at com.intellij.util.messages.impl.MessageBusImpl.pumpMessages(MessageBusImpl.java:212)
at com.intellij.util.messages.impl.MessageBusImpl.sendMessage(MessageBusImpl.java:202)
at com.intellij.util.messages.impl.MessageBusImpl.access$000(MessageBusImpl.java:42)
at com.intellij.util.messages.impl.MessageBusImpl$2.invoke(MessageBusImpl.java:128)
at $Proxy43.appStarting(Unknown Source)
at com.intellij.idea.IdeaApplication.c(IdeaApplication.java:238)
at com.intellij.idea.IdeaApplication.access$400(IdeaApplication.java:53)
at com.intellij.idea.IdeaApplication$IdeStarter$2.run(IdeaApplication.java:212)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:333)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:699)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:538)
at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:420)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:378)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
Caused by: java.lang.ClassNotFoundException: com.puppycrawl.tools.checkstyle.api.SeverityLevel PluginClassLoader[CheckStyle-IDEA, 3.8.4]
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:77)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
... 54 more
07/12/2011 15:30:04.917 [0x0-0x200200].com.jetbrains.intellij: at java.awt.EventQueue.invokeAndWait(EventQueue.java:1073)
07/12/2011 15:30:04.917 [0x0-0x200200].com.jetbrains.intellij: - locked <000000000d97b868> (a java.awt.EventQueue$1AWTInvocationLock)
07/12/2011 15:30:04.917 [0x0-0x200200].com.jetbrains.intellij: at javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1326)
07/12/2011 15:30:04.917 [0x0-0x200200].com.jetbrains.intellij: at org.infernus.idea.checkstyle.util.ScannableFile.fileOpenOrUnsaved(ScannableFile.java:109)
07/12/2011 15:30:04.917 [0x0-0x200200].com.jetbrains.intellij: at org.infernus.idea.checkstyle.util.ScannableFile.(ScannableFile.java:42)
07/12/2011 15:30:04.917 [0x0-0x200200].com.jetbrains.intellij: at org.infernus.idea.checkstyle.CheckStyleInspection.checkFile(CheckStyleInspection.java:206)
07/12/2011 15:30:04.917 [0x0-0x200200].com.jetbrains.intellij: at com.intellij.codeInspection.LocalInspectionTool$1.visitFile(LocalInspectionTool.java:129)
07/12/2011 15:30:04.917 [0x0-0x200200].com.jetbrains.intellij: at com.intellij.psi.impl.source.PsiJavaFileBaseImpl.accept(PsiJavaFileBaseImpl.java:396)
07/12/2011 15:30:04.917 [0x0-0x200200].com.jetbrains.intellij: at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.a(LocalInspectionsPass.java:392)
07/12/2011 15:30:04.917 [0x0-0x200200].com.jetbrains.intellij: at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.a(LocalInspectionsPass.java:344)
07/12/2011 15:30:04.917 [0x0-0x200200].com.jetbrains.intellij: at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.access$100(LocalInspectionsPass.java:76)
07/12/2011 15:30:04.917 [0x0-0x200200].com.jetbrains.intellij: at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass$1.process(LocalInspectionsPass.java:311)
07/12/2011 15:30:04.917 [0x0-0x200200].com.jetbrains.intellij: at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass$1.process(LocalInspectionsPass.java:294)
It would be very helpful to be able to group results by package or
severity. As a committer for a fairly large project, sometimes I just need
to see the in the package the team I'm committing for owns. Additionally,
for large projects, there are so many results, it would be nice to group
the issues by severity. BTW, I built off of the trunk and find the
enhancement created to filter by severity very valuable.
We have a custom Checkstyle ruleset that contains the following check:
<module name="RegexpHeader">
<metadata name="Description"
value="Validates standard header for each source file."/>
<property name="header"
value="^/\s_$\n^ _ $Id.$$\n^ _\s$\n^ _ Copyright (c) \d\d\d\d (Example), Inc.\s_$\n^ _ All rights reserved.\s$"/>
</module>
Ever since upgrading to version 3.8 of Checkstyle-IDEA, I get the following exception whenever I try and perform a scan. We are using Checkstyle 5.4 in our build (not 5.5 as the plugin now does), but as far as I can tell the configuration for this check has not changed.
An error occurred while scanning a file.: An error occurred during a file scan.
org.infernus.idea.checkstyle.exception.CheckStylePluginException: An error occurred during a file scan.
at org.infernus.idea.checkstyle.CheckStylePlugin.processError(CheckStylePlugin.java:385)
at org.infernus.idea.checkstyle.checker.CheckFilesThread.run(CheckFilesThread.java:74)
Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: missing key 'headerFile' in RegexpHeader
at com.puppycrawl.tools.checkstyle.DefaultConfiguration.getAttribute(DefaultConfiguration.java:74)
at org.infernus.idea.checkstyle.checker.CheckerFactory$CheckerFactoryWorker.checkFilenameForProperty(CheckerFactory.java:345)
at org.infernus.idea.checkstyle.checker.CheckerFactory$CheckerFactoryWorker.replaceSuppressionFilterPath(CheckerFactory.java:334)
at org.infernus.idea.checkstyle.checker.CheckerFactory$CheckerFactoryWorker.run(CheckerFactory.java:289)
This should say 5.6.
In multi-file environments it would be handy to show the file being used for scanning.
CheckStyle module options should allow disabling of checks for a particular
module.
Hi,
I am new to Intellij IDEA and to this plugin. Currently I am migrating my checkstyle settings xml which I was using in Eclipse to IDEA. Below is the stack trace which I am getting when I click on check current file option.
An error occurred while scanning a file.: An error occurred during a file scan.
org.infernus.idea.checkstyle.exception.CheckStylePluginException: An error occurred during a file scan.
at org.infernus.idea.checkstyle.CheckStylePlugin.processError(CheckStylePlugin.java:340)
at org.infernus.idea.checkstyle.checker.CheckFilesThread.run(CheckFilesThread.java:75)
Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: cannot initialize module TreeWalker - Unable to instantiate DoubleCheckedLocking
at com.puppycrawl.tools.checkstyle.Checker.setupChild(Checker.java:178)
at com.puppycrawl.tools.checkstyle.api.AutomaticBean.configure(AutomaticBean.java:184)
at org.infernus.idea.checkstyle.checker.CheckerFactory$CheckerFactoryWorker.run(CheckerFactory.java:293)
Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: Unable to instantiate DoubleCheckedLocking
at com.puppycrawl.tools.checkstyle.PackageObjectFactory.createModule(PackageObjectFactory.java:155)
at com.puppycrawl.tools.checkstyle.TreeWalker.setupChild(TreeWalker.java:161)
at com.puppycrawl.tools.checkstyle.api.AutomaticBean.configure(AutomaticBean.java:184)
at com.puppycrawl.tools.checkstyle.Checker.setupChild(Checker.java:157)
... 2 more
Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: Unable to instantiate DoubleCheckedLockingCheck
at com.puppycrawl.tools.checkstyle.PackageObjectFactory.doMakeObject(PackageObjectFactory.java:98)
at com.puppycrawl.tools.checkstyle.PackageObjectFactory.createModule(PackageObjectFactory.java:152)
... 5 more
Apparently they've changed the API.
Here's the stacktrace
com.intellij.openapi.vcs.impl.CheckinHandlersManager.getInstance(Lcom/intellij/openapi/project/Project;)Lcom/intellij/openapi/vcs/impl/CheckinHandlersManager;: com.intellij.openapi.vcs.impl.CheckinHandlersManager.getInstance(Lcom/intellij/openapi/project/Project;)Lcom/intellij/openapi/vcs/impl/CheckinHandlersManager;
java.lang.NoSuchMethodError: com.intellij.openapi.vcs.impl.CheckinHandlersManager.getInstance(Lcom/intellij/openapi/project/Project;)Lcom/intellij/openapi/vcs/impl/CheckinHandlersManager;
at org.infernus.idea.checkstyle.CheckStylePlugin.registerCheckInHandler(CheckStylePlugin.java:279)
at org.infernus.idea.checkstyle.CheckStylePlugin.projectOpened(CheckStylePlugin.java:255)
at com.intellij.openapi.project.impl.ProjectImpl.c(ProjectImpl.java:381)
at com.intellij.openapi.project.impl.ProjectImpl.access$200(ProjectImpl.java:76)
at com.intellij.openapi.project.impl.ProjectImpl$MyProjectManagerListener.projectOpened(ProjectImpl.java:416)
at com.intellij.openapi.project.impl.ProjectManagerImpl$2.projectOpened(ProjectManagerImpl.java:150)
at com.intellij.openapi.project.impl.ProjectManagerImpl.d(ProjectManagerImpl.java:1018)
at com.intellij.openapi.project.impl.ProjectManagerImpl.openProject(ProjectManagerImpl.java:405)
at com.intellij.openapi.project.impl.ProjectManagerImpl.loadAndOpenProject(ProjectManagerImpl.java:464)
at com.intellij.ide.impl.ProjectUtil.openProject(ProjectUtil.java:161)
at com.intellij.ide.RecentProjectsManager.doOpenProject(RecentProjectsManager.java:47)
at com.intellij.ide.RecentProjectsManagerBase$MyAppLifecycleListener.appStarting(RecentProjectsManagerBase.java:301)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.util.messages.impl.MessageBusConnectionImpl.deliverMessage(MessageBusConnectionImpl.java:110)
at com.intellij.util.messages.impl.MessageBusImpl.doPumpMessages(MessageBusImpl.java:220)
at com.intellij.util.messages.impl.MessageBusImpl.pumpMessages(MessageBusImpl.java:212)
at com.intellij.util.messages.impl.MessageBusImpl.sendMessage(MessageBusImpl.java:202)
at com.intellij.util.messages.impl.MessageBusImpl.access$000(MessageBusImpl.java:42)
at com.intellij.util.messages.impl.MessageBusImpl$2.invoke(MessageBusImpl.java:128)
at $Proxy45.appStarting(Unknown Source)
at com.intellij.idea.IdeaApplication.c(IdeaApplication.java:257)
at com.intellij.idea.IdeaApplication.access$400(IdeaApplication.java:57)
at com.intellij.idea.IdeaApplication$IdeStarter$2.run(IdeaApplication.java:214)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:333)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:677)
at java.awt.EventQueue.access$000(EventQueue.java:85)
at java.awt.EventQueue$1.run(EventQueue.java:638)
at java.awt.EventQueue$1.run(EventQueue.java:636)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:647)
at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:686)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:534)
at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:416)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:374)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
What steps will reproduce the problem?
What is the expected output? What do you see instead?
I would expect view all folders or have an option to view all folders including hidden
What version of the product are you using? On what operating system?
3.6.2 checkstyle-idea
111.167 intellij
ubuntu 11.10
Please provide any additional information below.
I have changing the default setting of the desktop file viewer to display hidden files by default. No change
I have tried ctrl + h in the dialog window. no change
this issue was originally raised at http://code.google.com/p/checkstyle-idea/issues/detail?id=105, raising here after i noticed the project has moved.
The inspection could not be executed.: The inspection could not be executed.
org.infernus.idea.checkstyle.exception.CheckStylePluginException: The inspection could not be executed.
at org.infernus.idea.checkstyle.CheckStylePlugin.processError(CheckStylePlugin.java:340)
at org.infernus.idea.checkstyle.CheckStyleInspection.scanFile(CheckStyleInspection.java:255)
at org.infernus.idea.checkstyle.CheckStyleInspection.checkFile(CheckStyleInspection.java:208)
at com.intellij.codeInspection.LocalInspectionTool$1.visitFile(LocalInspectionTool.java:129)
at com.intellij.psi.impl.source.PsiCodeFragmentImpl.accept(PsiCodeFragmentImpl.java:180)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.a(LocalInspectionsPass.java:403)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.a(LocalInspectionsPass.java:361)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.access$100(LocalInspectionsPass.java:76)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass$2.process(LocalInspectionsPass.java:327)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass$2.process(LocalInspectionsPass.java:309)
at com.intellij.concurrency.JobUtil$2$1.run(JobUtil.java:117)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:218)
at com.intellij.concurrency.JobUtil$2.process(JobUtil.java:115)
at com.intellij.concurrency.JobUtil$1.run(JobUtil.java:57)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at com.intellij.concurrency.PrioritizedFutureTask.access$101(PrioritizedFutureTask.java:31)
at com.intellij.concurrency.PrioritizedFutureTask$1.run(PrioritizedFutureTask.java:70)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1053)
at com.intellij.concurrency.PrioritizedFutureTask.run(PrioritizedFutureTask.java:97)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
Caused by: java.util.NoSuchElementException
at java.util.AbstractList$Itr.next(AbstractList.java:350)
at com.puppycrawl.tools.checkstyle.Checker.fireAuditStarted(Checker.java:454)
at com.puppycrawl.tools.checkstyle.Checker.process(Checker.java:248)
at org.infernus.idea.checkstyle.CheckStyleInspection.scanFile(CheckStyleInspection.java:239)
... 22 more
I downloaded version 3.5 to IDEA 10.5.4 on Windows XP
I have a setting of a property available for my CheckStyle 5.4 file (a path to a suppress file), but when accessing the "Edit Properties" under the "Configuration File" tab in the CheckStyle setting, I am not able to save a value for that property.
Edit Properties -> Property Name = checkstyleConfigDir -> Value = "C:\checkstyle" -> OK
when I again access the Edit Properties dialouge, the Value field is just empty
please let me know if you need some more information
BTW, I think you need to update the README file
I read in the README-file:
"The 'Errors' item in the preferences panel will allow you to turn this on and to configure it."
I do not know where the "Errors item in the preferences panel" is, but I discovered (after a lot of trying and failing) that the real-time scan had to be turned on through Inspections->CheckStyle->Real-time scan
The inspection could not be executed.: The inspection could not be executed.
org.infernus.idea.checkstyle.exception.CheckStylePluginException: The inspection could not be executed.
at org.infernus.idea.checkstyle.CheckStylePlugin.processError(CheckStylePlugin.java:383)
at org.infernus.idea.checkstyle.CheckStyleInspection.checkFile(CheckStyleInspection.java:225)
at com.intellij.codeInspection.LocalInspectionTool$1.visitFile(LocalInspectionTool.java:129)
at com.intellij.psi.impl.source.PsiJavaFileBaseImpl.accept(PsiJavaFileBaseImpl.java:396)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.a(LocalInspectionsPass.java:392)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.access$300(LocalInspectionsPass.java:76)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass$2.process(LocalInspectionsPass.java:366)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass$2.process(LocalInspectionsPass.java:356)
at com.intellij.concurrency.JobUtil$2$1.run(JobUtil.java:117)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:206)
at com.intellij.concurrency.JobUtil$2.process(JobUtil.java:115)
at com.intellij.concurrency.JobUtil$1.run(JobUtil.java:57)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at com.intellij.concurrency.PrioritizedFutureTask.access$101(PrioritizedFutureTask.java:31)
at com.intellij.concurrency.PrioritizedFutureTask$1.run(PrioritizedFutureTask.java:70)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1037)
at com.intellij.concurrency.PrioritizedFutureTask.run(PrioritizedFutureTask.java:97)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.AssertionError: Already disposed
at com.intellij.openapi.components.impl.ComponentManagerImpl.getPicoContainer(ComponentManagerImpl.java:285)
at com.intellij.openapi.components.impl.ComponentManagerImpl.getPicoContainer(ComponentManagerImpl.java:54)
at com.intellij.openapi.components.ServiceManager.getService(ServiceManager.java:40)
at com.intellij.psi.SmartPointerManager.getInstance(SmartPointerManager.java:32)
at com.intellij.codeInspection.ex.ProblemDescriptorImpl.(ProblemDescriptorImpl.java:98)
at com.intellij.codeInspection.ex.ProblemDescriptorImpl.(ProblemDescriptorImpl.java:66)
at com.intellij.codeInspection.ex.ProblemDescriptorImpl.(ProblemDescriptorImpl.java:57)
at com.intellij.codeInspection.ex.InspectionManagerEx.createProblemDescriptor(InspectionManagerEx.java:121)
at org.infernus.idea.checkstyle.checker.CheckStyleAuditListener$ProcessResultsThread.processEvent(CheckStyleAuditListener.java:235)
at org.infernus.idea.checkstyle.checker.CheckStyleAuditListener$ProcessResultsThread.run(CheckStyleAuditListener.java:156)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:848)
at org.infernus.idea.checkstyle.checker.CheckStyleAuditListener.auditFinished(CheckStyleAuditListener.java:73)
at com.puppycrawl.tools.checkstyle.Checker.fireAuditFinished(Checker.java:464)
at com.puppycrawl.tools.checkstyle.Checker.process(Checker.java:291)
at org.infernus.idea.checkstyle.CheckStyleInspection.checkFile(CheckStyleInspection.java:214)
... 20 more
An error occurred while scanning a file.: An error occurred during a file scan.
org.infernus.idea.checkstyle.exception.CheckStylePluginException: An error occurred during a file scan.
at org.infernus.idea.checkstyle.CheckStylePlugin.processError(CheckStylePlugin.java:340)
at org.infernus.idea.checkstyle.checker.CheckFilesThread.run(CheckFilesThread.java:75)
Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: Could not load configuration
at org.infernus.idea.checkstyle.checker.CheckerFactory.createChecker(CheckerFactory.java:198)
at org.infernus.idea.checkstyle.checker.CheckerFactory.getChecker(CheckerFactory.java:99)
at org.infernus.idea.checkstyle.checker.FileScanner.getChecker(FileScanner.java:264)
at org.infernus.idea.checkstyle.checker.FileScanner.performCheckStyleScan(FileScanner.java:191)
at org.infernus.idea.checkstyle.checker.FileScanner.checkPsiFile(FileScanner.java:168)
at org.infernus.idea.checkstyle.checker.FileScanner.run(FileScanner.java:59)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:864)
at org.infernus.idea.checkstyle.checker.CheckFilesThread.runFileScanner(CheckFilesThread.java:41)
at org.infernus.idea.checkstyle.checker.AbstractCheckerThread.processFilesForModuleInfoAndScan(AbstractCheckerThread.java:131)
at org.infernus.idea.checkstyle.checker.CheckFilesThread.run(CheckFilesThread.java:60)
Caused by: java.lang.IllegalStateException: contextSelector cannot be null. See also http://logback.qos.ch/codes.html#null_CS
at org.slf4j.impl.StaticLoggerBinder.getLoggerFactory(StaticLoggerBinder.java:98)
at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:240)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:208)
at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:155)
at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:131)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:685)
at org.apache.commons.beanutils.ConvertUtilsBean.(ConvertUtilsBean.java:157)
at com.puppycrawl.tools.checkstyle.api.AutomaticBean.createBeanUtilsBean(AutomaticBean.java:65)
at com.puppycrawl.tools.checkstyle.api.AutomaticBean.configure(AutomaticBean.java:127)
at org.infernus.idea.checkstyle.checker.CheckerFactory$CheckerFactoryWorker.run(CheckerFactory.java:293)
It appears that the plugin locks certain files in IntelliJ (I use the latest version 11.1.2) which prevents checkouts of Git branches. The workaround is to completely shutdown IDEA and do the checkout on command-line, which is, of course, very annoying.
I can take a look at it if you tell me where to start digging.
Thanks!
Currently it is only possible to select one XML check file and have the
project/whatever checked against this very file.
It could come handy, if one could select and use multiple files (and thus
running checkstyle multiple times without losing the results of the
previous run(s).)
Best regards,
Mihai
This feature is especially useful for Android development, where we usually want to use the standard sun-checks.xml but on top of that, Android specific checks.
At present the plugin is configured project by project. It could be useful to be able to set up settings in the Project Template Settings and have defaults applied to all new projects.
I have a Maven project which is using Checkstyle, where some Maven modules refer to exceptions from some of our project's external dependencies. When running Checkstyle using Maven in the "verify" phase, these exceptions are picked up correctly. But when running a Checkstyle scan from within Intellij IDEA using the CheckStyle-IDEA plugin, it fails to find the exception classes and shows extra warnings for "Unable to get class information for . (0:0)", etc.
This issue is mentioned in the FAQ in the CheckStyle-IDEA README, but building our project first as suggested makes no difference; presumably because the classes are defined in the dependencies rather than in any of our locally compiled packages.
In our Projects, we have some generated Java classes in a src/gen/java subfolder, while our handcoded Files live in src/main/java - as far as I see, there is no option to prevent Checktsyle-IDEA from visiting the src/gen/java subfolder. Adding this possibility would be very nice!
Hi,
according to the release notes on version 0.5 the path location of the configuration file is saved relative to the project folder. On windows however the file location is absolute. Can someone please verify this?
Project-Folder: C:\Users\irrwitz\projects\abc
Checkstyle-Location: C:\Users\irrwitz\projects\abc\checkstyle.xml
Plugin view location is C:\Users\irrwitz\projects\abc\checkstyle.xml instead of \checkstyle.xml
Environment:
Windows 7
IntelliJ IDEA: 11.1.4
Plugin: v.3.8.4
Settings are saved in .idea folder
When I install the plugin in IntelliJ and scan the project the following exception appears""The module DoubleCheckedLocking could not be loaded".
An error occurred while scanning a file.: An error occurred during a file scan.
org.infernus.idea.checkstyle.exception.CheckStylePluginException: An error occurred during a file scan.
at org.infernus.idea.checkstyle.CheckStylePlugin.processError(CheckStylePlugin.java:340)
at org.infernus.idea.checkstyle.checker.CheckFilesThread.run(CheckFilesThread.java:75)
Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: cannot initialize module TreeWalker - Unable to instantiate DoubleCheckedLocking
at com.puppycrawl.tools.checkstyle.Checker.setupChild(Checker.java:178)
at com.puppycrawl.tools.checkstyle.api.AutomaticBean.configure(AutomaticBean.java:184)
at org.infernus.idea.checkstyle.checker.CheckerFactory$CheckerFactoryWorker.run(CheckerFactory.java:293)
Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: Unable to instantiate DoubleCheckedLocking
at com.puppycrawl.tools.checkstyle.PackageObjectFactory.createModule(PackageObjectFactory.java:155)
at com.puppycrawl.tools.checkstyle.TreeWalker.setupChild(TreeWalker.java:161)
at com.puppycrawl.tools.checkstyle.api.AutomaticBean.configure(AutomaticBean.java:184)
at com.puppycrawl.tools.checkstyle.Checker.setupChild(Checker.java:157)
... 2 more
Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: Unable to instantiate DoubleCheckedLockingCheck
at com.puppycrawl.tools.checkstyle.PackageObjectFactory.doMakeObject(PackageObjectFactory.java:98)
at com.puppycrawl.tools.checkstyle.PackageObjectFactory.createModule(PackageObjectFactory.java:152)
... 5 more
We have a multi-module project where some are dependent on others (such as a 'utility' module that most others use). Running Checkstyle on java classes that use Exceptions out of 'utility' show up with errors about Checkstyle being unable to get class information for <Exception>
.
It would be great if they could be included somehow.
I tried adding the produced utility.jar as a third-party check, but due to Checkstyle-IDEA holding the third-party check jar's open I could not use this solution, since then I was unable to rebuild the jar.
After the latest plugin update, there were 7 actions added by the plugin to the editor pop-up menu.
This makes the menu overly tall, and these are not the actions I use most often. Would it be possible to introduce a configuration option to group these actions under a "Checkstyle" submenu?
What steps will reproduce the problem?
What is the expected output? What do you see instead?
Expect there to be no issue reported, instead see "File does not end with a newline. (0:0)"
What version of the product are you using? On what operating system?
IDEA 9.0.3 on Windows Vista, CheckStyle-IDEA 3.1.2
Please provide any additional information below.
Even setting IDEA to ensure a blank line is at the end of file on save doesn't help
Currently, a number of actions in editor pop-up menu end with periods, e.g. "Stop the running scan."
This is inconsistent with the rest of the GUI.
Please remove the trailing periods.
Minor doc issue. In README in the Feedback section it says:
"please visit the project website at ..." and gives the google code address. Should probably be updated to GitHub.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.