dextool.plugin.mutate.backend.diff_parser

Members

Functions

diffFromStdin
Diff diffFromStdin()
Undocumented in source. Be warned that the author may not have intended to support it.
toDiff
Diff toDiff(Range r)

Parse a range of lines to a diff.

Structs

Diff
struct Diff
Undocumented in source.
DiffRange
struct DiffRange
Undocumented in source.
UnifiedDiffParser
struct UnifiedDiffParser

Parse a buffer in the Unified diff format and return the hunks of changes in the targets.

Examples

++ b/plugin/mutate/source/dextool/plugin/mutate/backend/database/standalone.d @@ -31,7 +31,6 @@ import std.algorithm : map; import std.array : Appender, appender, array; import std.datetime : SysTime; import std.format : format; -import std.typecons : Tuple;

import d2sqlite3 : sqlDatabase = Database;

@@ -46,7 +45,7 @@ import dextool.plugin.mutate.backend.type : Language; struct Database { import std.conv : to; import std.exception : collectException; - import std.typecons : Nullable; + import std.typecons : Nullable, Flag, No; import dextool.plugin.mutate.backend.type : MutationPoint, Mutation, Checksum;

sqlDatabase db;

Meta

License

MPL-2

Authors

Joakim Brännström (joakim.brannstrom@gmx.com)

This Source Code Form is subject to the terms of the Mozilla Public License, v.2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

This module contains a parser of diffs in the Unified Format. It is pretty limited because it only handles those that git normally output. The result are which lines has changes in what files.

https://www.gnu.org/software/diffutils/manual/html_node/Detailed-Unified.html#Detailed-Unified