Skip to content

CI: check OSMC-PL 1.8 license header in Julia src files#76

Open
SVAGEN26 wants to merge 1 commit into
OpenModelica:masterfrom
SVAGEN26:add-julia-license-check
Open

CI: check OSMC-PL 1.8 license header in Julia src files#76
SVAGEN26 wants to merge 1 commit into
OpenModelica:masterfrom
SVAGEN26:add-julia-license-check

Conversation

@SVAGEN26

Copy link
Copy Markdown
Contributor

Summary

Adds a CI check that every .jl file under src/ carries the OSMC-PL 1.8 license header with an up-to-date copyright year. This mirrors OpenModelica's check_runtime_license.py, adapted for Julia #= ... =# block comments.

What's included

  • .CI/scripts/check_julia_license.py — the checker. Supports --fix-license, --update-year, --summary, and a .CI/scripts/julia-license-exceptions.txt exclusion list with .gitignore-style (last-match-wins) semantics.
  • .github/workflows/check-license.yml — runs python3 .CI/scripts/check_julia_license.py --summary src on every pull request.
  • Header normalization — brought the src/ files up to the OSMC-PL 1.8 header so the check passes on this PR. The existing OSMC-PL 1.2 headers were upgraded to 1.8, and src/CodeGeneration/mtkExternals.jl is excluded (vendored ModelingToolkit code under the MIT "Expat" License — not OSMC-PL), via the exceptions list.

Notes

The check only looks at src/ (not examples/tests). Headers are verified for presence of the OSMC-PL 1.8 text, the "This file is part of OpenModelica." mark, and a current copyright year.

🤖 Generated with Claude Code

Add a CI check that every `.jl` file under `src/` carries the OSMC-PL 1.8
license header with an up-to-date copyright year, mirroring OpenModelica's
`check_runtime_license.py` (adapted for Julia `#= ... =#` block comments).

- `.CI/scripts/check_julia_license.py`: the checker (supports --fix-license,
  --update-year, --summary and a `.CI/scripts/julia-license-exceptions.txt`
  exclusion list with .gitignore-style semantics).
- `.CI/scripts/julia-license-exceptions.txt`: excludes
  src/CodeGeneration/mtkExternals.jl, which is vendored ModelingToolkit code
  under the MIT "Expat" License — NOT OSMC-PL.
- `.github/workflows/check-license.yml`: runs it on `src` for pull requests.
- Upgraded the existing OSMC-PL 1.2 headers (and added missing ones) to the
  OSMC-PL 1.8 header so the check passes. mtkExternals.jl is left untouched.

Co-Authored-By: JKRT <jtinnerholm@gmail.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@codecov

codecov Bot commented Jun 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 21.67%. Comparing base (48757b0) to head (c251162).
⚠️ Report is 27 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #76      +/-   ##
==========================================
- Coverage   24.78%   21.67%   -3.11%     
==========================================
  Files          28       43      +15     
  Lines        3430    20615   +17185     
==========================================
+ Hits          850     4468    +3618     
- Misses       2580    16147   +13567     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@JKRT

JKRT commented Jun 24, 2026

Copy link
Copy Markdown
Member

@SVAGEN26 I think you missed committing one file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants