Skip to content

Alibi 0.4.15

Choose a tag to compare

@github-actions github-actions released this 05 Dec 02:50
· 99 commits to trunk since this release

Added

  • alibi add FILE.kdl PATH:LINE writes an alibi for one match into an alibi file that alibi init wrote, and says which
    alibi it added, by its ID, and the command that checks it. PATH:LINE is the start of the line that the check prints
    for the match, and PATH:LINE:COLUMN picks one of several matches that start on that line. Before it writes, it asks
    four questions, one at a time: what was tried, to fix the code instead (tried), the evidence (evidence), why a
    fix is impossible (unfixable), and the reason (reason), and keeps each answer in the alibi. Each answer comes from
    the file given to --tried-file, --evidence-file, --unfixable-file, or --reason-file, - for standard input,
    or from the editor at a terminal. A run with no answer to a question shows that question, the command line to
    run with its flag, and how to stop, and exits with 2. An answer with nothing in it stops the command. alibi add
    chooses the snippet, the fewest lines around the match that occur once in its file, and the occurrence when they
    hold other matches. It refuses, with exit status 2 and nothing written, an alibi file that is missing or written by
    hand, a match address where no match starts, or several, or one that an alibi excuses already, and an alibi file that
    changed while the questions were asked.

Changed

  • alibi init refuses a --files, --pattern, --example, or --about-file that the command line gives twice, as a
    command line it can't use: it writes alibi: --files was given 2 times: give it once, naming the flag and how many
    times the command line gave it, then the hint, exits with 2, and writes nothing. 0.4.12 kept the last and ignored the
    first without a word.