diff options
author | Arthur Zamarin <arthurzam@gentoo.org> | 2023-09-01 18:49:58 +0300 |
---|---|---|
committer | Arthur Zamarin <arthurzam@gentoo.org> | 2023-09-01 18:49:58 +0300 |
commit | a159aca5222ca9ef08087ee7aa16325fe136080a (patch) | |
tree | a041397bebfee1c7ed9a5d26891b9836dc350a4c /src | |
parent | UnstableSrcUri: check for unstable SRC_URI (diff) | |
download | pkgcheck-a159aca5222ca9ef08087ee7aa16325fe136080a.tar.gz pkgcheck-a159aca5222ca9ef08087ee7aa16325fe136080a.tar.bz2 pkgcheck-a159aca5222ca9ef08087ee7aa16325fe136080a.zip |
checks: use stable sorting of fields + strip where needed
In preparation of new tree-sitter-bash, some small issues where found.
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/pkgcheck/checks/metadata.py | 2 | ||||
-rw-r--r-- | src/pkgcheck/checks/profiles.py | 4 | ||||
-rw-r--r-- | src/pkgcheck/checks/rust.py | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/pkgcheck/checks/metadata.py b/src/pkgcheck/checks/metadata.py index 555ea9a5..3219036f 100644 --- a/src/pkgcheck/checks/metadata.py +++ b/src/pkgcheck/checks/metadata.py @@ -681,7 +681,7 @@ class UseFlagsWithoutEffectsCheck(GentooRepoCheck): flags = self.warn_use_small_files.intersection(pkg.iuse_stripped).difference(used_flags) if flags: - yield UseFlagWithoutDeps(flags, pkg=pkg) + yield UseFlagWithoutDeps(sorted(flags), pkg=pkg) class MissingSlotDep(results.VersionResult, results.Warning): diff --git a/src/pkgcheck/checks/profiles.py b/src/pkgcheck/checks/profiles.py index b9108f83..8a8248c7 100644 --- a/src/pkgcheck/checks/profiles.py +++ b/src/pkgcheck/checks/profiles.py @@ -303,9 +303,9 @@ class ProfilesCheck(Check): for _, disabled, enabled in entries: if unknown_disabled := set(disabled) - self.available_iuse: flags = ("-" + u for u in unknown_disabled) - yield UnknownProfileUse(pjoin(node.name, filename), flags) + yield UnknownProfileUse(pjoin(node.name, filename), sorted(flags)) if unknown_enabled := set(enabled) - self.available_iuse: - yield UnknownProfileUse(pjoin(node.name, filename), unknown_enabled) + yield UnknownProfileUse(pjoin(node.name, filename), sorted(unknown_enabled)) @verify_files( ("packages", "packages"), diff --git a/src/pkgcheck/checks/rust.py b/src/pkgcheck/checks/rust.py index 1a5e6770..397738b9 100644 --- a/src/pkgcheck/checks/rust.py +++ b/src/pkgcheck/checks/rust.py @@ -64,7 +64,7 @@ class RustCheck(Check): call_name = pkg.node_str(node.child_by_field_name("name")) if call_name == "cargo_crate_uris": row, _ = node.start_point - line = pkg.node_str(node.parent) + line = pkg.node_str(node.parent).strip() if node.child_count == 1 or ( node.child_count == 2 and any( |