Skip to content

[Bug] Unhelpful error for misconfigured .licenserc.yaml file #11648

@jsoref

Description

@jsoref

Search before asking

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

Apache SkyWalking Component

License Tools (apache/skywalking-eyes)

What happened

WARNING failed to find a license template for spdx id , open header-templates/.txt: file does not exist 

What you expected to happen

  1. If there's a very finite list of available licenses, the list of available licenses should be mentioned
    • if the list is variable/dynamic, then a link to the available licenses should be provided (especially if there's a specific branch that's relevant...)
  2. the specific license id being checked should be clearly identified -- if the id is '' then use 's around the empty string to clarify that it's an empty string
    • to the extent possible, the source of an empty string should be identified

How to reproduce

  1. create a repository (with actions enabled...) with a workflow with steps similar to:

    steps:
      - name: Checkout
        uses: actions/checkout@v4
    
      - name: Fix License Header
        uses: apache/skywalking-eyes/header@v0.4.0
        with:
          mode: fix
  2. create .licenserc.yaml file with:

    header:
      spdx-id: BSD-3-Clause
      copyright-owner: Unknown
      software-name: unknown
      content: |
        Copyright (c) Unknown
        Distributed under the terms of the Modified BSD License.
    
      paths-ignore:
        - '**/.*'
  3. Add a file that skywalking will try to "fix".

  4. Push the repository to GitHub

Anything else

INFO Loading configuration from file: .licenserc.yaml 
WARNING failed to find a license template for spdx id , open header-templates/.txt: file does not exist 
WARNING failed to find a license template for spdx id , open header-templates/.txt: file does not exist 
WARNING failed to find a license template for spdx id , open header-templates/.txt: file does not exist 
WARNING failed to find a license template for spdx id , open header-templates/.txt: file does not exist 
WARNING failed to find a license template for spdx id , open header-templates/.txt: file does not exist 
WARNING failed to find a license template for spdx id , open header-templates/.txt: file does not exist 
WARNING failed to find a license template for spdx id , open header-templates/.txt: file does not exist 
WARNING failed to find a license template for spdx id , open header-templates/.txt: file does not exist 
WARNING failed to find a license template for spdx id , open header-templates/.txt: file does not exist 
WARNING failed to find a license template for spdx id , open header-templates/.txt: file does not exist 
WARNING failed to find a license template for spdx id , open header-templates/.txt: file does not exist 
WARNING failed to find a license template for spdx id , open header-templates/.txt: file does not exist 
WARNING failed to find a license template for spdx id , open header-templates/.txt: file does not exist 
INFO Totally checked 96 files, valid: 0, invalid: 4, ignored: 92, fixed: 4

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions