-
Notifications
You must be signed in to change notification settings - Fork 1
/
tarantool_box_missed_if_not_exist.yaml
27 lines (26 loc) · 1.14 KB
/
tarantool_box_missed_if_not_exist.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
rules:
- id: tarantool_box_missed_if_not_exist
metadata:
author: Sergey Bronnikov <estetus@gmail.com>
description: Option `if_not_exists` is missed.
message: if_not_exist
languages: [lua]
severity: WARNING
pattern-either:
- patterns:
- pattern-inside: box.schema.space.create(...)
- pattern-not: box.schema.space.create($NAME, { ..., if_not_exists = true, ... })
- patterns:
- pattern-inside: box.schema.func.create(...)
- pattern-not: box.schema.func.create($NAME, { ..., if_not_exists = true, ... })
#- pattern: |
# $SPACE = box.schema.space.create(...)
# $SPACE:create_index($NAME, { if_not_exists = true })
# TODO: box.schema.user.grant()
# https://www.tarantool.io/en/doc/latest/reference/reference_lua/box_schema/user_grant/
# box.schema.user.create()
# https://www.tarantool.io/en/doc/latest/reference/reference_lua/box_schema/user_create/
# box.schema.role.grant()
# https://www.tarantool.io/en/doc/latest/reference/reference_lua/box_schema/role_grant/
# box.schema.sequence.create()
# https://www.tarantool.io/en/doc/latest/how-to/db/sequences/