adrienverge / yamllint

A linter for YAML files.
GNU General Public License v3.0
2.9k stars 278 forks source link

feat: add the ability to ignored keys while sorting #689

Open fernandezcuesta opened 2 months ago

fernandezcuesta commented 2 months ago

Hi, the use case here is to allow nested maps such as:

versions:
  - name: v1alpha1
    capabilities: [ ... ]
    customField: ""
  - name: v1alpha2
    customField: ""

not to be sorted, since there are times when we consider a primary/merge-key useful to remain wherever we define it (usually in 1st place)

coveralls commented 2 months ago

Coverage Status

coverage: 99.825%. remained the same when pulling 13468757683e886fc0ebb83eab0a025047437dec on fernandezcuesta:master into 8513d9b97da3b32453b3fccb221f4ab134a028d7 on adrienverge:master.

fearphage commented 2 weeks ago

I'm very motivated to get this merged and I see @fernandezcuesta hasn't responded in over a month. Would any be opposed to me making the reviewer comment changes in a new PR? /cc @adrienverge

FYI my use case is GitHub Actions. Sorting some of the keys there makes things more confusing/harder to maintain for humans (read: bad).

fernandezcuesta commented 1 week ago

I'll do it, apologies for the long delay