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

Add missing copyright headers to .rb files #17578

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open

Conversation

NobodysNightmare
Copy link
Contributor

@NobodysNightmare NobodysNightmare commented Jan 10, 2025

What are you trying to accomplish?

We discussed that for best compliance with GPL each and every file should have a GPL header. While many files had one, not all of them were covered yet.

This PR is experimentally adding support to our existing copyright.rake task to create missing headers for Ruby files only.

The PR is composed of three commits, for better reviewability:

  1. Regenerate headers according to previous script (updates were pending)
  2. Update script to support adding headers (that's the real code change part of this PR)
  3. Regenerate headers using the updated script (adding missing headers)

Additional notes

As far as I can tell, the remaining linter failures are a consequence of me touching files that failed validation beforehand. copyright.rake passes Rubocop checks now. Given an approval I will ignore linter failures of the CI for this pull request.

Screenshots

image

Pre-Review checklist

  • Only touched files that belong to us? (e.g. no new files with external copyright)
  • Have any unforeseen prefixes been removed? Any damage done?
  • Is whitespace (e.g. blank lines) around copyright correct?

This effectively removes the year from a bunch of copyright headers.
Apparently we stopped indicating a specific year at some point, but
didn't propagate this change.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.

Check notice

Code scanning / Brakeman

Potential HTTP verb confusion. HEAD is routed like GET but request.get? will return false. Note

Potential HTTP verb confusion. HEAD is routed like GET but request.get? will return false.
# modify it under the terms of the GNU General Public License version 3.
#
# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
# Copyright (C) 2006-2013 Jean-Philippe Lang

Check warning

Code scanning / Brakeman

Model attribute used in file name. Warning

Model attribute used in file name.
The copyright task was so far only built to update
existing (and properly marked) copyright headers.

We are now adding the capability to add a missing header
for Ruby files. This allows us to properly indicate copyright
where it was previously forgotten to be done.
@NobodysNightmare NobodysNightmare changed the title Copyright Add missing copyright headers to .rb files Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant