Skip to content

Commit d3dd7aa

Browse files
committed
ci: prevent variable decls using the json brace initializer ctor also
1 parent e0d8ec6 commit d3dd7aa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.gitlab-ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ test_format:
2929
stage: format
3030
needs: []
3131
script:
32-
- if grep "json({}" src/*pp; then echo "The json brace initializer ctor is not supported by some compilers, use j_empty instead"; echo exit 1; fi
32+
- if grep 'json({}' src/*pp; then echo "The json brace initializer ctor is not supported by some compilers, use j_empty instead"; echo exit 1; fi
33+
- if grep -P '^ +nlohmann::json [a-z0-9_]+\({}' src/*pp; then echo "The json brace initializer ctor is not supported by some compilers, use j_empty instead"; echo exit 1; fi
3334
- ./tools/format.sh && git diff --exit-code
3435

3536

0 commit comments

Comments
 (0)