Commit graph

30 commits

Author SHA1 Message Date
Ziyue Pan
a627571baf Style: fix redundant parentheses and typos 2023-03-23 09:54:14 +01:00
Riccardo Magliocchetti
cb0596029f data: remove unused import 2020-10-20 21:28:27 +02:00
Maxime Chretien
fd2335beaf queries: Support C macros in DT files
Signed-off-by: Maxime Chretien <maxime.chretien@bootlin.com>
2020-06-12 15:16:15 +02:00
Maxime Chretien
c85bb9e9df data.py: Sort data before using them in iter
This is needed because queries expect datas to be in increasing order of
idx.

Signed-off-by: Maxime Chretien <maxime.chretien@bootlin.com>
2020-06-12 12:04:23 +02:00
Maxime Chretien
39586eaa6e query: Add query to get all keys of a database
Signed-off-by: Maxime Chretien <maxime.chretien@bootlin.com>
2020-06-11 14:38:44 +02:00
Maxime Chretien
c555bf4338 defs: Add family once we are sure that the element is added in the db
This prevent wrong entries in the database

Signed-off-by: Maxime Chretien <maxime.chretien@bootlin.com>
2020-06-11 09:53:06 +02:00
Maxime Chretien
76c68265d3 DT compatibles : Add a separate database for documentation
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>
2020-06-08 15:37:59 +02:00
Maxime Chretien
4a8c99b7e5 database: Enable db.comps only when needed
Signed-off-by: Maxime Chretien <maxime.chretien@bootlin.com>
2020-06-08 15:37:59 +02:00
Maxime Chretien
81fa361c54 database: Add support for dts compatible strings
They can be found in C, DTS and documentation files

Signed-off-by: Maxime Chretien <maxime.chretien@bootlin.com>
2020-06-08 15:37:59 +02:00
Maxime Chretien
155733bdd9 Enable ctags extern variable support
This is needed to fix https://github.com/bootlin/elixir/issues/61

Signed-off-by: Maxime Chretien <maxime.chretien@bootlin.com>
2020-05-26 12:16:39 +02:00
Chris White
5e7cab18ca Added/updated copyright notices; whitespace fixes
No functional changes
2020-05-23 15:14:21 -04:00
Maxime Chretien
72571fbfd9 database: Add support for Kconfig et Devicetree files
This brings the idea of file families, each ident is identified by his
family and can be referenced in compatible families.

For exemple :
- A Kconfig ident can be referenced in a C file but not in a Devicetree file.
- A Devicetree ident is only referenced in Devicetree files.
- A C ident is only referenced in C files.

Kconfig idents are defined without the CONFIG_ at the beginning.
We add it while indexing for an easier processing of other files.

Signed-off-by: Maxime Chretien <maxime.chretien@bootlin.com>
2020-05-22 10:29:24 +02:00
Christopher White
8a6031c8a1 Add doc-comment extraction
- 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)
2020-04-02 13:03:03 -04:00
Carmeli Tamir
a1e8117afd Check test failure 2020-03-07 13:24:16 -05:00
Michael Opdenacker
952329f32b Fix http error handling
- Return "400" status when the project doesn't have a database or repo
- In case the DB is not found, properly print the corresponding
  file name in the logs

Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
2019-12-18 10:13:15 +01:00
Michael Opdenacker
51a6dff682 Python parentheses coding style fixes
- According to https://www.python.org/dev/peps/pep-0008/

Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
2019-12-01 07:01:26 +01:00
Michael Opdenacker
b4118f3f9e
Merge pull request #34 from plaes/master
Clean up unused imports
2018-04-05 10:53:43 +02:00
Mikaël Bouillot
537e6b3a7b Change business name 2018-02-15 21:27:00 +00:00
Priit Laes
f02c6469fa Clean up unused imports
Signed-off-by: Priit Laes <plaes@plaes.org>
2017-10-21 14:03:37 +03:00
stdk
4845e25186 Filenames that contain spaces are now processed correctly (#24)
Fixes #23
2017-07-02 17:03:54 +00:00
Mikaël Bouillot
1b4c0fc7d4 Update notices to match the new license 2017-06-27 14:13:28 +02:00
Mikaël Bouillot
3f35066225 Create new databases with global read permission 2017-06-06 15:45:33 +02:00
Mikaël Bouillot
832f7c8b6d Add license 2017-03-09 17:25:42 +01:00
Mikaël Bouillot
d6bf6aba21 Explicitly flush versions to disk on update
Fixes #4
2017-02-22 17:20:21 +01:00
Mikaël Bouillot
95b4d78337 Open database read-only for queries 2017-02-14 13:11:34 +01:00
Mikaël Bouillot
4421c30e58 Add indexing of function prototypes 2017-02-07 15:56:31 +01:00
Mikaël Bouillot
0bf34d7751 Database update script, new data format 2017-02-06 15:15:51 +01:00
Mikaël Bouillot
3f0b68a0d7 Use environment variables for paths 2017-02-06 09:50:40 +01:00
Mikaël Bouillot
c94d48ae7e Compute direct type map from reverse map 2017-02-05 21:35:24 +01:00
Mikaël Bouillot
abbf08646a Split data module and add dummy element to iterators 2017-02-05 21:26:39 +01:00