mirror of https://gerrit.osmocom.org/osmo-ci
lint: simplify find command in exclude_paths_common_asn1c()
The purpose of "cut -d / -f 2-" is to strip off leading "./" in the paths. The same can be achieved by doing "-printf '%P\n'". Matching "*.c" and "*.h" files can be expressed as "-name *.[hc]". Change-Id: Iae3fc5c8842df6926e6ff16a41be5663f1dedd1b
This commit is contained in:
parent
e6ad3a2b2f
commit
4f8a4954b9
|
@ -16,7 +16,7 @@ exclude_paths_common() {
|
|||
|
||||
exclude_paths_common_asn1c() {
|
||||
local pattern="^ \* Generated by asn1c-"
|
||||
local files="$(find -name '*.c' -o -name '*.h' | cut -d / -f 2-)"
|
||||
local files="$(find -name '*.[hc]' -printf '%P\n')"
|
||||
local i
|
||||
|
||||
if [ -z "$files" ]; then
|
||||
|
|
Loading…
Reference in New Issue