Awesome
<!-- GENERATED FILE - DO NOT EDIT This file was generated by [MarkdownSnippets](https://github.com/SimonCropp/MarkdownSnippets). Source File: /readme.source.md To change this file edit the source file and then run MarkdownSnippets. --><img src="/src/icon.png" height="30px"> DiffEngine
DiffEngine manages launching and cleanup of diff tools. It is designed to be used by any Snapshot/Approval testing library.
See Milestones for release notes.
Currently used by:
<!-- toc -->Contents
- NuGet package
- Supported Tools
- Launching a tool
- Closing a tool
- File type detection
- BuildServerDetector
- Disable for a machine/process
- Disable in code
- Icons<!-- endToc -->
- Tools<!-- include: doc-index. path: /docs/mdsource/doc-index.include.md -->
- Tool Order
- Custom Tool
- DiffEngineTray
- Code versus machine level settings<!-- endInclude -->
NuGet package
Supported Tools
- BeyondCompare Win/OSX/Linux (Cost: Paid)<!-- include: diffToolList. path: /src/DiffEngine.Tests/diffToolList.include.md -->
- P4Merge Win/OSX/Linux (Cost: Free)
- Kaleidoscope OSX (Cost: Paid)
- DeltaWalker Win/OSX (Cost: Paid)
- WinMerge Win (Cost: Free with option to donate)
- TortoiseGitMerge Win (Cost: Free)
- TortoiseGitIDiff Win (Cost: Free)
- TortoiseMerge Win (Cost: Free)
- TortoiseIDiff Win (Cost: Free)
- KDiff3 Win/OSX (Cost: Free)
- TkDiff OSX (Cost: Free)
- Guiffy Win/OSX (Cost: Paid)
- ExamDiff Win (Cost: Paid)
- Diffinity Win (Cost: Free with option to donate)
- Rider Win/OSX/Linux (Cost: Paid with free option for OSS)
- Vim Win/OSX (Cost: Free with option to donate)
- Neovim Win/OSX/Linux (Cost: Free with option to sponsor)
- AraxisMerge Win/OSX (Cost: Paid)
- Meld Win/OSX/Linux (Cost: Free)
- SublimeMerge Win/OSX/Linux (Cost: Paid)
- VisualStudioCode Win/OSX/Linux (Cost: Free)
- VisualStudio Win (Cost: Paid and free options)<!-- endInclude -->
Launching a tool
A tool can be launched using the following:
<!-- snippet: DiffRunnerLaunch --><a id='snippet-DiffRunnerLaunch'></a>
await DiffRunner.LaunchAsync(tempFile, targetFile);
<sup><a href='/src/DiffEngine.Tests/DiffRunnerTests.cs#L63-L67' title='Snippet source file'>snippet source</a> | <a href='#snippet-DiffRunnerLaunch' title='Start of snippet'>anchor</a></sup>
<!-- endSnippet -->Note that this method will respect the above difference behavior in terms of Auto refresh and MDI behaviors.
Closing a tool
A tool can be closed using the following:
<!-- snippet: DiffRunnerKill --><a id='snippet-DiffRunnerKill'></a>
DiffRunner.Kill(file1, file2);
<sup><a href='/src/DiffEngine.Tests/DiffRunnerTests.cs#L76-L80' title='Snippet source file'>snippet source</a> | <a href='#snippet-DiffRunnerKill' title='Start of snippet'>anchor</a></sup>
<!-- endSnippet -->Note that this method will respect the above difference behavior in terms of MDI behavior.
File type detection
DiffEngine use EmptyFiles to determine if a given file or extension is a binary or text. Custom extensions can be added, or existing ones changed.
BuildServerDetector
BuildServerDetector.Detected
returns true if the current code is running on a build/CI server.
Supports:
Disable for a machine/process
Set an environment variable DiffEngine_Disabled
with the value true
.
Disable in code
DiffRunner.Disabled = true;
Icons
Game designed by Andrejs Kirma from The Noun Project.
Tray icons from LineIcons.