elastic / elastic/logstash

Conditionals: string is allowed as conditional statement

Open
#1,589 5 comments 0 reactions 0 assignees View on GitHub
design discuss enhancement LIR
Dominant language
Java
Stars
14.9k
Forks
3.5k
Avg merge
19h 14m
Merged PRs (30d)
63

Description

Current grammar allows using string as conditionals statements like

```
if "i'm a fool" {
noop {
add_tag => "fool"
}
}
```

But as reported in LOGSTASH-1434, this could be confusing to non-programmer/distracted users that would write

```
if [field] == "string1" or "string2" {
....
}
```

and do not understand why the condition is always matched...

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.