Skip to content

[Bug] [INFRA/EYE] Failing to configure paths and paths-ignore when providing multiple licenses #10748

@arturo-seijas

Description

@arturo-seijas

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 to the provided set of 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

When executing, all files are analysed by each entry.

What you expected to happen

I expected the first license to be applied only to lib/** and the second one for the rest of the files

How to reproduce

  • Create a new repository with the following files
  1. .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
  1. Add a sample.sh file with the following content
# Copyright 2023 Company Ltd.
# See LICENSE file for licensing details.

Add a lib/samplelib.sh file with the following content

# Copyright 2023 Company Ltd.
# Licensed under the Apache2.0. See LICENSE file in charm source for details.

Run license-eye -c .licenserc.yaml header check

Anything else

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

Labels

bugSomething isn't working and you are sure it's a bug!license eye

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions