-
Notifications
You must be signed in to change notification settings - Fork 620
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Kconfig parser #2553
Add Kconfig parser #2553
Conversation
Kconfig is a language used for build configurations used in a lot of open source projects (ex: linux, u-boot, barebox, ...) Reference: https://www.kernel.org/doc/html/latest/kbuild/kconfig-language.html Signed-off-by: Maxime Chretien <maxime.chretien@bootlin.com>
Codecov Report
@@ Coverage Diff @@
## master #2553 +/- ##
==========================================
+ Coverage 86.55% 86.56% +0.01%
==========================================
Files 182 183 +1
Lines 38350 38384 +34
==========================================
+ Hits 33192 33227 +35
+ Misses 5158 5157 -1
Continue to review full report at Codecov.
|
This is part of bootlin/elixir#130, in case anyone wonders about the use case. |
Thank you for making this pull request. Could you add "Kconfig" as a new parser to docs/news.rst ? |
Signed-off-by: Maxime Chretien <maxime.chretien@bootlin.com>
Signed-off-by: Maxime Chretien <maxime.chretien@bootlin.com>
Hi, |
I also had a Kconfig parser that is derrived from linux/scripts/tags.sh. Your version is not based on the tags.sh script. So I can arrange my parser based on your parser. My version is not written in C. Both yours and mine just use regex pattern matching. So C is not needed. |
I made the kconfig parser tags more items like menu. If elixir doesn't need it, you can turn off from the command line. |
@MaximeChretien, could you try my changes stacked on you changes? |
"mainmenu" kind should be renamed to "mainMenu". |
New kinds are introduced: * menu * mainmenu * kconfig (loaded by source directive) * choice CONFIG_FOO for FOO config is tagged as a "configPrefixed" extra tag. scopes made by menus are tracked. Signed-off-by: Masatake YAMATO <yamato@redhat.com>
The test inputs are taken from linux kernel.
Hi, |
And is there a way to have only the result with configPrefixed ? |
I can disable it. But... do you really want to disable it?
ctags itself doesn't have a feature to do it. However,
The readtags command that is part of u-ctags, you can extract tags having the field.
|
If it's enabled by default in scripts/tags.sh, I guess it should be enabled here too, it's not that hard to disable it if needed.
Ok I will look at that, currently what we do in Elixir is parsing the output of ctags with |
Thank you for replying and the contribution. |
BTW, Elixir can find "jiffies" for x86_64? |
The problem with jiffies is that this So I think there is a problem in the .h parsing |
The parser has been modified before being merged so we adapt to the changes. See : universal-ctags/ctags#2553 Signed-off-by: Maxime Chretien <maxime.chretien@bootlin.com>
--kinds-C++=+x is needed to capture them.
|
Oh nice ! Thanks a lot ! |
Kconfig is a language used for build configurations used in a lot of
open source projects (ex: linux, u-boot, barebox, ...)
Reference:
https://www.kernel.org/doc/html/latest/kbuild/kconfig-language.html