Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected CFLint error during file scan #32

Open
bferdinandus opened this issue Jul 26, 2021 · 4 comments
Open

Unexpected CFLint error during file scan #32

bferdinandus opened this issue Jul 26, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@bferdinandus
Copy link

Hello I would like to report this error. It happens quire regularly.

This is the log from intellij.

Details: java.lang.NullPointerException

java.lang.Throwable: Unexpected CFLint error during file scan
	at com.intellij.openapi.diagnostic.Logger.error(Logger.java:179)
	at com.pr1st0n.cflint.CFLintInspection.checkFile(CFLintInspection.kt:52)
	at com.intellij.codeInspection.LocalInspectionTool$1.visitFile(LocalInspectionTool.java:145)
	at com.intellij.extapi.psi.PsiFileBase.accept(PsiFileBase.java:60)
	at com.intellij.codeInspection.InspectionEngine.acceptElements(InspectionEngine.java:65)
	at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.lambda$visitRestElementsAndCleanup$7(LocalInspectionsPass.java:346)
	at com.intellij.util.AstLoadingFilter.lambda$toComputable$2(AstLoadingFilter.java:174)
	at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:132)
	at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:121)
	at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:111)
	at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.lambda$visitRestElementsAndCleanup$10(LocalInspectionsPass.java:346)
	at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:136)
	at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:149)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1091)
	at com.intellij.concurrency.ApplierCompleter.lambda$wrapInReadActionAndIndicator$1(ApplierCompleter.java:92)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:688)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:634)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:64)
	at com.intellij.concurrency.ApplierCompleter.wrapInReadActionAndIndicator(ApplierCompleter.java:104)
	at com.intellij.concurrency.ApplierCompleter.lambda$compute$0(ApplierCompleter.java:83)
	at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:167)
	at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:178)
	at com.intellij.concurrency.ApplierCompleter.compute(ApplierCompleter.java:83)
	at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:746)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
	at java.base/java.util.concurrent.ForkJoinPool.awaitJoin(ForkJoinPool.java:1708)
	at java.base/java.util.concurrent.ForkJoinTask.get(ForkJoinTask.java:1039)
	at com.intellij.concurrency.JobLauncherImpl.invokeConcurrentlyUnderProgress(JobLauncherImpl.java:71)
	at com.intellij.concurrency.JobLauncher.invokeConcurrentlyUnderProgress(JobLauncher.java:49)
	at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.visitRestElementsAndCleanup(LocalInspectionsPass.java:366)
	at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.inspect(LocalInspectionsPass.java:208)
	at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.collectInformationWithProgress(LocalInspectionsPass.java:119)
	at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:84)
	at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:56)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$1(PassExecutorService.java:400)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1096)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:393)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:688)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:634)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:64)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:392)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:368)
	at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:167)
	at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:178)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:366)
	at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:188)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)

This is in my .cflintrc file that I use for this project.

{
    "rule" : [ ],
    "excludes" : [
        {"code" : "ARGUMENT_HAS_PREFIX_OR_POSTFIX"},
        {"code" : "ARGUMENT_INVALID_NAME"},
        {"code" : "ARGUMENT_IS_TEMPORARY"},
        {"code" : "ARGUMENT_TOO_LONG"},
        {"code" : "ARGUMENT_TOO_SHORT"},
        {"code" : "ARGUMENT_TOO_WORDY"},
        {"code" : "ARG_DEFAULT_MISSING"},
        {"code" : "ARG_HINT_MISSING"},
        {"code" : "ARG_HINT_MISSING_SCRIPT"},
        {"code" : "ARG_TYPE_ANY"},
        {"code" : "AVOID_USING_ARRAYNEW"},
        {"code" : "AVOID_USING_CREATEOBJECT"},
        {"code" : "COMPLEX_BOOLEAN_CHECK"},
        {"code" : "COMPONENT_HINT_MISSING"},
        {"code" : "COMPONENT_INVALID_NAME"},
        {"code" : "COMPONENT_TOO_LONG"},
        {"code" : "COMPONENT_TOO_WORDY"},
        {"code" : "EXCESSIVE_ARGUMENTS"},
        {"code" : "EXCESSIVE_COMPONENT_LENGTH"},
        {"code" : "EXCESSIVE_FUNCTIONS"},
        {"code" : "EXCESSIVE_FUNCTION_LENGTH"},
        {"code" : "FILE_SHOULD_START_WITH_LOWERCASE"},
        {"code" : "FUNCTION_HINT_MISSING"},
        {"code" : "FUNCTION_TOO_COMPLEX"},
        {"code" : "FUNCTION_TYPE_ANY"},
        {"code" : "FUNCTION_TYPE_MISSING"},
        {"code" : "GLOBAL_VAR"},
        {"code" : "LOCAL_LITERAL_VALUE_USED_TOO_OFTEN"},
        {"code" : "METHOD_INVALID_NAME"},
        {"code" : "METHOD_IS_TEMPORARY"},
        {"code" : "METHOD_TOO_LONG"},
        {"code" : "METHOD_TOO_WORDY"},
        {"code" : "STRUCT_ARRAY_NOTATION"},
        {"code" : "VAR_ALLCAPS_NAME"},
        {"code" : "VAR_HAS_PREFIX_OR_POSTFIX"},
        {"code" : "VAR_INVALID_NAME"},
        {"code" : "VAR_IS_TEMPORARY"},
        {"code" : "VAR_TOO_LONG"},
        {"code" : "VAR_TOO_SHORT"},
        {"code" : "VAR_TOO_WORDY"},
        {"code" : "UNQUOTED_STRUCT_KEY"}
    ],
    "includes" : [

    ],
    "inheritParent" : false
}
@Pr1st0n
Copy link
Owner

Pr1st0n commented Jul 29, 2021

@bferdinandus thanks for the report!
There is an open ticket for this issue. Going to investigate it some when soon.

@Pr1st0n Pr1st0n closed this as completed Jul 29, 2021
@bferdinandus
Copy link
Author

I had seen the other ticket #30 and came to the conclusion that the error I encountered was slightly different.
In ticket #30 the error has to do with the config file Invalid CFLint Configuration
In this ticket it is about a error cflint scanning the file Unexpected CFLint error during file scan
Mayby it's worh looking into the difference to see if the ticket are really duplicate, or just really similar errors?

@Pr1st0n
Copy link
Owner

Pr1st0n commented Jul 30, 2021

I'm pretty sure both issues have similar cause. Need more investigation though

@Pr1st0n Pr1st0n added the duplicate This issue or pull request already exists label Aug 5, 2021
@Pr1st0n
Copy link
Owner

Pr1st0n commented Dec 15, 2021

Should be checked separate from #30

@Pr1st0n Pr1st0n reopened this Dec 15, 2021
@Pr1st0n Pr1st0n added bug Something isn't working and removed duplicate This issue or pull request already exists labels Dec 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants