Knowasiak
Difftastic: A diff that understands syntax

Difftastic: A diff that understands syntax

it's difftastic!

manual
crates.io
codecov.io

Difftastic is an experimental diff instrument that compares files per
their syntax.

See the e book to originate.

Total Instance

Screenshot of difftastic and JS

In this JavaScript example, we are in a position to gaze:

(1) Difftastic understands nesting. It highlights the matching { and
}, but understands that foo() hasn’t modified no matter the main
whitespace.

(2) Difftastic understands which lines can even smooth be aligned. Or no longer it is aligned
bar() on the left with bar(1) on the moral, no matter their modifications.

(3) Difftastic understands that line-wrapping is rarely always
meaningful. "eric" is now on a brand contemporary line, but it surely hasn’t modified.

One Minute Demo

asciicast

This one minute screencast demonstrates difftastic usage with every
standalone files and git.

Languages

Difftastic supports the next languages:

  • Bash
  • C
  • C++
  • C#
  • Clojure
  • Common Relate
  • CSS
  • Race
  • Elixir
  • Emacs Relate
  • Hasten
  • Haskell
  • Java
  • JavaScript (and JSX)
  • JSON
  • OCaml
  • PHP
  • Python
  • Ruby
  • Rust
  • Scala
  • TypeScript (and TSX)

If a file has an unrecognised extension, difftastic makes notify of a
textual diff with observe highlighting.

Known Factors

Performance. Difftastic scales slightly poorly on files with a huge
sequence of modifications, and would possibly maybe notify loads of memory.

Command. Difftastic has an aspect-by-aspect expose which in overall works effectively, but can
be confusing.

Robustness. Difftastic regularly has releases that repair crashes.

Non-dreams

Patching. Difftastic output is supposed for human consumption, and it
does no longer generate patches that you just would possibly maybe practice later. Use diff while you
want a patch.

Merging. AST merging is a onerous discipline that difftastic does no longer
tackle.

License

Difftastic is open provide under the MIT license, gaze LICENSE for additional
particulars.

Recordsdata in sample_files/ are also under the MIT license except said
otherwise of their header.

Read More

About the author: Vanic
“Simplicity, patience, compassion. These three are your greatest treasures. Simple in actions and thoughts, you return to the source of being. Patient with both friends and enemies, you accord with the way things are. Compassionate toward yourself, you reconcile all beings in the world.” ― Lao Tzu, Tao Te Ching

Get involved!

Get Connected!
One of the Biggest Social Platform for Entrepreneurs, College Students and all. Come and join our community. Expand your network and get to know new people!

Discussion(s)

No comments yet
Knowasiak We would like to show you notifications so you don't miss chats & status updates.
Dismiss
Allow Notifications