Add list-ordering rule

This is based on the key-ordering rule and behaves the same with regards to locales.

Closes #454
This commit is contained in:
Kevin Wojniak
2023-02-28 20:39:45 -08:00
parent 06db2af9b0
commit f014ea9942
6 changed files with 263 additions and 3 deletions

View File

@@ -243,9 +243,9 @@ It is possible to set the ``locale`` option globally. This is passed to Python's
so an empty string ``""`` will use the system default locale, while e.g.
``"en_US.UTF-8"`` will use that.
Currently this only affects the ``key-ordering`` rule. The default will order
by Unicode code point number, while locales will sort case and accents
properly as well.
Currently this only affects the ``key-ordering`` and ``list-ordering`` rules.
The default will order by Unicode code point number, while locales will sort
case and accents properly as well.
.. code-block:: yaml

View File

@@ -95,6 +95,11 @@ line-length
.. automodule:: yamllint.rules.line_length
list-ordering
--------------
.. automodule:: yamllint.rules.list_ordering
new-line-at-end-of-file
-----------------------