Vadim Markovtsev 7 rokov pred
rodič
commit
a116a84960
3 zmenil súbory, kde vykonal 24 pridanie a 4 odobranie
  1. 22 3
      PLUGINS.md
  2. 1 1
      README.md
  3. 1 0
      burndown.go

+ 22 - 3
PLUGINS.md

@@ -1,20 +1,39 @@
 Hercules plugins
 ================
 
-Generate a new plugin skeleton:
+### Prerequisites
+
+It is required to have [GoGo Protobuf](https://github.com/gogo/protobuf) installed:
+
+```
+go get github.com/gogo/protobuf/protoc-gen-gogo
+```
+
+There must be the `protoc` tool available in `$PATH`, version 3. Grab it from the
+[official Protocol Buffers releases page](https://github.com/google/protobuf/releases) (`protoc-*.zip`).
+
+### Creating a new plugin
+
+Generation of a new plugin skeleton:
 
 ```
 hercules-generate-plugin -n MyPluginName -o my_plugin
 ```
 
-Compile:
+This command creates:
+
+* `my_plugin/my_plugin_name.go` with the plugin source code. Refer to the docs about [LeafPipelineItem]().
+* `my_plugin/my_plugin_name.proto` which defines the Protocol Buffers scheme of the result
+* `my_plugin/my_plugin_name.pb.go` is generated from `my_plugin/my_plugin_name.proto`
+
+Compilation:
 
 ```
 cd my_plugin
 make
 ```
 
-Use:
+### Using a plugin
 
 ```
 hercules -plugin my_plugin_name.so -my-plugin-name https://github.com/user/repo

+ 1 - 1
README.md

@@ -9,7 +9,7 @@ written in Go which takes a Git repository and runs a Directed Acyclic Graph (DA
 The second is the Python script which draws some predefined plots. These two tools are normally used together through
 a pipe. It is possible to write custom analyses using the plugin system.
 
-[![git/git image](doc/dag.png)](doc/dag_original.png)
+[git/git image](doc/dag.png)
 <p align="center">The DAG of burndown and couples analyses with UAST diff refining. Generated with <code>hercules -burndown -burndown-people -couples -feature=uast -dry-run -dump-dag doc/dag.dot https://github.com/src-d/hercules</code></p>
 
 ![git/git image](doc/linux.png)

+ 1 - 0
burndown.go

@@ -457,6 +457,7 @@ func (analyser *BurndownAnalysis) handleModification(
 
 	file, exists := analyser.files[change.From.Name]
 	if !exists {
+		// this indeed may happen
 		return analyser.handleInsertion(change, author, cache)
 	}