Skip to content

Conversation

jklukas
Copy link
Contributor

@jklukas jklukas commented Aug 8, 2025

This change enables linting and automatic fixing for the non-default buildifier unsorted-dict-items warning. This ensures that the dictionary of configuration versions in versions.bzl stays sorted.

Fixes #88. Note that the "buildifier: keep sorted" directive appears undocumented and limited to lists. As far as I can tell, enabling this warning for the whole project and adding comments to disable as needed is the only currently available solution to achieve the desired behavior through buildifier.

It's perfectly fine to deny this change if you don't like having this behavior throughout this codebase.


Changes are visible to end-users: yes

  • Searched for relevant documentation and updated as needed: yes
  • Breaking change (forces users to change their own code or config): no
  • Suggested release notes appear below: no

Test plan

  • Manual testing; please provide instructions so we can reproduce: manually move on of the items in the versions dictionary, and then run pre-commit to verify it's moved back into sorted order.

Copy link
Member

@alexeagle alexeagle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@alexeagle alexeagle merged commit 5ec3971 into aspect-build:main Aug 8, 2025
9 of 10 checks passed
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.

[FR]: Keep versions ordered in versions.bzl

2 participants