tools/check_arm_indent: Run formatting on arm, in addition to aarch64

Add exceptions for files that aren't handled well (or that would
require more manual cleanups to make the output look good).
This commit is contained in:
Martin Storsjö
2026-04-29 13:53:07 +03:00
parent f6b21eca5e
commit 397c7c7524
2 changed files with 24 additions and 4 deletions
+3 -3
View File
@@ -20,9 +20,9 @@ repos:
- id: trailing-whitespace
- repo: local
hooks:
- id: aarch64-asm-indent
name: fix aarch64 assembly indentation
files: ^.*/aarch64/.*\.S$
- id: arm-asm-indent
name: fix arm/aarch64 assembly indentation
files: ^.*/(arm|aarch64)/.*\.S$
language: script
entry: ./tools/check_arm_indent.sh --apply
pass_filenames: false
+21 -1
View File
@@ -33,12 +33,32 @@ fi
ret=0
for i in */aarch64/*.S */aarch64/*/*.S; do
for i in */aarch64/*.S */aarch64/*/*.S */arm/*.S; do
case $i in
libavcodec/aarch64/h264idct_neon.S|libavcodec/aarch64/h26x/epel_neon.S|libavcodec/aarch64/h26x/qpel_neon.S|libavcodec/aarch64/vc1dsp_neon.S)
# Skip files with known (and tolerated) deviations from the tool.
continue
;;
libavcodec/arm/jrevdct_arm.S)
# This file has a large copyright header that gets reindented like code.
continue
;;
libavcodec/arm/mlpdsp_armv5te.S|libavcodec/arm/mlpdsp_armv6.S)
# These files use a bit more gas directives than most files, and the
# reindenter script would need a lot of manual fixups to make this
# look good, so keep it as is.
continue
;;
libavcodec/arm/vc1dsp_neon.S|libavutil/arm/float_dsp_vfp.S)
# These files use different indentation levels to signify different
# levels in unrolling.
continue
;;
libavcodec/arm/simple_idct_arm.S|libavcodec/arm/simple_idct_armv5te.S|libavcodec/arm/simple_idct_armv6.S)
# These files use defines for constants, like "W26", that get mistaken
# as register names and get lowercased by the script.
continue
;;
esac
./tools/indent_arm_assembly.pl < "$i" > tmp.S || ret=$?
if ! git diff --quiet --no-index "$i" tmp.S; then