reuse-tool
reuse-tool copied to clipboard
Add flag `--replace` to `annotate`
Example foo.py:
# Copyright (c) Wrong Information Here
# Rest of the header
print("Hello, world!")
Following e.g. reuse annotate --replace --copyright Carmen foo.py:
# SPDX-FileCopyrightText: 2023 Carmen
print("Hello, world!")
Mutually exclusive with --no-replace.
Probably also exclusive with --merge-copyrights.
Then one case would be missing: Replace the line # Copyright (c) Wrong Information Here but keep the line # Rest of the header ;)
I think that's a separate issue. It'd be nice if we could split comments like this:
# Copyright 2023 Jane Doe
#
# This module puts the foo in foobar, inspired by baz, bla bla bla bla bla.
And then when you run reuse annotate --split-first-comment --license MIT, you get something like:
# Copyright 2023 Jane Doe
#
# SPDX-License-Identifier: MIT
# This module puts the foo in foobar, inspired by baz, bla bla bla bla bla.