GHA CI: add checks for grid items order

Now all items under `QGridLayout` are required to be sorted. This allow
us to omit tabstop order. The tabstop order will follow the layout order.

The script can be invoked to fix wrong grid items order in .ui files:
```console
python check_grid_items_order.py file.ui
```
This commit is contained in:
Chocobo1 2024-12-13 16:21:22 +08:00
parent 4c6dd8e68d
commit c887a6f7d8
No known key found for this signature in database
GPG key ID: 210D9C873253A68C
4 changed files with 105 additions and 4 deletions

View file

@ -1,6 +1,12 @@
repos:
- repo: local
hooks:
- id: check-grid-order
name: Check items order in grid layouts
entry: .github/workflows/helper/pre-commit/check_grid_items_order.py
language: script
files: \.ui$
- id: check-translation-tag
name: Check newline characters in <translation> tag
entry: .github/workflows/helper/pre-commit/check_translation_tag.py