[RFC] readtags: supports multiple tag files
This pull request implements the ideas I wrote in https://github.com/universal-ctags/citre/issues/178.
Example sessions:
- https://github.com/universal-ctags/citre/issues/178#issuecomment-2330336232
- https://github.com/universal-ctags/citre/issues/178#issuecomment-2330430958
With this pull request, readtags can take multiple -t option. So you can find a tag in multiple files at once. Using multiple threads is future work.
This pull request adds !_READTAGS_INCLUDE directive. If a tag file is specified with the pseudo tag, readtags reads the tas file, too, as if the tag file is specified with -t on the command line.
This pull request adds -X/--generate-aggregate-tag-file option to readtags. With the option, readtags generate an aggregate tag file enumerating all tag files specified with -t on the command line.
$ ./readtags -t podman.tags -t glibc.tags -t coreutils832.tags -X
!_READTAGS_INCLUDE podman.tags //
!_READTAGS_INCLUDE glibc.tags //
!_READTAGS_INCLUDE coreutils832.tags //
!_TAG_FILE_FORMAT 2 //
!_TAG_FILE_SORTED 1 //
!_TAG_OUTPUT_EXCMD pattern //
!_TAG_OUTPUT_FILESEP slash //
!_TAG_OUTPUT_MODE u-ctags //
!_TAG_OUTPUT_VERSION 0.0 /current.age/
!_TAG_PATTERN_LENGTH_LIMIT 0 //
!_TAG_PROC_CWD /home/yamato/var/ctags-github //
!_TAG_PROGRAM_AUTHOR Universal Ctags Team //
!_TAG_PROGRAM_NAME readtags /with -X option/
!_TAG_PROGRAM_URL https://ctags.io/ /official site/
!_TAG_PROGRAM_VERSION 0.0.0 /TODO/
Codecov Report
Attention: Patch coverage is 84.34783% with 18 lines in your changes missing coverage. Please review.
Project coverage is 85.53%. Comparing base (
5039ab9) to head (953f035). Report is 441 commits behind head on master.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| extra-cmds/readtags-cmd.c | 84.34% | 18 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## master #4068 +/- ##
==========================================
+ Coverage 85.51% 85.53% +0.02%
==========================================
Files 237 237
Lines 57030 57030
==========================================
+ Hits 48769 48782 +13
+ Misses 8261 8248 -13
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.