Constructor
new Clone(path, repo)
Parameters:
Name | Type | Description |
---|---|---|
path |
string | Path to the repository location on drive |
repo |
Git.Clone | A Git.Clone instance |
Methods
(async, static) init(url, optionsopt) → {Promise.<Clone>}
Initialize and return an instance of the Clone class.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
url |
string | A valid URL to a Git repository. | |
options |
CloneOptions |
<optional> |
cloning options |
Returns:
A promise to a Clone instance.
- Type
- Promise.<Clone>
(async) foreachCommit(commits, action, catcher) → {Array.<(T|S)>}
Maps an action function to all the commits provided. If the action
function throws an error, applies the catcher funtion to that commit.
Then returns the results in the order given.
Parameters:
Name | Type | Description |
---|---|---|
commits |
Array.<Commit> | The list of Commit. |
action |
commitActionFunction.<T> | The function to apply to each commit |
catcher |
commitCatcherFunction.<S> | The function to catch errors if the action function throws. |
Returns:
- The results
- Type
- Array.<(T|S)>
(async) headCommitHistory() → {Promise.<Array.<Commit>>}
Gets the commit history from the HEAD commit
Returns:
The commit history. See Commit.
- Type
- Promise.<Array.<Commit>>
(async) staticAnalysis(optionsopt) → {Object.<string, ExtensionSummary>}
Performs static analysis of code on disk and returns a report of the results.
Parameters:
Name | Type | Attributes | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
<optional> |
The options
Properties
|
Returns:
An object with file extensions as keys and an object with
all static analyses results as the value.
- Type
- Object.<string, ExtensionSummary>