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

incorrect license should be caught #354

Open
h1alexbel opened this issue Feb 20, 2025 · 9 comments
Open

incorrect license should be caught #354

h1alexbel opened this issue Feb 20, 2025 · 9 comments
Assignees
Labels
bug Something isn't working

Comments

@h1alexbel
Copy link
Contributor

In XMIR, we have <license/> node with a program's license. We should compare this license with one supplied in LICENSE.txt in the root of the repo. If it does not match, we should report it with WARNING severity.

@h1alexbel
Copy link
Contributor Author

@yegor256 @maxonfjvipon WDYT?

@yegor256
Copy link
Member

@h1alexbel maybe it's better to make our XMIR more compliant with SPDX, and instead of license have this:

<program>
  <license name="MIT">2023-2025 Yegor Bugayenko</license>
</program>

@h1alexbel
Copy link
Contributor Author

h1alexbel commented Feb 20, 2025

@yegor256 good point, we need to implement this on both layers: EO and lints. @maxonfjvipon FYI I've created objectionary/eo#3934

@h1alexbel
Copy link
Contributor Author

h1alexbel commented Feb 27, 2025

@maxonfjvipon To lint +spdx meta, first we should do these:

  • add missing-spdx lint with WARNING severity
  • add spdx-is-not-top-meta lint with WARNING severity
  • remove +spdx meta from unsorted-metas lint

I suggest to implement these steps in separate PRs

@h1alexbel
Copy link
Contributor Author

@yegor256 I'm in

@yegor256
Copy link
Member

@h1alexbel what spdx-is-not-top-meta is about?

@yegor256 yegor256 added the bug Something isn't working label Feb 28, 2025
@h1alexbel
Copy link
Contributor Author

@yegor256 its about position of +spdx meta among other metas. It should be at the highest level (1-2 line numbers).

This is incorrect:

+architect jeff@google.com
+spdx SPDX-License-Identifier MIT

# F.
[] > f

While this is a correct one:

+spdx SPDX-License-Identifier MIT
+architect jeff@google.com

# F.
[] > f

In other words, +spdx meta should be out of default meta sort order.

h1alexbel added a commit to h1alexbel/lints that referenced this issue Feb 28, 2025
h1alexbel added a commit to h1alexbel/lints that referenced this issue Feb 28, 2025
h1alexbel added a commit to h1alexbel/lints that referenced this issue Feb 28, 2025
h1alexbel added a commit to h1alexbel/lints that referenced this issue Feb 28, 2025
h1alexbel added a commit to h1alexbel/lints that referenced this issue Feb 28, 2025
@yegor256
Copy link
Member

@h1alexbel what's the point? why can't it be among other metas? we need metas to be sorted.

@h1alexbel
Copy link
Contributor Author

h1alexbel commented Feb 28, 2025

@yegor256 I feel like +spdx meta should be at the top of the file (like license header that it substitutes), or its redundant and should be placed among others?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants