@@ -197,23 +197,23 @@ jobs:
197
197
- name : Check for incorrect error use in VerifyOrExit
198
198
if : always()
199
199
run : |
200
- git grep -n "VerifyOrExit(.*, [A-Za-z]*_ERROR" -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0
200
+ git grep -I - n "VerifyOrExit(.*, [A-Za-z]*_ERROR" -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0
201
201
202
202
# git grep exits with 0 if it finds a match, but we want
203
203
# to fail (exit nonzero) on match. And we want to exclude this file,
204
204
# to avoid our grep regexp matching itself.
205
205
- name : Check for use of PRI*8, which are not supported on some libcs.
206
206
if : always()
207
207
run : |
208
- git grep -n "PRI.8" -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)third_party/lwip/repo/lwip/src/include/lwip/arch.h' && exit 1 || exit 0
208
+ git grep -I - n "PRI.8" -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)third_party/lwip/repo/lwip/src/include/lwip/arch.h' && exit 1 || exit 0
209
209
210
210
# git grep exits with 0 if it finds a match, but we want
211
211
# to fail (exit nonzero) on match. And we want to exclude this file,
212
212
# to avoid our grep regexp matching itself.
213
213
- name : Check for use of PRI*16, which are not supported on some libcs.
214
214
if : always()
215
215
run : |
216
- git grep -n "PRI.16" -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)third_party/lwip/repo/lwip/src/include/lwip/arch.h' && exit 1 || exit 0
216
+ git grep -I - n "PRI.16" -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)third_party/lwip/repo/lwip/src/include/lwip/arch.h' && exit 1 || exit 0
217
217
218
218
# git grep exits with 0 if it finds a match, but we want
219
219
# to fail (exit nonzero) on match. And we want to exclude this file,
@@ -226,7 +226,7 @@ jobs:
226
226
# TODO: TLVDebug should ideally not be excluded here.
227
227
# TODO: protocol_decoder.cpp should ideally not be excluded here.
228
228
# TODO: PersistentStorageMacros.h should ideally not be excluded here.
229
- git grep -n "PRI.64" -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)examples/chip-tool' ':(exclude)examples/tv-casting-app' ':(exclude)src/app/MessageDef/MessageDefHelper.cpp' ':(exclude)src/app/tests/integration/chip_im_initiator.cpp' ':(exclude)src/lib/core/TLVDebug.cpp' ':(exclude)src/lib/dnssd/tests/TestTxtFields.cpp' ':(exclude)src/lib/format/protocol_decoder.cpp' ':(exclude)src/lib/support/PersistentStorageMacros.h' ':(exclude)src/messaging/tests/echo/echo_requester.cpp' ':(exclude)src/platform/Linux' ':(exclude)src/platform/Ameba' ':(exclude)src/platform/ESP32' ':(exclude)src/platform/webos' ':(exclude)zzz_generated/chip-tool' ':(exclude)src/tools/chip-cert/Cmd_PrintCert.cpp' && exit 1 || exit 0
229
+ git grep -I - n "PRI.64" -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)examples/chip-tool' ':(exclude)examples/tv-casting-app' ':(exclude)src/app/MessageDef/MessageDefHelper.cpp' ':(exclude)src/app/tests/integration/chip_im_initiator.cpp' ':(exclude)src/lib/core/TLVDebug.cpp' ':(exclude)src/lib/dnssd/tests/TestTxtFields.cpp' ':(exclude)src/lib/format/protocol_decoder.cpp' ':(exclude)src/lib/support/PersistentStorageMacros.h' ':(exclude)src/messaging/tests/echo/echo_requester.cpp' ':(exclude)src/platform/Linux' ':(exclude)src/platform/Ameba' ':(exclude)src/platform/ESP32' ':(exclude)src/platform/webos' ':(exclude)zzz_generated/chip-tool' ':(exclude)src/tools/chip-cert/Cmd_PrintCert.cpp' && exit 1 || exit 0
230
230
231
231
# git grep exits with 0 if it finds a match, but we want
232
232
# to fail (exit nonzero) on match. And we want to exclude this file,
@@ -261,15 +261,15 @@ jobs:
261
261
- name : Check for use of 0x%u and the like, which lead to misleading output.
262
262
if : always()
263
263
run : |
264
- git grep -n '0x%[0-9l.-]*[^0-9lxX".-]' -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0
264
+ git grep -I - n '0x%[0-9l.-]*[^0-9lxX".-]' -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0
265
265
266
266
# git grep exits with 0 if it finds a match, but we want
267
267
# to fail (exit nonzero) on match. And we want to exclude this file,
268
268
# to avoid our grep regexp matching itself.
269
269
- name : Check for use of '"0x" PRIu*' and the like, which lead to misleading output.
270
270
if : always()
271
271
run : |
272
- git grep -n '0x%[0-9-]*" *PRI[^xX]' -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0
272
+ git grep -I - n '0x%[0-9-]*" *PRI[^xX]' -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0
273
273
274
274
# git grep exits with 0 if it finds a match, but we want
275
275
# to fail (exit nonzero) on match.
@@ -285,7 +285,7 @@ jobs:
285
285
- name : Check for use of 'emberAfReadAttribute' instead of the type-safe getters
286
286
if : always()
287
287
run : |
288
- git grep -n 'emberAfReadAttribute' -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)src/app/util/af.h' ':(exclude)zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp' ':(exclude)src/app/zap-templates/templates/app/attributes/Accessors-src.zapt' ':(exclude)src/app/util/attribute-table.cpp' && exit 1 || exit 0
288
+ git grep -I - n 'emberAfReadAttribute' -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)src/app/util/af.h' ':(exclude)zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp' ':(exclude)src/app/zap-templates/templates/app/attributes/Accessors-src.zapt' ':(exclude)src/app/util/attribute-table.cpp' && exit 1 || exit 0
289
289
290
290
# git grep exits with 0 if it finds a match, but we want
291
291
# to fail (exit nonzero) on match. And we want to exclude this file,
@@ -295,7 +295,7 @@ jobs:
295
295
- name : Check for use of 'emberAfWriteAttribute' instead of the type-safe setters
296
296
if : always()
297
297
run : |
298
- git grep -n 'emberAfWriteAttribute' -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)src/app/util/af.h' ':(exclude)zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp' ':(exclude)src/app/zap-templates/templates/app/attributes/Accessors-src.zapt' ':(exclude)src/app/util/attribute-table.cpp' ':(exclude)examples/common/pigweed/rpc_services/Attributes.h' ':(exclude)src/app/util/attribute-table.h' ':(exclude)src/app/util/ember-compatibility-functions.cpp' && exit 1 || exit 0
298
+ git grep -I - n 'emberAfWriteAttribute' -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)src/app/util/af.h' ':(exclude)zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp' ':(exclude)src/app/zap-templates/templates/app/attributes/Accessors-src.zapt' ':(exclude)src/app/util/attribute-table.cpp' ':(exclude)examples/common/pigweed/rpc_services/Attributes.h' ':(exclude)src/app/util/attribute-table.h' ':(exclude)src/app/util/ember-compatibility-functions.cpp' && exit 1 || exit 0
299
299
300
300
# Run python Linter (flake8) and verify python files
301
301
# ignore some style errors, restyler should do that
@@ -310,12 +310,12 @@ jobs:
310
310
- name : Check for use of "SuccessOrExit(CHIP_ERROR_*)", which should probably be "SuccessOrExit(err = CHIP_ERROR_*)"
311
311
if : always()
312
312
run : |
313
- git grep -n 'SuccessOrExit(CHIP_ERROR' -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0
313
+ git grep -I - n 'SuccessOrExit(CHIP_ERROR' -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0
314
314
315
315
# git grep exits with 0 if it finds a match, but we want
316
316
# to fail (exit nonzero) on match. And we want to exclude this file,
317
317
# to avoid our grep regexp matching itself.
318
318
- name : Check for use of "SuccessOrExit(something-without-assignment(", which should probably be "SuccessOrExit(err = something("
319
319
if : always()
320
320
run : |
321
- git grep -n 'SuccessOrExit([^=)]*(' -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0
321
+ git grep -I - n 'SuccessOrExit([^=)]*(' -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0
0 commit comments