Skip to content

Refactor: Removing/updating some filtering options, add quiet, change handling of JSON format and console output#3

Open
sascgc wants to merge 13 commits into
bootlin:mainfrom
sascgc:main
Open

Refactor: Removing/updating some filtering options, add quiet, change handling of JSON format and console output#3
sascgc wants to merge 13 commits into
bootlin:mainfrom
sascgc:main

Conversation

@sascgc
Copy link
Copy Markdown

@sascgc sascgc commented Apr 8, 2026

This pull request contains:

  • Removing output filtering options:

    • --show-added
    • --show-changed
    • --show-removed
  • The default behaviour is to show the full spdx diff, follwing arguments are removed:

    • --full
    • --summary
  • Following parameters have been renamed and changed to boolean with TRUE as default value:

    • --show-packages to --packages(default) and --no-packages
    • --show-config to --kernel-config(default) and --no-kernel-config
    • --show-packageconfig to --packageconfig(default) and --no-packageconfig
    • --ignore-proprietary to --packages-proprietary(default) and --no-packages-proprietary
  • Added quiet mode (decreasing verbosity to ERROR only)

  • Console output handling has been updated:

    • Structured JSON output is emitted on stdout by default to facilitate seamless
      integration of the tool into automated pipelines and scripting workflows.
    • Human-readable output is now provided by using --human-readable argument which replace
      the Structured JSON output
  • The JSON output file has been updated:

    • The JSON output file is no longer generated by default.
    • The --output <PATH> option have been renamed to --json-output <PATH>
    • The --json-output <PATH> option must now be explicitly specified to enable JSON file generation.

    Not tested yet with meta-spdx-diff-test. Just test "on table".

@sascgc
Copy link
Copy Markdown
Author

sascgc commented Apr 8, 2026

See tests failing on the workflow, the tests needs to be updated as the tool has changed. Working on it.

@sascgc sascgc force-pushed the main branch 2 times, most recently from eaab371 to a334883 Compare April 8, 2026 14:31
@sascgc
Copy link
Copy Markdown
Author

sascgc commented Apr 8, 2026

Tests updated to align with the command-line tool modifications.

Christophe Guerreiro added 2 commits April 9, 2026 14:47
…l and summary filtering options

The following arguments are removed:
- '--summary'
- '--full'
- '--show-added'
- '--show-changed'
- '--show-removed'

The purpose of this tool is to highlight differences between two spdx files.
Built-in filtering adds extra logic that dilutes this goal and overlaps with the
other tools that already provide their own filtering capabilities.

By removing filtering, the tool now focuses on producing a complete and reliable
spdx diff, leaving filtering decisions to users or downstream tooling.

Signed-off-by: Christophe Guerreiro <christophe.guerreiro@non.se.com>
Signed-off-by: Christophe Guerreiro <christophe.guerreiro@non.se.com>
Christophe Guerreiro added 3 commits May 7, 2026 18:03
Signed-off-by: Christophe Guerreiro <christophe.guerreiro@non.se.com>
The following filtering category arguments have been renamed and converted to
boolean options, all defaulting to `True`:
- `--show-packages` to `--[no-]packages`
- `--show-config` to `--[no-]kernel-config`
- `--show-packageconfig` to `--[no-]packageconfig`
- `--ignore-proprietary` to `--[no-]packages-proprietary`

Signed-off-by: Christophe Guerreiro <christophe.guerreiro@non.se.com>
The filtering option `--ignore-proprietary` has been renamed to
`--packages-proprietary` and now follows a new boolean behavior:

- `--packages-proprietary` includes proprietary packages (default)
- `--no-packages-proprietary` excludes proprietary packages

Tests have been updated accordingly to reflect this new option and logic.

Signed-off-by: Christophe Guerreiro <christophe.guerreiro@non.se.com>
Christophe Guerreiro added 3 commits May 11, 2026 12:00
Signed-off-by: Christophe Guerreiro <christophe.guerreiro@non.se.com>
Signed-off-by: Christophe Guerreiro <christophe.guerreiro@non.se.com>
Signed-off-by: Christophe Guerreiro <christophe.guerreiro@non.se.com>
@sascgc sascgc force-pushed the main branch 3 times, most recently from 42a1e28 to e2a47d6 Compare May 12, 2026 07:41
Signed-off-by: Christophe Guerreiro <christophe.guerreiro@non.se.com>
Christophe Guerreiro added 4 commits May 12, 2026 09:53
…e argument

Previously, the tool was printing human-readable text to stdout and generating a JSON file separately.
This change enforces the presence of an explicit argument used as the JSON output filename.

The console output is now emitted in JSON format by default to ensure consistency and
 to simplify integration with automated pipelines and tooling.

Signed-off-by: Christophe Guerreiro <christophe.guerreiro@non.se.com>
Tests have been updated to reflect the new command-line interface.
The previous `--format json --output` options are replaced with the
`--json-output` option, matching the current tool behavior.

Signed-off-by: Christophe Guerreiro <christophe.guerreiro@non.se.com>
…ling

Signed-off-by: Christophe Guerreiro <christophe.guerreiro@non.se.com>
Signed-off-by: Christophe Guerreiro <christophe.guerreiro@non.se.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants