Skip to content

Update Kconfig highlighter to Linux 5.9

Martin Walch requested to merge (removed):kconfig_update into master

This is a big update to the Kconfig highlighter. I have tested this only manually. This project has a directory "autotests" which suggests that there is some sort of automatic testing. However, I failed to find documentation about it and hence I have neither run nor touched any of that.

Please refer to the commit message for a detailed description (copy & pasting it here seems kind of pointless).

Update Kconfig highlighter to Linux 5.9

Syntax changes have been made to the language of the Linux kernel
configuration system. A lot of new things have been added and a few
have been removed.

Update kconfig.xml accordingly. Still recognize the parts that have
been removed, but mark them as deprecated with strikeOut="true".

While at it, fix various bugs and unify the code style.

 - Mark "boolean" type as deprecated and permit "boolean" as identifier
   (but warn about it).

 - Mark "env" option as deprecated.

 - Mark old use of environment variables (e.g. $ARCH) as deprecated.

 - Mark "---help---" property as deprecated.

 - Mark unquoted strings with dot or slash in it as deprecated.

 - Mark unquoted prompts as deprecated.

 - Enhance support for Makefile style variable expansions with $(...).

 - Add support for Makefile style variables and assignments (+=, :=, =).

 - Add basic support for Makefile style function calls and function
   definitions. Recognize builtin functions.

 - Imitate the highlighting from the Makefile highlighting definition
   for Makefile style features.

 - Explicitly deactivate spellChecking for "unquotedMainmenuPrompt".

 - Activate spellChecking for "quotedMainmenuPrompt".

 - Add Config.* to extensions. Some projects (e.g. BusyBox and OpenWrt)
   have kept using this ancient naming scheme from CML1.

 - Lower priority from 0 to -9, because Config.* may conflict with
   a lot of other extensions, while the other way round is exotic,
   i.e. the names of the correct files usually do not clash with
   other extensions.

 - Revert help text detection to the old, very verbatim mechanism
   (sorry, the last, shorter version with dynamic="true" fails
   recognition in quite a few real-world cases in the mainline kernel).

 - Fix a lot of edge cases in that help text detection.

 - Add recognition of links in angle brackets for help texts.

 - Enhance support for escaped characters.

 - Fix some "config" areas to end properly.

 - Fix failed end detection of "comment" statements.

 - Recognize binary operators in expressions of default properties.

 - Update file comments, i.e. update URL to kconfig-frontends, update
   some version numbers, remove hints that are no longer true and update
   the language syntax changelog.

 - Unify style, e.g. naming scheme and sorting of XML attributes.

 - Extend and update test files.
Edited by Martin Walch

Merge request reports