Skip to content

insert_license - Only first year range is replaced in existing license #64

Description

@pezcode

When a license exists in a file and insert_license with --use-current-year updates the year, it only does so for the first line containing a year:

 * Copyright © 2020-2022 Steve Luamo <steve@luamo.com>
 * Copyright © 2015-2022 Leve Stuamo <leve@stuamo.com>

becomes (note the 2022 in the second line):

 * Copyright © 2020-2023 Steve Luamo <steve@luamo.com>
 * Copyright © 2015-2022 Leve Stuamo <leve@stuamo.com>

This seems to be intentional since the comment in try_update_year_range() says "The change will affect only the first line containing years". But I'm not sure why this limitation exists and whether it could be lifted.

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions