Skip to content

License auto detection #5

@achingbrain

Description

@achingbrain

Following on from ipshipyard/p2p-forge#9 (comment) - posting here for better visibility.


From what I remember, we ended up with LICENSE, LICENSE-APACHE and LICENSE-MIT as that's what GitHub's automation detected at the time.

For the problems mentioned in the above linked thread:

  • LICENSE-APACHE - this is being detected as "unknown" in JS repos because by default we don't include the full text of the license, probably something we want to change.
  • LICENSE - this is also detected as unknown because it doesn't contain the text of any common license. It only exists to direct people to the apache/mit license files and can probably be removed now that GitHub detects the individual files separately.

Every js readme contains a License section that explicitly states the project is dual-licensed so the extra file is probably redundant?

The approach in this repo is interesting but the automatic license detection is a bit of a shoulder shrug:

image

Instead doing something like https://github.com/achingbrain/license-test gives you better detection and means you'll show up in searches for projects with a certain license:

image

Including the SPDX tag doesn't hurt but it doesn't trigger GitHub's license detection and according to the Linux Foundation you're supposed to add it to every file in your project (see "How do SPDX IDs work? - https://spdx.dev/learn/handling-license-info/ )

Metadata

Metadata

Assignees

No one assigned

    Labels

    need/triageNeeds initial labeling and prioritization

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions