Attention is currently required from: Arthur Heymans, Elyes Haouas, Julius Werner, Martin L Roth, Nico Huber.
Angel Pons has posted comments on this change by Elyes Haouas. ( https://review.coreboot.org/c/coreboot/+/81907?usp=email )
Change subject: util/lint: Add lint rule to avoid duplicated includes ......................................................................
Patch Set 13: Code-Review-1
(3 comments)
Commit Message:
https://review.coreboot.org/c/coreboot/+/81907/comment/137c3af1_9ce3e097?usp... : PS13, Line 7: util/lint: Add lint rule to avoid duplicated includes If I assume the commit message is correct, I would expect a lint rule for *duplicated* includes to check if the same file is included multiple times within a single file. But the warning message is completely different:
echo "Warning: $expected_file is supposed to provide $pattern"
Please accurately describe what this commit does. It does not seem to check for duplicated includes in the way I initially believed it would.
File util/lint/lint-stable-031-duplicated-includes:
https://review.coreboot.org/c/coreboot/+/81907/comment/1a9b9a8c_dc5e1582?usp... : PS13, Line 48: check_duplicates '<commonlib/bsd/cb_err.h>|<limits.h>|<stdbool.h>|<stdint.h>|<stddef.h>' '<types.h>' This is enforcing code style. And not everything can use `types.h` (e.g. utils).
https://review.coreboot.org/c/coreboot/+/81907/comment/db68ff38_41eed89b?usp... : PS13, Line 46: check_duplicates '<device/(path|resource).h>' '<device/device.h>' : check_duplicates '<device/pci_(def|type).h>' '<device/pci.h>' : check_duplicates '<commonlib/bsd/cb_err.h>|<limits.h>|<stdbool.h>|<stdint.h>|<stddef.h>' '<types.h>' : check_duplicates '<arch/cpuid.h>' '<arch/cpu.h>' : check_duplicates '<commonlib/bsd/cbmem_id.h>' '<cbmem.h>' : check_duplicates '<commonlib/loglevel.h>' '<console/console.h>' : check_duplicates '<arch/cpu.h>' '<cpu/cpu.h>' : check_duplicates '<cpu/x86/msr_access.h>' '<cpu/x86/msr.h>' : check_duplicates '<arch/mmio.h>' '<device/mmio.h>' : check_duplicates '<arch/pci_ops.h>' '<device/pci_ops.h>' : check_duplicates '<soc/gpio.h>' '<gpio.h>' : check_duplicates '<commonlib/bsd/cbfs_serialized.h>' '<cbfs.h>' There do not seem to be any facilities to exclude false positives for the files themselves considered by the first argument.