Skip to content

Releases: fsfe/reuse-tool

v6.2.0

27 Oct 15:31
v6.2.0
a1bb792

Choose a tag to compare

Added

  • Added new file extensions and files:
    • .arcconfig, .arclint, .arcunit (#1123)
    • .nvmrc (#1211)
    • .smk, Snakefile, matplotlibrc (#1206)
    • .yamllint (#1124)
    • uv.lock (#1156)
    • dune, dune-project, dune-workspace (#1208)
  • file-magic is now supported as an additional module for detecting the
    encoding of files. (#1264)
  • Support deprecated licences for reuse download. (#606)
  • Markdown files which have frontmatter (i.e. yaml or toml between a --- block
    at the start of the file) now get Python-like comments inside of the
    frontmatter when annotating. (#1170)

Fixed

  • When file-magic is installed simultaneously with python-magic, the tool
    used to misbehave (read: crash), because either one of them could be imported
    on import magic. This misbehaviour no longer happens. (#1264)
  • Invalid SPDX license expressions are no longer recognized as used or missing
    licenses. (#1254)
  • click translations are now correctly loaded. (#1267)

v6.1.2

07 Oct 22:04
v6.1.2
a51ee93

Choose a tag to compare

Fixed

  • Fixed a bug where a newline would sometimes be missing from
    reuse lint --lines. (#1251)
  • The output of reuse lint --lines is now sorted by path name. (#1251)
  • Fixed a performance regression introduced in v6.1.1 that would cause some
    copyright notices to take incredibly long to parse. (#1252)

v6.1.1

07 Oct 19:35
v6.1.1
d7c4127

Choose a tag to compare

Changed

  • In the Docker images, Alpine is bumped to alpine:3.22 and Debian to
    debian:13-slim. (#1247)

Fixed

  • ASCII frames around comments were broken in v6.0.0. They now work again. The
    sole condition is that the 'suffix' of a comment is identical to its 'prefix'.
    For example:

    /*******************************************\
    |*  SPDX-License-Identifier: CC-BY-SA-4.0  *|
    \*******************************************/
    

    (#1249)

v6.1.0

07 Oct 13:47
v6.1.0
fb8d3d9

Choose a tag to compare

This release adds a simple feature as a workaround for a bug that will be
resolved in a later version. The bug is described in
#1244, and can be summarised as: When
charset-normalizer is used to detect the encoding of a file, it will
erroneously detect a UTF-8 file as having no encoding (i.e. a binary file) when
the 2048th byte is a non-final byte of a multi-byte glyph.

You can run reuse as REUSE_ENCODING_MODULE=chardet reuse to circumvent this
bug. If you use pre-commit, you can use this snippet:

repos:
  - repo: https://github.com/fsfe/reuse-tool
    rev: v6.1.0
    hooks:
      - id: reuse
        entry: env REUSE_ENCODING_MODULE=chardet reuse

You will not encounter this bug if your environment has libmagic available.

Added

  • You can now specify the module that will be used for detecting the encoding of
    files with the REUSE_ENCODING_MODULE environment variable. (#1245)
  • The Docker images and the pre-commit hooks now come bundled with all encoding
    modules. (#1245)
  • The --debug flag now tells you the detected encoding and detected newlines
    of each file, as well as which encoding module is used. (#1246)

v6.0.0

06 Oct 14:33
v6.0.0
d057746

Choose a tag to compare

This release contains a lot of refactoring regarding the parsing of files. The
most impactful details are that reuse lint now searches every file in its
entirety for REUSE information, tries to detect each file's encoding, and no
longer breaks when invalid SPDX License Expressions are detected.

Because files are now read in their entireties instead of just the first 4 KiB,
you may need to add REUSE-IgnoreStart and REUSE-IgnoreEnd tags to get rid of
false positives that were previously too deep into files for reuse to detect.

For package maintainers: This release removes, adds, and changes
dependencies. It merits running git diff v5.1.1..v6.0.0 pyproject.toml and
reading the 'Changed' section of this change log to see what changed.

Added

  • Added new file extensions:
  • A new criterion 'Invalid SPDX License Expressions' has been added to
    reuse lint. Invalid expressions are SPDX License Expressions which are not
    valid according to the grammar of the SPDX specification. (#1240)

Changed

  • Python 3.9 support dropped. (#1219)
  • The Python requirement for reuse now no longer requires a lower major
    version than 4. The requirement is now >=3.10 instead of >=3.10,<4.
    (#1219)
  • Dependency changes:
    • Removed explicit dependency boolean.boolean. It is now an implicit
      dependency via license-expression. (#1240)
    • The dependency python-magic has been added, alongside the optional
      dependencies charset-normalizer and chardet. So long as at least one of
      these is installed, the program will work. (#1235)
    • The dependency binaryornot has been removed. (#1235)
    • The minimum requirements of several dependencies have been updated. (#1235,
      #1241)
  • reuse lint now always searches the entire file for REUSE information.
    Previously, it only searched the first 4 KiB under most circumstances. (#1229)
  • The encodings of files are now detected before they are read or altered.
    (#1235, #1218)
  • The 'Bad licenses' criterion in reuse lint previously searched for bad
    licenses in every single file. Now, only bad licenses in LICENSES/ are
    detected, which is more in line with the documentation. (#1240)
  • The behaviour of the --year option to reuse annotateis now different.
    Previously, you could define --year <year> multiple times. Now you can only
    do so once, but the value may be a string containing multiple years or a range
    of years. (#1145)
  • reuse annotate --merge-copyrights works more efficiently now, capable of
    better heuristics to detect years and year ranges. (#1145)
  • reuse annotate --merge-copyrights no longer adds spacing around the merged
    year ranges. i.e. 2017-2025, not 2017 - 2025. (#1145)

Fixed

  • Unparseable SPDX expressions in a file now no longer cause the collection of
    REUSE information from that file to entirely fail. (#1240)
  • Files with carriage return (\r) line endings are now correctly linted.
    (#1235, #1226)
  • There used to be a specific scenario where reuse lint would read the
    contents of an entire file into memory. This no longer happens.
    reuse annotate will still read the entire file into memory. (#1229)
  • Fixed formatting in lint subcommand help message. (#1212, #1236)
  • Fixed a case where, if a recognised file extension (such as .blade.php) has
    two or more components, it would not be correctly recognised. (#573)
  • Fixed a bug where, if REUSE-IgnoreStart is the very first thing that appears
    in a file, the subsequent text is not actually ignored. (#1229)
  • If using reuse annotate to write to a file, the BOM is preserved if the
    encoding is UTF-8, UTF-16, or UTF-32. (#1235, #384)
  • The summaries of reuse lint are now sorted better. (#1241)
  • Several performance improvements. Local testing on a 12-core laptop suggests
    speedup of up to 50%, but it may depend on your repository. (#1222, #1223,
    #1230, #1241)

v5.1.1

05 Sep 15:01
v5.1.1
ba42a0b

Choose a tag to compare

Fixed

  • Fixed repository file detection using jujutsu versions 0.19.0 or later.
    (#1191)
  • Fixed a bug that caused not all strings to be marked translatable. This bug
    was introduced in v5.0.0. Strings that were already translated before the
    release of v5.0.0 are now translated again. (#1216)

v5.1.0

04 Sep 13:36
v5.1.0
634a182

Choose a tag to compare

Added

  • Added new file extensions:
    • .dtd (#1141)
    • .gperf (#1131)
    • Erlang .erl and .hrl, leex and yecc Erlang parser generators .xrl and
      .yrl (#1117)
    • Elixir (.ex and .exs) (#1117)
    • Gleam (.gleam) (#1117)
    • Lean (.lean, .olean, and .ilean) (#1188)
  • Added --json flag to the supported-licenses subcommand. (#1187)

Changed

  • Revert Cargo.lock to uncommentable. (#1169)
  • reuse annotate previously would insert a newline after a header, which is
    not always a desirable behavior. Instead of inserting a newline,
    reuse annotate will now respect the existing whitespace of the file where
    the header is being placed. When the license header is being added to a file
    for the first time, a space will be added after the license, but subsequent
    updates to the header will leave the whitespace alone. (#1136)
  • Updated spdx-license-list-data to v3.27.0.

v5.0.2

14 Nov 09:34
v5.0.2
920b644

Choose a tag to compare

Fixed

  • The release date for the v5.0.0 entry in the change log was wrong.

v5.0.1

14 Nov 09:23
v5.0.1
fd7b76c

Choose a tag to compare

Fixed

  • Fix readthedocs build.

v5.0.0

14 Nov 09:22
v5.0.0
c1bbaaf

Choose a tag to compare

This is a big release for a small change set. With this release, the tool
becomes compatible with
REUSE Specification 3.3, which is a very
subtly improved release of the much bigger version 3.2.

Added

  • More file types are recognised:
  • Added lint-file subcommand to enable running lint on specific files. (#1055)
  • Added shell completion via click. (#1084)
  • Added Jujutsu VCS support. (#TODO)
  • Added new copyright prefixes spdx-string, spdx-string-c, and
    spdx-string-symbol. (#979)
  • Support for Python 3.13. (#1092)

Changed

  • Bumped REUSE Specification version to
    version 3.3. (#1069)

  • Switched from argparse to click for handling the CLI. The CLI should still
    handle the same, with identical options and arguments, but some stuff changed
    under the hood. (#1084)

    Find here a small list of differences:

    • -h is no longer shorthand for --help.
    • --version now outputs "reuse, version X.Y.Z", followed by a licensing
      blurb on different paragraphs.
    • Some options are made explicitly mutually exclusive, such as annotate's
      --skip-unrecognised and --style, and download's --output and
      --all.
    • Subcommands which take a list of things (files, license) as arguments, such
      as annotate, lint-file, or download, now also allow zero arguments.
      This will do nothing, but can be useful in scripting.
    • annotate and lint-file now also take directories as arguments. This will
      do nothing, but can be useful in scripting.
  • Changes to comment styles:

    • Allow Python-style comments in Cargo.lock files. (#1060)
    • .s files (GNU as) now use the C comment style. (#1034)
    • .ld files (GNU ld) now use the C comment style. (#1034)
  • REUSE.toml no longer needs a licensing header. (#1042)

  • .gitkeep is no longer ignored, because this is not defined in the
    specification. However, if .gitkeep is a 0-size file, it will remain ignored
    (because 0-size files are ignored). (#1043)

  • If REUSE.toml is ignored by VCS, the linter no longer parses this file.
    (#1047)

  • SPDX license and exception list updated to v3.25.0.

  • More LICENSE and COPYING-like files are ignored. Now, such files suffixed
    by -anything are also ignored, typically something like LICENSE-MIT. Files
    with the UK spelling LICENCE are also ignored. (#1041)

Removed

  • Python 3.8 support removed. (#1080)

Fixed

  • In REUSE.toml, fixed the globbing of a single asterisk succeeded by a slash
    (e.g. directory-*/foo.py). The glob previously did nothing. (#1078)
  • Increased the minimum requirement of attrs to >=21.3. Older versions do
    not import correctly. (#1044)
  • Performance greatly improved for projects with large directories ignored by
    VCS. (#1047)
  • Performance slightly improved for large projects. (#1047)
  • The plain output of lint has been slightly improved, getting rid of an
    errant newline. (#1091)
  • reuse annotate --merge-copyrights now works more reliably with copyright
    prefixes. This still needs some work, though. (#979)
  • In some scenarios, where a user has multiple REUSE.toml files and one of
    those files could not be parsed, the wrong REUSE.toml was signalled as being
    unparseable. This is now fixed. (#1047)
  • Fixed a bug where REUSE.toml did not correctly apply its annotations to
    files which have an accompanying .license file. (#1058)
  • When running reuse download SPDX-IDENTIFIER+, download SPDX-IDENTIFIER
    instead. This also works for reuse download --all. (#1098)