Skip to content

[Format][Dev] Discuss adding lint checks for alphabetically sorted lists #50701

Description

@Reranko05

Describe the enhancement requested

During reviews, maintainers often ask contributors to keep unordered lists alphabetically sorted (e.g. SOURCES in CMakeLists.txt, dependency lists, CMakePresets.json, meson.build, dev/tasks/tasks.yml).

Since these comments are repetitive and the ordering is deterministic, would it make sense to add a lint check to the existing dev/lint workflow for selected cases?

The initial implementation could be conservative and only check simple literal lists, skipping variables or complex expressions to avoid false positives.

Component(s)

Developer Tools, Format

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions