Skip to content

Conversation

sfraczek
Copy link
Collaborator

@sfraczek sfraczek commented Sep 4, 2025

Automatic tool should check if license header exists in source files.

Related issue #133

@sfraczek sfraczek added the enhancement New feature or request label Sep 4, 2025
@sfraczek sfraczek linked an issue Sep 4, 2025 that may be closed by this pull request
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements REUSE compliance by adding standardized license headers to all source files and configuration files. This addresses issue #133 to ensure proper license attribution throughout the codebase.

  • Adds SPDX license headers to all Rust source files and configuration files
  • Creates REUSE.toml configuration file for license management
  • Adds GitHub Actions workflow for automated REUSE compliance checking
  • Includes standard license text files and removes old LICENCE file

Reviewed Changes

Copilot reviewed 23 out of 27 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/*.rs Added SPDX license headers to all Rust source files
REUSE.toml Configuration file defining license annotations for different file types
.github/workflows/reuse-check.yml New workflow for automated REUSE compliance checking
LICENSES/*.txt Standard license text files for BSD-3-Clause and CC0-1.0
README.md, Cargo.toml, .github/*.yml Added license headers to configuration and documentation files
LICENCE Removed old license file in favor of standardized LICENSES directory

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines 1 to +6
#![cfg(feature = "gui")]

// SPDX-FileCopyrightText: 2025 RustInFinance
//
// SPDX-License-Identifier: BSD-3-Clause

Copy link

Copilot AI Sep 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The license header should be placed at the very beginning of the file, before any other directives including #![cfg(...)]. This ensures the license information is the first thing seen in the file.

Suggested change
#![cfg(feature = "gui")]
// SPDX-FileCopyrightText: 2025 RustInFinance
//
// SPDX-License-Identifier: BSD-3-Clause
// SPDX-FileCopyrightText: 2025 RustInFinance
//
// SPDX-License-Identifier: BSD-3-Clause
#![cfg(feature = "gui")]

Copilot uses AI. Check for mistakes.

@sfraczek
Copy link
Collaborator Author

sfraczek commented Sep 7, 2025

@jczaja

  • how do you want to deal with YEARS?
  • What about the copyright holder: RustInFinance or leave Jacek Czaja as it was?

@@ -1,3 +1,7 @@
// SPDX-FileCopyrightText: 2025 RustInFinance
//
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a fan of these empty lines, can you remove it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be doable with templates:
Source fsfe/reuse-tool#562

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

Successfully merging this pull request may close these issues.

Add SPDX license identifiers in source files

2 participants