Commit graph

22 commits

Author SHA1 Message Date
Maxime Chretien
bdcb386626 update.py: Use 4 threads to speed up indexation
This allows to index multiple things at the same time so it speeds up
database indexation.

Signed-off-by: Maxime Chretien <maxime.chretien@bootlin.com>
2020-05-22 10:29:24 +02:00
Michael Opdenacker
893c4aabdb update.py: fix syntax issues (typical "C-isms")
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
2020-04-06 17:21:30 +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
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
453e8a127c Factorize the definition of supported extensions
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
2019-10-08 07:33:36 +02:00
Michael Opdenacker
f2b40c5f7e update.py: fix division by zero in progress report
- Required when there are no new tags

Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
2019-10-04 15:13:52 +02:00
Michael Opdenacker
3c78f8a0fc Add some comments
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
2019-10-04 13:07:54 +02:00
Michael Opdenacker
c6aee2ad9d Improve progress reporting + factorize LXR_DATA_DIR access
- 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>
2019-10-03 13:33:26 +02:00
Michael Opdenacker
89b777fb4f Add some comments
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
2019-09-23 14:34:20 +02:00
Chen-Yu Tsai
0ab49d012f Add basic support for C++ files
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>
2018-04-10 07:45:12 +00:00
Chen-Yu Tsai
883281e446 Use os.path.splitext to split out file extension
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>
2018-04-10 07:44:25 +00: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
Silvio Fricke
b7e1cd3215 change shebang to be more flexible
Python developers tend to use `virtualenv` then a fixed shebang is contra
productive.

Signed-off-by: Silvio Fricke <silvio.fricke@gmail.com>
2017-06-14 10:30:51 +02:00
Mikaël Bouillot
23488aac17 Fix broken internal dependency 2017-05-11 13:22:49 +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
0bf34d7751 Database update script, new data format 2017-02-06 15:15:51 +01:00