Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No longer make copyright lines stringly typed #947

Open
carmenbianca opened this issue Apr 8, 2024 · 0 comments
Open

No longer make copyright lines stringly typed #947

carmenbianca opened this issue Apr 8, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@carmenbianca
Copy link
Member

Presently, copyright lines are stringly typed in the tool. The whole thing SPDX-FileCopyrightText: 2016, 2018--2020, 2023--present Carmen Bianca BAKKER <carmenbianca@fsfe.org> is one string.

I think it might make sense to write some kind of CopyrightLine class that can parse elements from such strings. For example, the above properties of the above example:

  • copyright_prefix - SPDX-FileCopyrightText
  • date_range - some DateRange object that can encode the concept of 2016, 2018--2020, and 2023--present. Or, if that all is too over-engineered, just the string 2016, 2018--2020, 2023--present
  • name - Carmen Bianca BAKKER
  • contact - carmenbianca@fsfe.org

If implemented well, this could heavily simplify date-range merging, which is currently spaghetti code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant