This commit introduces REUSE compliance by annotating all files
with SPDX information and placing the reused licences in the
LICENSES folder.
We additionally removed the docheader tool which is made obsolete
by this change.
The main LICENSE and copyright text of the project is now not under
my personal name anymore, and it belongs to "The Respect Project
Contributors" instead.
This change restores author names to several files, giving the
appropriate attribution for contributions.
Having the template itself as a first argument makes the rule way more
intuitive. The third parameter is not as used as the first one, so, even
though it's very connected with the template, I thought it was better to
keep it as the third argument.
The `setTemplate()` method can be confusing, as it can be tricky for
someone to determine which chain is being templated. Using the
`Templated` rule makes this much more explicit and adds a little bit of
verbosity. For users, this will be a significant change, but there are
easy ways to update this code in their projects, so I’m not overly
concerned about it.
Another benefit of this change is that it makes the `Validator` much
simpler, as it no longer needs to track the template. This change also
makes the `Reducer` simpler, for similar reasons to the `Validator`.
However, because the `Validator` is simpler, we can remove the code that
the `Reducer` had to meet the specific needs of the `Validator`.
The `{{name}}` placeholder could represent different things depending on
the state of the Result, and referring to it as `{{name}}` seems
arbitrary. This commit changes it to `{{subject}}`, which is much more
generic and it describes well what that placeholder can mean.
Currently, the templates that a user provides when running `assert()`
can significantly impact how the message is displayed. Because of this,
the formatters become complex as they all need to handle similar
conditions to format results.
This commit changes this behaviour, letting only the
`InterpolationRenderer` handle the templates. This makes the code
simpler and allows people to use the `InterpolationRenderer` directly,
without needing to figure out how to handle templates. Thinking about it
further, I believe handling templates is a concern for the `Renderer`
anyway, and this will open the way to other improvements using the
renderer.
I also removed the exception that is thrown when the template is not a
string, because I think that after validation has failed, we should not
throw any other exceptions, as that could cause unexpected errors for
users.