Both query.py and api.py call parse.quote(ident) which perform
url encoding twice on the identifier. For instance, when
ident="linux,kvm" the first encoding done in api.py changes the
ident to GNU nano 6.2 /home/tamir/elixir/.git/COMMIT_EDITMSG * │
BUGFIX: Don't double quote DT compatible strings
Both query.py and api.py call parse.quote(ident) which perform
url encoding twice on the identifier. For instance, when
ident="linux,kvm" the first encoding done in api.py changes the
ident to 'wow%2Cey' but the second encoding done in query.py
changes it to 'wow%252Cey' which is no longer valid.
Remove the call to parse.quote on api.py as only one quoting is
necessary, the one in query.py
This sorts the definition buffer by file path and then by type (reversed)
Sorting by type in reverse order allows to have structs definitions
before members.
Signed-off-by: Maxime Chretien (MixLeNain) <mchretien@linuxmail.org>
Some idents in C files are like $$divI and they quoted so they are not
found in the database.
However idents in the comps database are always quoted so we quote the
idents before searching in the comps database.
Signed-off-by: Maxime Chretien <maxime.chretien@bootlin.com>
decode() is needed by FindCompatibleDts but importing query.py result in
an instantiation of the database (query.py line 29).
Moving it to lib.py allows to import it for FindCompatibleDts without
opening the database.
Signed-off-by: Maxime Chretien <maxime.chretien@bootlin.com>
Idxes needs to be sorted in RefLists but documentation idxes are lower
than others and we added them latter in the RefList so there was a
problem. The easiest solution to solve that is to create a separate
database for documentations.
Signed-off-by: Maxime Chretien <maxime.chretien@bootlin.com>
The output is the same as other queries and files are sorted this way:
Defined : C/CPP/ASM files, where the drivers define the compatible
string
Documented : Documentation files, where the compatible string is documented
Referenced : DTS/DTSI files, where the compatible string is used to bind
a driver to a piece of hardware
Signed-off-by: Maxime Chretien <maxime.chretien@bootlin.com>
- find-file-doc-comments.pl: new file
- data.py: Add database to store doc-comment locations
- script.sh: Add parse-docs subcommand
- update.py:
- Add code to process doc comments
- Update some variable names in hopes of reducing confusion
- query.py:
- Add code to report doc comments
- Update some variable names in hopes of reducing confusion
Also:
- t/TestEnvironment.pm: Add find_doc attribute
- t/interact.pl: Don't die if update.py fails
- t/TestHelpers.pm: Permit checking specific sections of query.py output
- t/300: update regexes per the preceding
- gitignore tags (ctags output) and .cache (api_test.py output)
This patch fixes the error when the query on the tagging
expects 3 levels (v3 v3.1 v3.1-rc0) but gets only one level
from the `script.sh list-tags -h`, resulting in the following error:
<snip>
/home/naveen/workspace/elixir/query.py in query(cmd='versions', *args=())
53 for line in scriptLines ('list-tags', '-h'):
54 decoded_line = decode(line)
=> 55 topmenu, submenu, tag = decoded_line.split(' ')
56 if db.vers.exists (tag):
57 if topmenu not in versions:
topmenu undefined, submenu undefined, tag undefined, decoded_line = 'Tag_V1', \
decoded_line.split = <built-in method split of str object>
<snip>
Fix the issue by initializing the levels to 'UNKNOWN' first and
then processing the menu levels when applicable.
Signed-off-by: Naveen Kaje <naveen.kaje@juul.com>
- Remove the trailing \n character that was breaking
identifier search for the latest version.
- Don't hesitate to replace with a better/cleaner
solution.
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
- For long runs, allows to see which project we are in, and the
percentage of processed tags
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
Include C++ files when indexing and tokenizing files.
Unfortunately due to how C++ utilizes namespaces and classes, this
currently introduces a large amount of false positives for unqualified
identifiers that look the same.
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Python's standard library provides a function to split out file
extensions, and it also handles dot files correctly.
Use that instead of just retrieving the last two characters of
the file name.
This should help with issue #27.
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Instead of using a trailing slash in the path to tell trees from blobs,
we actually ask git the type of the object. Also, if the object is a
tree but lacks a trailing slash, we redirect to the correct URL.
Fixes#6