Skip to content
L337-orgPublic

About

QUAntiFied File EDitor

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

quaffed

quaffed, the QUAntiFied File EDitor, is an editing language for making mechanical changes to code quick, accurate and reliable. Edits are structural rather than textual, and they are quantified: every edit declares how many matches it expects and what must be true before and after it, and if anything differs the edit does not happen at all. You find out at the end.

The binary is quaff, so you quaff a file, or quaff every file in a repository.

Status

Pre-release.

Installing

Packages are attached to each GitHub release.

Building from source

With a Rust toolchain installed (the version is pinned in rust-toolchain.toml, which rustup picks up automatically):

git clone https://github.com/L337-org/quaffed.git
cd quaffed
cargo build --release
./target/release/quaff -h

Running

quaff TODO                 # every TODO in the project, from wherever you are in it
quaff TODO src             # only under src
quaff -s TODO -s FIXME     # two searches, in turn
quaff -e 'find "TODO" expect none' src   # fail, exit 2, if any TODO is left
quaff -f checks.quaff      # a script file; -f - reads one from standard input
quaff -h                   # the rest

Each match prints as path:line:column-endline:endcolumn: text. With no assertion, the exit status is 0 when something was found and 1 when nothing was. With assertions, it is 0 when every one held and 2 when one did not. quaff -h lists the rest.

Contributing

See CONTRIBUTING.md for setup, conventions and how to submit a change, and CODE_OF_CONDUCT.md for the standards expected of everyone taking part. Security issues are reported privately; see SECURITY.md.

Privacy

quaffed makes no network connections and collects nothing; see PRIVACY.md.

Licence

GPL-3.0-or-later; see LICENSE. Running quaff over a project's files does not make that project a derivative work, in the same way that compiling with a GPL compiler does not, and scripts you write for it carry whatever licence your own project chooses.

About

QUAntiFied File EDitor

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Used by

Contributors

Languages