Skip to content

chore(lint): switch from 'header' to 'license-header' eslint plugin #2969

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

trentm
Copy link
Contributor

@trentm trentm commented Aug 1, 2025

Fixes: #2967
Refs: nikku/eslint-plugin-license-header#26

checklist

This is still in draft because it is incomplete. The current license-header eslint plugin won't suffice until nikku/eslint-plugin-license-header#26 or similar functionality is added to it. This is because the license header for this repo allows for some variance. Currently license-header required a single version.

  • get the license-header PR in (hopefully), and a new release
  • update to that release of license-header
  • Customize the pattern for instr-oracledb which has another variance. We could technically allow that variance in the top-level regex so a separate custom regex isn't required.
  • discuss whether the strict newline separation enforced by license-header is acceptable

{
"allowedHeaderPatterns": [
// Allow additional copyrights on the first line.
/^\/\*\r?\n \* Copyright The OpenTelemetry Authors(, .+)*\r?\n \*\r?\n \* Licensed under the Apache License, Version 2.0 \(the "License"\);\r?\n \* you may not use this file except in compliance with the License.\r?\n \* You may obtain a copy of the License at\r?\n \*\r?\n \* https:\/\/www.apache.org\/licenses\/LICENSE-2.0\r?\n \*\r?\n \* Unless required by applicable law or agreed to in writing, software\r?\n \* distributed under the License is distributed on an "AS IS" BASIS,\r?\n \* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r?\n \* See the License for the specific language governing permissions and\r?\n \* limitations under the License.\r?\n \*\/$/,

Check failure

Code scanning / CodeQL

Inefficient regular expression High

This part of the regular expression may cause exponential backtracking on strings starting with '/*\n * Copyright The OpenTelemetry Authors, ' and containing many repetitions of 'a, '.
Copy link

codecov bot commented Aug 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.84%. Comparing base (9d90781) to head (fd1705f).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2969      +/-   ##
==========================================
+ Coverage   89.79%   89.84%   +0.04%     
==========================================
  Files         188      188              
  Lines        9222     9272      +50     
  Branches     1900     1901       +1     
==========================================
+ Hits         8281     8330      +49     
- Misses        941      942       +1     
Files with missing lines Coverage Δ
packages/instrumentation-kafkajs/src/propagator.ts 100.00% <ø> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Successfully merging this pull request may close these issues.

header/header eslint rule can blow away top-comments
3 participants