public List<CompilerMessage> parseStream(String data) {

      List<CompilerMessage> messages = new ArrayList<CompilerMessage>();

      Matcher matcher = pattern.matcher(data);

      if (matcher.find()) {
        String filename = matcher.group(1);
        String url = CompilationTaskWorker.generateFileUrl(basePath, filename);
        messages.add(
            new CompilerMessage(
                CompilerMessageCategory.ERROR,
                matcher.group(3),
                url,
                Integer.parseInt(matcher.group(2)),
                -1));
      } else {

        // Ignore error lines that start with the compiler as the line that follows this contains
        // the error that
        // we're interested in. Otherwise, the error is more severe and we should display it
        if (!StringUtils.startsWith(data, GoSdkUtil.getCompilerName(goSdkData.TARGET_ARCH))) {
          messages.add(new CompilerMessage(CompilerMessageCategory.ERROR, data, null, -1, -1));
        }
      }

      return messages;
    }
  @Nullable
  @Override
  public ValidationInfo validate() {
    if (getSdkData() == null) {
      return new ValidationInfo(GoBundle.message("error.invalid.sdk.path", mySdkPath.getText()));
    }

    String goSdkPath = mySdkPath.getText();

    GoSdkType goSdk = new GoSdkType();
    if (!goSdk.isValidSdkHome(goSdkPath)) {
      return new ValidationInfo(GoBundle.message("error.invalid.sdk.path", mySdkPath.getText()));
    }

    GoSdkData goSdkData = GoSdkUtil.testGoogleGoSdk(goSdkPath);

    if (goSdkData == null) {
      return new ValidationInfo(GoBundle.message("error.invalid.sdk.path", mySdkPath.getText()));
    }

    goSdkData.GO_GOPATH_PATH = gopathPath.getText();

    labelSdkVersion.setText(goSdkData.VERSION_MAJOR);
    if (goSdkData.TARGET_OS != null && goSdkData.TARGET_ARCH != null) {
      labelSdkTarget.setText(
          String.format(
              "%s-%s (%s, %s)",
              goSdkData.TARGET_OS.getName(),
              goSdkData.TARGET_ARCH.getName(),
              GoSdkUtil.getCompilerName(goSdkData.TARGET_ARCH),
              GoSdkUtil.getLinkerName(goSdkData.TARGET_ARCH)));
    } else {
      labelSdkTarget.setText("Unknown target");
    }

    labelBinariesPath.setText(goSdkData.GO_BIN_PATH);
    return null;
  }