-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Closed
apache/skywalking-eyes
#159Labels
bugSomething isn't working and you are sure it's a bug!Something isn't working and you are sure it's a bug!license eye
Milestone
Description
Search before asking
- I had searched in the issues and found no similar issues.
Apache SkyWalking Component
License Tools (apache/skywalking-eyes)
What happened
Hi!
I've provided the following configuration expecting two different header patterns to be recognized, given that I have two different header contents in my source files (note that both configurations work separately):
header:
- license:
copyright-owner: Company Ltd.
content: |
Copyright [year] [owner]
Licensed under the Apache2.0. See LICENSE file in charm source for details.
paths:
- 'lib/**'
comment: on-failure
- license:
spdx-id: Apache-2.0
copyright-owner: Company Ltd.
content: |
Copyright [year] [owner]
See LICENSE file for licensing details.
paths:
- '**'
paths-ignore:
- 'lib/**'
comment: on-failure
The resulting scan is ignoring the specified content. the tools is also throwing a warning failed to find a license template for spdx id , open header-templates/.txt: file does not exist.
What you expected to happen
The tool should have compared the headers against the content, analogous to what happens when a single license item is set.
How to reproduce
- Create a new repository with the following files
.licenserc.yaml
header:
- license:
copyright-owner: Company Ltd.
content: |
Copyright [year] [owner]
Licensed under the Apache2.0. See LICENSE file in charm source for details.
paths:
- 'lib/**'
comment: on-failure
- license:
spdx-id: Apache-2.0
copyright-owner: Company Ltd.
content: |
Copyright [year] [owner]
See LICENSE file for licensing details.
paths:
- '**'
paths-ignore:
- 'lib/**'
comment: on-failure
- Add a
sample.shfile with the following content
# Copyright 2023 Company Ltd.
# See LICENSE file for licensing details.
- Add a
lib/samplelib.shfile with the following content
# Copyright 2023 Company Ltd.
# Licensed under the Apache2.0. See LICENSE file in charm source for details.
- Run the GitHub action with the following configuration
- name: Check license headers
uses: apache/skywalking-eyes/header@main
with:
config: .licenserc.yaml
Anything else
No response
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't working and you are sure it's a bug!Something isn't working and you are sure it's a bug!license eye