[Bug]: Polybar did not detect the configuration of spelling errors, and ignore the error
awarewen opened this issue · comments
awarewen commented
Checklist
- I have read the appropriate section in the contributing guidelines
- I believe this issue is a problem with polybar itself and not a misconfiguration on my part
- I have searched for other open and closed issues that may have already reported this problem
- I have checked the known issues page for this problem.
- I have followed the debugging guide to narrow down the problem to a minimal config.
Steps to reproduce
polybar -c ./polybar_test/polybar_2.ini mybar& > /dev/null
Minimal config
[bar/mybar]
...
modules-left = sep sep1
modules-center = sep sep2
;; Here were ignored
module-right = sep sep3
...
Polybar log
❯ polybar -c ./polybar_test/polybar_2.ini mybar& > /dev/null
[1] 2929365
notice: Parsing config file: ./polybar_test/polybar_2.ini
notice: Loading module 'sep' of type 'custom/text'
notice: Loading module 'sep1' of type 'custom/text'
notice: Loading module 'sep' of type 'custom/text'
notice: Loading module 'sep2' of type 'custom/text'
notice: Loaded 4 modules
notice: Loaded font "iosevka:pixelsize=12" (name=Iosevka, offset=0, file=/home/awarewen/.local/share/fonts/iosevka_nerd_font.ttf)
Expected behavior
Grammar parser should detect the spelling mistakes here
Actual behavior
The spelling errors are skipped, although configured properly run but to look for in the complex configuration such errors will be a waste of time.
Window Manager and Version
bspwm 0.9.10
Linux Distribution
Arch Linux
Polybar version
❯ polybar -v
polybar 3.6.3
Features: +alsa +curl +i3 +mpd +network(libnl) +pulseaudio +xkeyboard
Additional Context / Screenshots
Patrick Ziegler commented
There is really no good way for the parser to know which config values are valid and which are not.
I thought about maybe tracking which config values are accessed and producing a warning for unused settings. But even that may not be 100% accurate since some settings are valid, but only used under certain circumstances.