apache / apache/arrow

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

Open
#50,701 2 comments 0 reactions 0 assignees View on GitHub
Component: Developer Tools Component: Format Type: enhancement
Dominant language
C++
Stars
17.1k
Forks
4.3k
Avg merge
3d 13h
Merged PRs (30d)
88

Description

### 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

Contributor guide

Open the contributing guide

Research direction

Start by reading the existing dev/lint workflow and the named examples: SOURCES in CMakeLists.txt, CMakePresets.json, meson.build, and dev/tasks/tasks.yml. Determine which simple literal lists can be checked safely, then confirm that the selected cases are detected while variables and complex expressions are skipped.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, json, yaml
Domain
build-system, developer-experience, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.