I want to annotate (potentially empty) files in the project view based on file name with a problem descriptor.
I intend to highlight/annotate suspicious files in the project that should perhaps not be checked in to source code management systems: things like ssh keys, certificates etc. These files may not have a registered reader in the IDE, and I do not necessarily want to read them: just to highlight them in the project tree view as suspicious based on the file name patterns.
I have explored using an Annotator, but it seems that annotators are most suited for scenarios when you have a language file and you intend to annotate content, like the "simple:" example in the documentation. LocalInspectionTool also seems promising, and overriding its "checkFile" gives me a PsiFile, however attaching a ProblemDescriptor to the file seems to require a PsiElement, which I don't necessarily have as I do not intend to "look" into the file, and I don't care if the file is empty.
It sounds like a very simple problem to solve, but unfortunately I don't know how to solve it! Any ideas would be very welcome.
I am happy for the inspection to be triggered automatically or manually invoked as part of a security analysis of the codebase.