Add Copyright headers to all source and documentation files#464
Open
jiyuanwangbmw wants to merge 4 commits into
Open
Add Copyright headers to all source and documentation files#464jiyuanwangbmw wants to merge 4 commits into
jiyuanwangbmw wants to merge 4 commits into
Conversation
- Add cr_checker.py: copyright header checker/fixer (based on eclipse-score/tooling) with auto-extraction of existing year/author from old-format headers - Add templates.ini: copyright templates for all file types (cpp/c/h/hpp, py/sh/cmake/yaml/toml/bzl/ini/BUILD, rs, rst, puml, md) - Add config.json: default author configuration - Add exclusions.txt: files/dirs excluded from checking (3rdparty/, build/, templates.ini, .github/ISSUE_TEMPLATE/) - Add .github/workflows/copyright.yml: CI workflow for copyright compliance with least-privilege permissions (contents: read)
1db0642 to
126ad59
Compare
Generated by running:
python3 tools/cr_checker/cr_checker.py -t tools/cr_checker/templates.ini \
-c tools/cr_checker/config.json --exclusion-file tools/cr_checker/exclusions.txt --fix .
- 1739 files updated: existing old-format headers replaced with Apache-2.0
SPDX headers, missing headers added
- Original copyright year and author preserved from existing headers
- GitHub issue template .md files: copyright placed after YAML front matter
- Removed 17 leftover standalone copyright lines from files that had
dual copyright holders (BMW AG lines alongside new Apache-2.0 block)
- Document cr_checker.py usage in doc/dev/guidelines/formatting/automatic.rst (check mode, fix mode, configuration, treefmt integration) - Integrate cr_checker as treefmt formatter for all supported file types - Remove cr_checker-handled types from treefmt global excludes (py, sh, toml, yml, yaml, ini, md, rst, puml)
126ad59 to
71aa7e4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issues #456
Summary
Adds Eclipse-compliant Apache-2.0 copyright headers to all source and documentation files, along with automated tooling to enforce copyright compliance going forward.
Changes
first_comment_is_literal = Truein.cmake-formatto preserve copyright header formatting.File types covered
.c,.cpp,.h,.hpp,.cmake,CMakeLists.txt,.py,.sh,.toml,.yml,.yaml,.ini,.rst,.md,.pumlCI enforcement
copyright.ymlworkflow runs cr_checker in check mode