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

[Bug] Detection of existing license headers fails in 0.5.0 #11302

Closed
2 of 3 tasks
krassowski opened this issue Sep 4, 2023 · 3 comments · Fixed by apache/skywalking-eyes#168
Closed
2 of 3 tasks

[Bug] Detection of existing license headers fails in 0.5.0 #11302

krassowski opened this issue Sep 4, 2023 · 3 comments · Fixed by apache/skywalking-eyes#168
Assignees
Labels
bug Something isn't working and you are sure it's a bug! license eye

Comments

@krassowski
Copy link

Search before asking

  • I had searched in the issues and found no similar issues.

Apache SkyWalking Component

License Tools (apache/skywalking-eyes)

What happened

Once we updated apache/skywalking-eyes/header from v0.4.0 to v0.5.0
typescript and CSS files using a different comment kind than default are no longer detected as having the license and thus incorrectly get a second copy of license header applied.

What you expected to happen

I would expect the existing headers to be detected. I am struggling to see whether this is intended change in the release because it was unpublished (see apache/skywalking-eyes#166 (comment)) and not published again (see https://github.com/apache/skywalking-eyes/releases - if there were release notes warning about breaking changes these are no longer visible)

How to reproduce

This can be seen on jupyterlab/jupyterlab#15068.

For example:

+ /*
+  * Copyright (c) Jupyter Development Team.
+  * Distributed under the terms of the Modified BSD License.
+  */
#!/usr/bin/env node
/* -----------------------------------------------------------------------------
| Copyright (c) Jupyter Development Team.
| Distributed under the terms of the Modified BSD License.
|----------------------------------------------------------------------------*/

Anything else

No response

Are you willing to submit a pull request to fix on your own?

  • Yes I am willing to submit a pull request on my own!

Code of Conduct

@krassowski krassowski added the bug Something isn't working and you are sure it's a bug! label Sep 4, 2023
@wu-sheng wu-sheng added this to the license-eye 0.6.0 milestone Sep 4, 2023
@kezhenxu94
Copy link
Member

Hi @krassowski , thanks for reporting, this issue is brought by an enhancement in 0.5.0, apache/skywalking-eyes#142 , now it strictly checks the Copyright ... header, and in your case, in 0.4.0, the Copyright ... line is stripped so it only checks the line Distributed under the terms of the Modified BSD License and it passed, now that the Copyright ... line is also checked, the | between Copyright ... line and Distributed ... line prevents the tests to pass, so I added | as a comment indicator in apache/skywalking-eyes#168, hope it helps.

@kezhenxu94
Copy link
Member

kezhenxu94 commented Sep 4, 2023

@krassowski and because 0.5.0 was just released not soon ago, I prefer you change the revision tag to the commit sha like

      - name: Fix License Header
        uses: apache/skywalking-eyes/header@e19b828cea6a6027cceae78f05d81317347d21be
        with:
          mode: fix

or if you want me to have a new release for 0.5.1, let me know.

@krassowski
Copy link
Author

Thank you, that worked!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working and you are sure it's a bug! license eye
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants