sourcegraph / sourcegraph-public-snapshot

Code AI platform with Code Search & Cody
https://sourcegraph.com
Other
10.11k stars 1.29k forks source link

search context validation "check for errors" doesn't show errors #26616

Closed rvantonder closed 8 months ago

rvantonder commented 3 years ago

I tried creating a search context with the JSON below. When I tested it, the JSON editor complained and said "check for errors", but it didn't show anything. Knowing about how this sort of stuff trips up, I guessed it was because I had a trailing comma in the last entry, and I was right. Don't know why it's not highlighting that, maybe it's because it's a long list. But this could easily confuse/stop any user who doesn't have the same (obscure) hunch.

list of 100 repos to add to context ```json [ { "repository": "github.com/golang/go", "revisions": [ "HEAD" ] }, { "repository": "github.com/kubernetes/kubernetes", "revisions": [ "HEAD" ] }, { "repository": "github.com/avelino/awesome-go", "revisions": [ "HEAD" ] }, { "repository": "github.com/moby/moby", "revisions": [ "HEAD" ] }, { "repository": "github.com/gohugoio/hugo", "revisions": [ "HEAD" ] }, { "repository": "github.com/gin-gonic/gin", "revisions": [ "HEAD" ] }, { "repository": "github.com/fatedier/frp", "revisions": [ "HEAD" ] }, { "repository": "github.com/syncthing/syncthing", "revisions": [ "HEAD" ] }, { "repository": "github.com/junegunn/fzf", "revisions": [ "HEAD" ] }, { "repository": "github.com/prometheus/prometheus", "revisions": [ "HEAD" ] }, { "repository": "github.com/astaxie/build-web-application-with-golang", "revisions": [ "HEAD" ] }, { "repository": "github.com/v2ray/v2ray-core", "revisions": [ "HEAD" ] }, { "repository": "github.com/gogs/gogs", "revisions": [ "HEAD" ] }, { "repository": "github.com/etcd-io/etcd", "revisions": [ "HEAD" ] }, { "repository": "github.com/traefik/traefik", "revisions": [ "HEAD" ] }, { "repository": "github.com/caddyserver/caddy", "revisions": [ "HEAD" ] }, { "repository": "github.com/ethereum/go-ethereum", "revisions": [ "HEAD" ] }, { "repository": "github.com/FiloSottile/mkcert", "revisions": [ "HEAD" ] }, { "repository": "github.com/minio/minio", "revisions": [ "HEAD" ] }, { "repository": "github.com/hashicorp/terraform", "revisions": [ "HEAD" ] }, { "repository": "github.com/pingcap/tidb", "revisions": [ "HEAD" ] }, { "repository": "github.com/rclone/rclone", "revisions": [ "HEAD" ] }, { "repository": "github.com/evanw/esbuild", "revisions": [ "HEAD" ] }, { "repository": "github.com/istio/istio", "revisions": [ "HEAD" ] }, { "repository": "github.com/wagoodman/dive", "revisions": [ "HEAD" ] }, { "repository": "github.com/unknwon/the-way-to-go_ZH_CN", "revisions": [ "HEAD" ] }, { "repository": "github.com/beego/beego", "revisions": [ "HEAD" ] }, { "repository": "github.com/go-gitea/gitea", "revisions": [ "HEAD" ] }, { "repository": "github.com/cli/cli", "revisions": [ "HEAD" ] }, { "repository": "github.com/go-gorm/gorm", "revisions": [ "HEAD" ] }, { "repository": "github.com/drone/drone", "revisions": [ "HEAD" ] }, { "repository": "github.com/docker/compose", "revisions": [ "HEAD" ] }, { "repository": "github.com/spf13/cobra", "revisions": [ "HEAD" ] }, { "repository": "github.com/hashicorp/consul", "revisions": [ "HEAD" ] }, { "repository": "github.com/cockroachdb/cockroach", "revisions": [ "HEAD" ] }, { "repository": "github.com/influxdata/influxdb", "revisions": [ "HEAD" ] }, { "repository": "github.com/kubernetes/minikube", "revisions": [ "HEAD" ] }, { "repository": "github.com/hashicorp/vault", "revisions": [ "HEAD" ] }, { "repository": "github.com/jesseduffield/lazygit", "revisions": [ "HEAD" ] }, { "repository": "github.com/go-kit/kit", "revisions": [ "HEAD" ] }, { "repository": "github.com/kataras/iris", "revisions": [ "HEAD" ] }, { "repository": "github.com/github/hub", "revisions": [ "HEAD" ] }, { "repository": "github.com/mattermost/mattermost-server", "revisions": [ "HEAD" ] }, { "repository": "github.com/labstack/echo", "revisions": [ "HEAD" ] }, { "repository": "github.com/inconshreveable/ngrok", "revisions": [ "HEAD" ] }, { "repository": "github.com/halfrost/LeetCode-Go", "revisions": [ "HEAD" ] }, { "repository": "github.com/openfaas/faas", "revisions": [ "HEAD" ] }, { "repository": "github.com/helm/helm", "revisions": [ "HEAD" ] }, { "repository": "github.com/nsqio/nsq", "revisions": [ "HEAD" ] }, { "repository": "github.com/Dreamacro/clash", "revisions": [ "HEAD" ] }, { "repository": "github.com/yeasy/docker_practice", "revisions": [ "HEAD" ] }, { "repository": "github.com/sirupsen/logrus", "revisions": [ "HEAD" ] }, { "repository": "github.com/ehang-io/nps", "revisions": [ "HEAD" ] }, { "repository": "github.com/tsenart/vegeta", "revisions": [ "HEAD" ] }, { "repository": "github.com/nektos/act", "revisions": [ "HEAD" ] }, { "repository": "github.com/jesseduffield/lazydocker", "revisions": [ "HEAD" ] }, { "repository": "github.com/k3s-io/k3s", "revisions": [ "HEAD" ] }, { "repository": "github.com/rancher/rancher", "revisions": [ "HEAD" ] }, { "repository": "github.com/zyedidia/micro", "revisions": [ "HEAD" ] }, { "repository": "github.com/coreybutler/nvm-windows", "revisions": [ "HEAD" ] }, { "repository": "github.com/tmrts/go-patterns", "revisions": [ "HEAD" ] }, { "repository": "github.com/spf13/viper", "revisions": [ "HEAD" ] }, { "repository": "github.com/asim/go-micro", "revisions": [ "HEAD" ] }, { "repository": "github.com/photoprism/photoprism", "revisions": [ "HEAD" ] }, { "repository": "github.com/dgraph-io/dgraph", "revisions": [ "HEAD" ] }, { "repository": "github.com/urfave/cli", "revisions": [ "HEAD" ] }, { "repository": "github.com/valyala/fasthttp", "revisions": [ "HEAD" ] }, { "repository": "github.com/gofiber/fiber", "revisions": [ "HEAD" ] }, { "repository": "github.com/goharbor/harbor", "revisions": [ "HEAD" ] }, { "repository": "github.com/iawia002/annie", "revisions": [ "HEAD" ] }, { "repository": "github.com/chai2010/advanced-go-programming-book", "revisions": [ "HEAD" ] }, { "repository": "github.com/yudai/gotty", "revisions": [ "HEAD" ] }, { "repository": "github.com/joewalnes/websocketd", "revisions": [ "HEAD" ] }, { "repository": "github.com/gorilla/websocket", "revisions": [ "HEAD" ] }, { "repository": "github.com/quii/learn-go-with-tests", "revisions": [ "HEAD" ] }, { "repository": "github.com/matryer/xbar", "revisions": [ "HEAD" ] }, { "repository": "github.com/gorilla/mux", "revisions": [ "HEAD" ] }, { "repository": "github.com/helm/charts", "revisions": [ "HEAD" ] }, { "repository": "github.com/go-kratos/kratos", "revisions": [ "HEAD" ] }, { "repository": "github.com/schollz/croc", "revisions": [ "HEAD" ] }, { "repository": "github.com/gocolly/colly", "revisions": [ "HEAD" ] }, { "repository": "github.com/dapr/dapr", "revisions": [ "HEAD" ] }, { "repository": "github.com/buger/goreplay", "revisions": [ "HEAD" ] }, { "repository": "github.com/grpc/grpc-go", "revisions": [ "HEAD" ] }, { "repository": "github.com/stretchr/testify", "revisions": [ "HEAD" ] }, { "repository": "github.com/jaegertracing/jaeger", "revisions": [ "HEAD" ] }, { "repository": "github.com/hoanhan101/ultimate-go", "revisions": [ "HEAD" ] }, { "repository": "github.com/fyne-io/fyne", "revisions": [ "HEAD" ] }, { "repository": "github.com/grafana/k6", "revisions": [ "HEAD" ] }, { "repository": "github.com/restic/restic", "revisions": [ "HEAD" ] }, { "repository": "github.com/grafana/loki", "revisions": [ "HEAD" ] }, { "repository": "github.com/cayleygraph/cayley", "revisions": [ "HEAD" ] }, { "repository": "github.com/uber-go/zap", "revisions": [ "HEAD" ] }, { "repository": "github.com/derailed/k9s", "revisions": [ "HEAD" ] }, { "repository": "github.com/kubernetes/kops", "revisions": [ "HEAD" ] }, { "repository": "github.com/filebrowser/filebrowser", "revisions": [ "HEAD" ] }, { "repository": "github.com/julienschmidt/httprouter", "revisions": [ "HEAD" ] }, { "repository": "github.com/hashicorp/packer", "revisions": [ "HEAD" ] }, { "repository": "github.com/golang/dep", "revisions": [ "HEAD" ] }, { "repository": "github.com/chrislusf/seaweedfs", "revisions": [ "HEAD" ] }, // trailing comma will make it not validate, but also not indicate problem ] ```
camdencheek commented 8 months ago

Closing as no longer relevant with new ways to build search contexts.