Skip to content

gdlint: add support for copyright #366

Closed as not planned
Closed as not planned
@mehmet-cgh

Description

@mehmet-cgh

It would be beneficial to include a copyright check feature in gdlint. I've already implemented this for my own use case, and it works well. I wanted to create an issue first to see if this is something we would like to have. If so, I will create a PR.

This check will be included in the format_checks. It will be disabled by default but can be enabled if needed. I believe it can be useful for many projects.

Implementation:

In the configuration file, we will define a copyright field as a regular expression.
For example: "copyright": r"#+\s*Copyright © \d{4} My project.", where \d{4} represents the year.

In the code, we will check the first line of the .gd file to ensure the copyright is defined and matches the regular expression.
If year exists, we will also verify that the year is the current year.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions