GithubHelp home page GithubHelp logo

sourcegraph / sourcegraph Goto Github PK

View Code? Open in Web Editor NEW
9.9K 182.0 1.2K 1.16 GB

Code AI platform with Code Search & Cody

Home Page: https://sourcegraph.com

License: Other

JavaScript 0.14% Go 57.62% HTML 0.07% Shell 0.48% Assembly 0.01% TypeScript 33.41% PLpgSQL 1.41% Dockerfile 0.02% Starlark 4.31% SCSS 1.59% Nix 0.05% Rust 0.53% Smarty 0.01% CSS 0.01% Procfile 0.01% Scheme 0.16% C# 0.02% Makefile 0.01% Lua 0.14% Kotlin 0.01%
sourcegraph code-search code-intelligence repo-type-main cody

sourcegraph's Introduction

DocsContributingTwitterDiscord

Build status Scorecard Latest release Discord Contributors


Sourcegraph makes it easy to read, write, and fix code—even in big, complex codebases.

  • Code search: Search all of your repositories across all branches and all code hosts.
  • Code intelligence: Navigate code, find references, see code owners, trace history, and more.
  • Fix and refactor: Roll out large-scale changes to many repositories at once and track big migrations.

Getting started



Development

Refer to the Developing Sourcegraph guide to get started.

Documentation

The doc directory has additional documentation for developing and understanding Sourcegraph:

License

This repository contains primarily non-OSS-licensed files. See LICENSE.

Copyright (c) 2018-present Sourcegraph Inc.

sourcegraph's People

Contributors

attfarhan avatar beyang avatar bobheadxi avatar bolajiolajide avatar burmudar avatar camdencheek avatar chrismwendt avatar coury-clark avatar davejrt avatar efritz avatar eseliger avatar felixfbecker avatar fkling avatar ggilmore avatar gitstart-sourcegraph avatar jhchabran avatar keegancsmith avatar mrnugget avatar philipp-spiess avatar renovate-bot avatar rvantonder avatar ryanslade avatar sashaostrikov avatar slimsag avatar sqs avatar stefanhengl avatar strum355 avatar unknwon avatar valerybugakov avatar vovakulikov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sourcegraph's Issues

Sourcegraph Editor: Provide alternate PR views in Review pane

  • Issue type: feature request
  • Sourcegraph version: Sourcegraph Editor 1.21.0
  • OS Version: MacOS High Sierra
  • Docker version: NA

Description:
I have previously communicated with Linda Xie regarding a feature request to see all PRs that I see at https://github.com/<org>/<repo>/pulls. Having thought further about it, this is a revised request, superceding that earlier one.

What I think would be really useful would be to have a “view selector” in the Review pane. This view selector would offer 3 views:

1-Involved PRs (this is the what you currently offer): this shows PRs that are open and where the user is the author, an assignee, mentioned in it, or a commenter.

2-Assigned PRs: this is like a “to do” list. It would show all open PRs where the user is an assignee and has yet to do a review. Once the user completes a review using the “Approve” button, the PR is then dismissed from this view. That way, a user can know at a glance what PRs are waiting to be reviewed, as well as keep tabs on PRs not yet approved.

3-All PRs on a selected repo. I assume your Review pane would show my involved PRs across various repos, but I am only active in one so I cannot tell for sure… But I am assuming it could contain reviews from different repos, so there would need to be a picker of some type where the user can select a repo from amongst the repos associated with all involved PRs. Once selected, this view would then show all open PRs for that repo. This would just be a lot more convenient than having to go to GitHub.com, open each PR of interest, then assign myself as a reviewer.

In all 3 above views, it would be great to additionally have:
A- next to each PR, display the number of comments posted on it (somewhat like GitHub does).
B-embolden the PR title if there are unread comments; once the user opens the PR, switch back to normal, non-bold.

Final note: This could be a separate issue, but for completeness I am mentioning it here: your current notion of “assignee” is apparently a where the user is specifically named; it does not consider team memberships of the user. That is, if I am on team “foo” and team “foo” is assigned as a reviewer, that PR should show up in my list of involved PRs.

Allow multiline searches

Hey, its very common to have a single objc function call span multiple lines. Is there was to search multiple lines in sourcegraph?

Directory listing page fails due to rename detection limit hit

"invalid commit log entry: ["warning: inexact rename detection was skipped due to too many files. warning: you may want to set your diff.renameLimit variable to at least 3298 and retry the command."]"

Likely need to ignore stderr when parsing the output of this git command

HT @creack

Run sourcegraph outside of docker

  • Issue type: question

I went through the installation guide where it says docker is a pre-requisite. Can sourcegraph server run outside of docker? Is it possible to run it on a standalone linux box (not on hosted services like aws, google etc.) and for git repositories hosted on personal gitlab and gitolite servers?

Code intel. sometimes not supported on non-UTF8 files

New issue description by @slimsag:

Most language servers only support UTF8-encoded files, so code intelligence does not work on such files generally. It would be nice if we could have e.g. some intermediate layer convert all text files to UTF8 so that language servers only need to deal with UTF8 and things 'just work' for all non-UTF8 file encodings.


Old issue description:

"Just tried this out on some of our code bases. It appears to fail to generate snippets/highlights for all files that contain non-Unicode text, e.g. "Müller" in ISO-8859-1. Known issue?"

From https://news.ycombinator.com/reply?id=16124304

Show file/path results on searches where the `file:` filter is specified

  • Issue type: bug report
  • Sourcegraph version: sourcegraph.com

Reported by a user, file/path results don't show if the search query is specified in the file: filter

Steps to reproduce:

  1. Try searching both:
    https://sourcegraph.com/search?q=repo:github%5C.com/Microsoft/vscode+file:referencesearch.ts
    and
    https://sourcegraph.com/search?q=repo:github%5C.com/Microsoft/vscode+referencesearch.ts

  2. Note that the first search returns nothing but suggestions, while the bottom one returns, as expected, the desired file.

Search in one file

Currently, when I press Ctrl+F, the inaccurate and hard to use browser search is triggered. I also found no way to search without entering the path of the file.

I'm requesting a similar in-file search experience compare to VS Code here.

no syntax highlighting on many common file types

initdb permission denied when running sourcegraph/server:2.4.3 on docker-machine on macOS

  • Issue type: bug report
  • Sourcegraph version: 2.4.3
  • OS Version: macOS
  • Docker version: 17.09.0-ce
 docker run \
--publish 7080:7080 --rm \
--volume $HOME/.sourcegraph/config:/etc/sourcegraph \
--volume $HOME/.sourcegraph/data:/var/opt/sourcegraph \
sourcegraph/server:2.4.3

Fails with:

initdb: could not create directory "/var/opt/sourcegraph/postgresql/pg_xlog": Permission denied

This is on:

Very basic docker setup using docker-machine on osx

Note that this is not Docker for Mac, it is docker-machine (using VirtualBox).

Sourcegraph Editor: Provide richer comment support

  • Issue type: feature request
  • Sourcegraph version: Sourcegraph Editor 1.21.0
  • OS Version: MacOS High Sierra
  • Docker version: NA

Description:
I had originally jumped at using Sourcegraph Editor because of its capability to do code reviews in VSCode rather than through Github.com. Ironically, that is not the main thing I use it for, though, because its support for all aspects of commenting is nice, but not on par with Github.com. I hope some of these suggestions might resonate:

  1. Gotta fix that bug where opening then closing a comment makes the comment disappear in the IDE. :-(.
  2. In Github.com the entire PR (i.e. all files) is linear, on a single page. But in VSCode, one views one file at a time, there needs to be a way to track existing comments that I have entered in the current PR, but not yet submitted. Ideally, there should be a comment count next to each file name in the list of files in the Review pane. In day to day work, one is often interrupted. If I come back to a PR I had started looking at before, I need a way to know if I have any pending comments that I have not yet submitted.
  3. Similarly, there needs to be a way to track pre-existing comments in the current PR, both from me and from others. I often want to skim through what others have written commented on first, before digging into the code. So I would amend (2) to suggest two numbers next to each file, say a blue number for pre-existing comments and a red number for my not-yet-submitted comments.
  4. Further still on the same point, just like Github, when viewing the list of PRs in the Review pane, there should be a count of comments. (And again, I would suggest two counts, one for pre-existing comments and one for comments I have not yet submitted.)
  5. It would be helpful to be able to execute a search against the contents of all existing comments within the current PR. (Say I wanted to copy something from some other comment I put on a different file, for example.)
  6. You have the avatars for existing reviewers in the list of PRs but that should be enhanced to show who has approved, commented, or requested changes. (Perhaps with different colored borders around the avatars, or even better, a tiny green checkmark or tiny red x in the corner of the avatar.)
  7. I would like to see a way to preview a comment (as in Github.com). Which also means, that there needs to be able to display a comment as "rich text", of course.
  8. I would like to see some simple editing controls for bold, italic, code, etc. (as in Github.com).
  9. I would like a way to attach an icon like in Github.com. I, and my colleagues, like to put a "thumbs_up" icon as a quick way to let a reviewer know that we have acknowledged their comment.
  10. I would like a "pop-out" view of comments in a file so one can view the comments, but not have them interfere with viewing the code. A good implementation of this is in Visual Studio (i.e. not VScode) when using TFS. Comments appear in a separate panel off to the side. You could then superimpose an arrow perhaps. Alternately, when one clicks on a comment in this panel, then it highlights the line of code it is attached to.
  11. Would like to see support for, when typing "@", a list of colleagues names are provided as you type (as in Github.com).
  12. Would be helpful to be able to edit comments not yet submitted.

A couple things I really like about your comment support:

  1. The little word-bubble icon that appears near the left edge of code lines containing a comment.
  2. The vertical bar next to the vertical scroll bar showing ticks for the whole file, indicating where in the file there are comments.

how about run via docker-compose

  • Issue type: bug report/question
  • Sourcegraph version: 2.5.17
  • OS Version: MacOS 10.13.3
  • Docker version: 18.03.0-ce-rc1-mac54

Based on issue41, I managed to make it work by
map volume to /data/sourcegraph/config and /data/sourcegraph/data on docker-machine, but today when I rerun the container, it shows:

frontend | DB not available: getting DB timezone: pq: database "sourcegraph" does not exist

Sure delete docker-machine volume could work, but I already added around 100 repositories, then I need to git clone them again.

I noticed there are several processes on this container, are there any reasons to do so instead of "one process one container"?

Thanks.

Creating user without password succeeds despite error

When creating a users with src user create, if a password is not provided, then an error is printed, but the user is created without a password anyway.

Repro:

$ src user create johndoe
rpc error: code = 6 desc = "account \"johndoe\" already exists"
$ src user create johndoe
rpc error: code = 6 desc = "account \"johndoe\" already exists"

Expected: the user should not be created if no password is specified.

Cannot start docker image

docker run \
>  --publish 7080:7080 --rm \
>  --volume $HOME/.sourcegraph/config:/etc/sourcegraph \
>  --volume $HOME/.sourcegraph/data:/var/opt/sourcegraph \
>  sourcegraph/server:2.4.3
Unable to find image 'sourcegraph/server:2.4.3' locally
2.4.3: Pulling from sourcegraph/server
1160f4abea84: Pull complete 
699600ed1b0a: Pull complete 
2d165a43a809: Pull complete 
4a7682383020: Pull complete 
b42d9698b160: Pull complete 
7cbe11a92489: Pull complete 
ae350ffa9820: Pull complete 
4d6fbb3d2603: Pull complete 
85f404723f3f: Pull complete 
05d254fe4d72: Pull complete 
f301514b7403: Pull complete 
Digest: sha256:64d4771dd20853d37baefa686dab2ca0ef240edab85f5343bbeb5747db2a8d18
Status: Downloaded newer image for sourcegraph/server:2.4.3
✱ Sourcegraph is initializing the internal database... (may take 15-20 seconds)
listen tcp 10.60.128.151:5005: bind: cannot assign requested address

Support images

If I open an image it opens as a binary file. It would be nice if I could see an actual image instead.

Gsuite SSO locks out admin user after initial setup

From the user:

There was a minor hiccup when I turned on SSO using gsuite that prevented me from logging in as the admin user. Repro instructions:

  1. Install sourcegraph server using docker image
  2. Create admin user with a valid email as part of the setup process
  3. Turn on SSO using gsuite (configured correctly)
  4. Attempt to login to admin user whose email now maps to a gsuite user.
  5. Login attempt will fail saying error 'email already exists' and you will be (at least I was) unable to login to that user again presumably because auto-user creation on first sso login failed with something like a postgres integrity error.

The only way I was able to resolve the issue was to blow away all of the server data files except for the sourcegraph.json config and restart the server. This time it worked and we haven't had any problems since.

Notes
This is likely due to:

  • The user created in the onboarding flow is not linked to SSO
  • SSO login prevents clobbering existing users
  • SSO user email equals the email of the initial admin user

Add "enable all repositories" button for admin

  • Issue type: feature request
  • Sourcegraph version: 2.5.0

A user requested the ability to enable all repositories at once during site setup:

Also, I added the repositories in sourcegraph but it looks like all of them are disabled to start, is there a way to enable all of them at once?

Today, the only options are to enable them 1 at a time (which is what most users prefer, to prevent cluttering up their instances with rarely-used repos), or to use the repos.list config option to specify the repos to clone.

test

  • Issue type:
  • Sourcegraph version:
  • OS Version:
  • Docker version:
Client:
 Version:      17.05.0-ce
 API version:  1.29
 Go version:   go1.7.5
 Git commit:   89658be
 Built:        Thu May  4 22:10:54 2017
 OS/Arch:      linux/amd64

Server:
 Version:      17.05.0-ce
 API version:  1.29 (minimum version 1.12)
 Go version:   go1.7.5
 Git commit:   89658be
 Built:        Thu May  4 22:10:54 2017
 OS/Arch:      linux/amd64
 Experimental: false

Steps to reproduce:

Browser extension fails to offer more actions in Firefox

This came from a user who emailed support:

  • Issue type: bug report
  • Sourcegraph version: browser extension (Firefox), Sourcegraph.com
  • OS Version: unknown

I cannot click "Click for additional actions...", because the space between the method and the popup is too large: The popup just disappears. No idea for a good solution though...

image

Example repo: https://github.com/SQiShER/java-object-diff/blob/master/src/main/java/de/danielbechler/diff/comparison/ComparisonConfigurer.java#L44:24

HT @koppor

Cross-repo jump to def to file removed in master fails (kubernetes)

Jump to def on [s.Create]https://sourcegraph.com/github.com/kubernetes/kubernetes@6430b1002c2900a1761cbd07cb77a1e4cf82b64e/-/blob/pkg/registry/extensions/deployment/registry.go#L69:16-69:22 breaks with Unable to open 'rest.go': open server/pkg/registry/rest/rest.go: file does not exist. error.

The file that we're attempting to jump to was removed in kubernetes/api@ab8ef47, and currently we don't take into the version information when performing a cross-repository jump-to-def.

The reason this isn't taking into account version information is that we need to support symbolic links in our VFS. k8s.io/apiserver/pkg/registry/rest is vendored in, but in a weird way via a symbolic link https://sourcegraph.com/github.com/kubernetes/kubernetes@6430b1002c2900a1761cbd07cb77a1e4cf82b64e/-/blob/vendor/k8s.io/apiserver (via @keegancsmith)

(HT @ahmetb)

Increase click target region for file tree navigation drawer

Currently, the click target is isolated to the icon but it would be nice if the clickable region was composed of the entire bounding box. This is especially apparent upon scrolling when the bounding box is more clearly defined by the color boundary.

Request: Add repo's issue panel

For easily track issues, an issue panel with full features would contribute to using Sourcegraph.
Nowadays give us a simple link to GitHub issue page is suggested.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.