CollectedInfo (@NotNull PsiFile file) { if (!(file instanceof ShFile)) return null; VirtualFile virtualFile = file.getVirtualFile(); if (virtualFile == null) return null; VirtualFile parent = virtualFile.getParent(); if (parent == null) return null; return new CollectedInfo(file.getProject(), parent.getPath(), file.getText(), file.getModificationStamp(), getShellcheckExecutionParams(file)); }