srclib

srclib是一个用于构建更好软件工具的可魔改的多语言代码分析库。(srclib is a hackable, multi-language code analysis library for building better software tools.)

  • 所有者: sourcegraph/srclib
  • 平台:
  • 許可證: Other
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

srclib Build Status

Note: srclib is alpha.
Post an issue if you have any
questions or difficulties running and hacking on it.

srclib is a source code analysis library. It
provides standardized tools, interfaces and data formats for
generating, representing and querying information about source code in
software projects.

Why? Right now, most people write code in editors that don't give them as
much programming assistance as is possible. That's because creating an editor
plugin and language analyzer for your favorite language and editor combo is a
lot of work. And when you're done, your plugin only supports a single language
and editor, and maybe only half the features you wanted (such as doc lookups and
"find usages"). Because there are no standard cross-language and cross-editor
APIs and formats, it is difficult to reuse your plugin for other languages or
editors.

We call this the M-by-N problem: given M editors and N languages, we
need to write (on the order of) M×N plugins to get good tooling in
every case. That number gets large quickly, and it's why we suffer from poor
developer tools.

srclib solves this problem in 2 ways by:

  • Publishing standard formats and APIs for
    source analyzers and editor plugins to use. This means that improvements in a
    srclib language analyzer benefit users in any editor, and improvements in a
    srclib editor plugin benefit everyone who uses that editor on any language.

  • Providing high-quality language analyzers that implement this
    standard. These power Sourcegraph.com.

Step 1 is to build the language analyzers. Next up, we will build the
editor plugins!

See srclib.org for more information.

Currently, srclib supports:

  • Languages: Go, JavaScript, and Ruby (coming very soon: Python, Java, and Bash)

  • Features: jump-to-definition, find usages, type inference, documentation
    generation, and dependency resolution

Want to extend srclib to support more languages, features, or editors?
We'll help!
Post an issue to let
us know what you're building to get started.

Usage

See Getting started for installation
instructions.

Misc.

  • bash completion for srclib: run source contrib/completion/srclib-completion.bash or
    copy that file to /etc/bash_completion.d/srclib (path may be different
    on your system)

Development

srclib binary release process

Contributors with deploy privileges can update the official binaries
via these instructions:

  1. go get -u github.com/laher/goxc
  2. Ensure you have the AWS credentials set so that the AWS CLI (aws) can write to the srclib-release S3 bucket.
  3. Run make release V=1.2.3, where 1.2.3 is the version you want to release (which can be arbitrarily chosen but should be the next sequential git release tag for official releases).

License

srclib is licensed under the MIT License.
More information in the LICENSE file.

Contributing

If you want to start hacking on srclib or write your own srclib toolchain, join the srclib Slack and then access it on srclib.slack.com.
Don't forget to introduce yourself on the #General channel. We are more than happy to meet new contributors and to help people to get started.

主要指標

概覽
名稱與所有者sourcegraph/srclib
主編程語言Go
編程語言Makefile (語言數: 4)
平台
許可證Other
所有者活动
創建於2014-07-19 04:38:41
推送於2016-09-19 04:09:20
最后一次提交2016-08-30 09:42:21
發布數75
最新版本名稱v0.2.5 (發布於 )
第一版名稱v0.0.1 (發布於 )
用户参与
星數0.9k
關注者數111
派生數61
提交數1.7k
已啟用問題?
問題數129
打開的問題數64
拉請求數148
打開的拉請求數2
關閉的拉請求數28
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?