How to compile sketch with pedantic key?

hi

maximum that I see in Preferences is -Wall and -Wextra

what is a "pedantic key" and how is it related to compiler options?

-Wpedantic
pedantic warning

I am not sure whether this can be configured via the IDE, but you can look for the platform.txt file and edit the following line:

compiler.warning_flags.all=-Wall -Wextra

On a Linux system, this file can be found in one of the subfolders of the arduino15 folder, ~/.arduino15/packages/arduino/hardware/avr/1.8.5 to be precise. The exact location will differ per OS en per core.