semantic

Parsing, analyzing, and comparing source code across many languages

インストール方法

公式ドキュメント通り cabal でビルドする。

$ git clone git@github.com:github/semantic.git
$ cd semantic

$ script/bootstrap
$ cabal build
$ cabal test
$ cabal run semantic -- --help
semantic -- Semantic (syntax-aware) diffs, program analysis toolkit

Usage: semantic [-v|--version] [--log-level error|warning|info|debug|none] 
                [--fail-on-warning] [--fail-on-parse-error] [--log-paths]
                COMMAND [-o|--output ARG]

Available options:
  -v,--version             Output the version of the program
  -h,--help                Show this help text
  --log-level error|warning|info|debug|none
                           Log messages at or above this level, or disable
                           logging entirely. (default: warning)
  --fail-on-warning        Fail on assignment warnings.
  --fail-on-parse-error    Fail on tree-sitter parse errors.
  --log-paths              Log source paths on parse and assignment error.
  -o,--output ARG          Output path, defaults to stdout

Available commands:
  diff                     Compute changes between paths
  parse                    Generate parse trees for path(s)
  graph                    Compute a graph for a directory or from a top-level
                           entry point module

Last updated