Interface IApiSurfaceHelper
- Namespace
- Invex.RepoUtils.Atom.Module.Helpers
- Assembly
- Invex.RepoUtils.Atom.Module.dll
Provides functionality for analyzing the public API surface of the repository by diffing the tracked API definition files between two commits and classifying the resulting changes as either major (removals) or minor (additions) breaking changes.
public interface IApiSurfaceHelper : IBuildAccessor
- Inherited Members
-
IBuildAccessor.GetService<T>()IBuildAccessor.GetServices<T>()IBuildAccessor.GetParam<T>(Expression<Func<T>>, T, Func<string, T>)IBuildAccessor.ServicesIBuildAccessor.LoggerIBuildAccessor.RootedFileSystemIBuildAccessor.ProcessRunner
Methods
IdentifyBreakingChanges(SemVer, string, SemVer, string, params IEnumerable<RootedPath>)
Compares the contents of the supplied files between two commits and determines which changes constitute breaking changes to the public API surface.
BreakingChanges IdentifyBreakingChanges(SemVer oldVersion, string oldCommitHash, SemVer newVersion, string newCommitHash, params IEnumerable<RootedPath> filesToCheck)
Parameters
oldVersionSemVerThe semantic version associated with
oldCommitHash(used for logging).oldCommitHashstringThe SHA of the baseline commit to compare from.
newVersionSemVerThe semantic version associated with
newCommitHash(used for logging).newCommitHashstringThe SHA of the commit to compare to.
filesToCheckIEnumerable<RootedPath>The API definition files whose changes should be analyzed.
Returns
- BreakingChanges
A BreakingChanges instance describing the major and minor breaking changes that were detected. When no relevant changes exist, the returned lists are empty.
Exceptions
- InvalidOperationException
Thrown when either
oldCommitHashornewCommitHashcannot be resolved to a commit in the repository.