}
@Override
protected void doCheckFile(@NotNull GoFile file,
@NotNull final InspectionResult result) {
GoNamesCache namecache = GoNamesCache.getInstance(file.getProject());
String selfPackageName = file.getFullPackageName();
HashSet<String> hasVisitImportPath = new HashSet<String>();
for (GoImportDeclarations importDeclarations : file.getImportDeclarations()) {
for (GoImportDeclaration declaration : importDeclarations.getDeclarations()) {
String importPathValue = null;
GoLiteralString importPath = declaration.getImportPath();
if (importPath != null) {
importPathValue = importPath.getValue();
}
if (importPathValue == null)
continue;
if (importPathValue.isEmpty()) {
result.addProblem(declaration, GoBundle.message("error.import.path.is.empty"));
continue;
}
if (importPathValue.contains(" ") || importPathValue.contains("\t")) {
result.addProblem(declaration, GoBundle.message("error.import.path.contains.space"));
continue;
}
if (importPathValue.contains("\\")) {
result.addProblem(declaration, GoBundle.message("error.import.path.contains.backslash"));
continue;
}
if (!importPathValue.equals("C") && !namecache.isPackageImportPathExist(importPathValue)){
result.addProblem(declaration, GoBundle.message("error.import.path.notfound", importPathValue));
continue;
}
if (importPathValue.equals(selfPackageName)) {