|
1 |
| -# Code Climate Engine specification |
| 1 | +# Code Climate Engine Specification |
2 | 2 |
|
3 |
| -**Note: This specification is a draft. We welcome your suggestions for improvement, and there may be bumps along the way!** |
| 3 | +**Note: This specification is a living, versioned document. We welcome your participation and appreciate your patience as we finalize the platform.** |
4 | 4 |
|
5 | 5 | ## Overview
|
6 | 6 |
|
@@ -182,6 +182,37 @@ Contents give more information about the issue's check, including a description
|
182 | 182 |
|
183 | 183 | Some engines require the ability to refer to other source locations. For this reason, the Issue type has an optional `other_locations` field, which is an array of other `Location` items that this issue needs to refer to.
|
184 | 184 |
|
| 185 | +## Versioning |
| 186 | + |
| 187 | +This specification is versioned. The current version is [in the repository](https://github.com/codeclimate/spec/blob/master/VERSION). Engines declare the version of the specification they are compatible with in the manifest file, described below. |
| 188 | + |
| 189 | +## Engine Config File |
| 190 | + |
| 191 | +All engines must include an `engine.json` file at `/engine.json`. This file includes information that is necessary for the analysis runtime and metadata about the engine. Here is an example config: |
| 192 | + |
| 193 | +``` |
| 194 | +{ |
| 195 | + "name": "govet", |
| 196 | + "description": "govet was created by the Go team at Google, and examines Go source code and reports suspicious constructs, and potential bugs.", |
| 197 | + "maintainer": { |
| 198 | + "name": "Michael R. Bernstein", |
| 199 | + |
| 200 | + }, |
| 201 | + "version": "da5a2077", |
| 202 | + "spec_version": "0.0.1", |
| 203 | +} |
| 204 | +``` |
| 205 | + |
| 206 | +The fields in the manifest include: |
| 207 | + |
| 208 | +* `name` (`String`) - the name of the package |
| 209 | +* `description` (`String`) - a description of the engine |
| 210 | +* `maintainer` (`Object`) - data about the engine maintainer |
| 211 | + * `name` (`String`) - the name of the maintainer |
| 212 | + * `email` (`String`) - the email address of the maintainer |
| 213 | +* `version` (`String`) - engine version, an arbitrary string maintained by the engine maintainer |
| 214 | +* `spec_version` (`String`) - the version of the specification which this engine supports |
| 215 | + |
185 | 216 | ## Packaging
|
186 | 217 |
|
187 | 218 | Engines are packaged and distributed as Docker images, which allows them to be
|
|
0 commit comments