Open hbt opened 3 years ago
@hbt: Thanks for this, guru
looks nice.
Still digesting your message. My early thoughts:
Right now, Locust produces output that looks like this:
{
"initial_ref": "<initial git revision>",
"terminal_ref": "<terminal git revision>",
"locust": [ <array of new or modified function and class definitions in the code> ]
}
We should modify this to look like:
{
"initial_ref": "<initial git revision>",
"terminal_ref": "<terminal git revision>",
"summary": {
"definitions": [ <array from current summary> ],
"dependencies": [ <changes to symbols used in each scope - module/package/file level, as well as at the level of functions, classes> ],
"todos": [ <changed (created, updated, or deleted) todos parsed from comments> ],
"authors": [ <person responsible for changes in each scope> ],
....
}
}
The responsibility of populating this object can lie with plugins. Currently, we have a JS plugin which produces definition changes from Javascript code. This should be extended to populating arbitrary paris of (metadata type, programming language)
.
You mention a few things that fall under "analysis of metadata":
I see these things as use cases locust can support as a metadata provider. Anyone should be able to use Locust metadata as input to programs which produce these outputs.
Hello zomglings,
hbt here from https://news.ycombinator.com/item?id=25007701
I'd like to reply to your comment then explain what I'm planning to build
Your questions
Q:
A: There are already utilities for golang and existing apis.
Example of usage:
guru -json -scope "github.com/hbt/fh/cmd/hbt-cli" callers "hbt-cli/lib/util/git/git.go:#645"
Example of output:
The guru tool uses an existing library to do the AST parsing and provides an API for querying go programs.
This is also pretty good for querying AST across multiple languages
My goal
My main goal is:
provide a better "git diff" prior to committing code and detect the following issues
commit metadata and value of a commit: we often say, writing software is about iteration but somehow that doesn't apply to writing a commit and we are expected to get everything right (message, changes within scope etc.)
Anyway, as soon as I find the bandwidth, I will push out something more concrete.