-
Notifications
You must be signed in to change notification settings - Fork 7.6k
west: spdx: allow to generate for different SPDX versions #90753
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
Conversation
2f73b5d
to
5caf163
Compare
Could we try to get #90444 merged first? |
c91542b
to
4a3a19e
Compare
I just rebased on main :) |
As reported by sonarqube, "String formatting should be used correctly" Signed-off-by: Benjamin Cabé <[email protected]>
File passes all ruff linter checks so no exclude rules needed anymore Signed-off-by: Benjamin Cabé <[email protected]>
Add missing error handling of some of the calls to writeSPDX(). Signed-off-by: Benjamin Cabé <[email protected]>
When support for SPDX 2.3 was added, it effectively dropped support for SPDX 2.2, which in retrospect was a bad idea since SPDX 2.2 is the version that is the current ISO/IEC standard. This commit adds a `--spdx-version` option to the `west spdx` command so that users can generate SPDX 2.2 documents if they want. Default is 2.3 given that's effectively what shipped for a few releases now, including latest LTS. Signed-off-by: Benjamin Cabé <[email protected]>
|
@swinslow @carlescufi can you please have a look? Thanks! |
self.dbg(" --init is", args.init) | ||
self.dbg(" --build-dir is", args.build_dir) | ||
self.dbg(" --namespace-prefix is", args.namespace_prefix) | ||
self.dbg(" --spdx-dir is", args.spdx_dir) | ||
self.dbg(" --spdx-version is", args.spdx_version) | ||
self.dbg(" --analyze-includes is", args.analyze_includes) | ||
self.dbg(" --include-sdk is", args.include_sdk) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could've used the f-strings here:
self.dbg(" --init is {args.init}")
When support for SPDX 2.3 was added, it effectively dropped support for SPDX 2.2, which in retrospect was a bad idea since SPDX 2.2 is the version that is the current ISO/IEC standard.
This commit adds a
--spdx-version
option to thewest spdx
command so that users can generate SPDX 2.2 documents if they want.Default is 2.3 given that's effectively what shipped for a few releases now, including latest LTS, but it could be argued it should be 2.2 as per my comment above re: it being the ISO standard.