-
Notifications
You must be signed in to change notification settings - Fork 1
Probes
The project have two probes. Those are CodeChanges and StaticAnalysis. You can see the probe structure at Probe.cs
Example probe
{
"Id": "4fd9390d-0cae-41e1-95c3-85a1b1e94e69",
"ProbeType": "StaticAnalysis",
"Object": {
"Name": "metricTest",
"Path": "sum.js",
"Type": "function"
},
"Modifiers": null,
"CreationDate": "2018-02-07T01:03:07.334765+03:00",
"Metrics": {
"Strategy": "Always",
"Arguments": [
"max-depth: [\"error\", 2]",
"complexity: [\"error\", 2]"
]
}
}
A repository must have .triggr
folder at the top level of repository. That folder contains json files as above with any file name. You can see an example repository from here.
Before the probe activity, the system is extract the object information or itself from file path. This approach only activated with when LanguageProperties.FullProject = false
.
It is basically comparing the old version and the new version of object as strings.
In the project I have setup two static analysis tool for JavaScript and Python.
I have used ESLint for static analysis tool of JavaScript.
eslint filepath --rule "max-depth: [\"error\", 2]"
Pylint is static analysis tool for Python programming language.
pylint filepath