Skip to content
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

[RFC] readtags: supports multiple tag files #4068

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Commits on Sep 12, 2024

  1. readtags,refactor: remove "TagFileName" global variable

    Signed-off-by: Masatake YAMATO <[email protected]>
    masatake committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    3881054 View commit details
    Browse the repository at this point in the history
  2. readtags,refactor: take the action after parsing command line

    The original code called findTag or listTags directly in the process
    of command line parsing. This change introduces new data structure
    named actionSpec. During parsing command line, readtags builds an
    actionSpec. After parsing readtags takes an action based on the
    actionSpec.
    
    Signed-off-by: Masatake YAMATO <[email protected]>
    masatake committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    c927102 View commit details
    Browse the repository at this point in the history
  3. readtags,refactor: move "canon" local variable in main function to in…

    …putSpec
    
    Signed-off-by: Masatake YAMATO <[email protected]>
    masatake committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    610984b View commit details
    Browse the repository at this point in the history
  4. readtags,refactor: pass the actionSpec to action functions instead of…

    … the canonWorkArea
    
    Signed-off-by: Masatake YAMATO <[email protected]>
    masatake committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    11d0ffb View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    044cd45 View commit details
    Browse the repository at this point in the history
  6. readtags: experimental support for specifying -t multiple times

      $ ~/bin/ctags -o podman.tags -R ~/var/podman
      $ ~/bin/ctags -o glibc.tags -R ~/var/glibc
      $ ~/bin/ctags -o coreutils832.tags -R /srv/sources9c/sources/c/coreutils/8.32-31.el9--srpm/pre-build/coreutils-8.32
      $ ./readtags -A -Q '(and (eq? $name "main") (#/.*user.*/ $input))' -t podman.tags -t glibc.tags -t coreutils832.tags -l
      main	/srv/sources9c/sources/c/coreutils/8.32-31.el9--srpm/pre-build/coreutils-8.32/gnulib-tests/test-userspec.c	/^main (void)$/
      main	/srv/sources9c/sources/c/coreutils/8.32-31.el9--srpm/pre-build/coreutils-8.32/lib/getusershell.c	/^main (void)$/
      main	/srv/sources9c/sources/c/coreutils/8.32-31.el9--srpm/pre-build/coreutils-8.32/lib/userspec.c	/^main (int argc, char **argv)$/
      main	/srv/sources9c/sources/c/coreutils/8.32-31.el9--srpm/pre-build/coreutils-8.32/src/users.c	/^main (int argc, char **argv)$/
      $ ./readtags -A -Q '(and (eq? $name "main") (#/.*container.*/ $input))' -t podman.tags -t glibc.tags -t coreutils832.tags -l
      main	/home/yamato/var/glibc/support/echo-container.c	/^main (int argc, const char **argv)$/
      main	/home/yamato/var/glibc/support/shell-container.c	/^main (int argc, const char **argv)$/
      main	/home/yamato/var/glibc/support/test-container.c	/^main (int argc, char **argv)$/
      main	/home/yamato/var/glibc/support/true-container.c	/^main (void)$/
      $ ./readtags -A -Q '(not (#/.*_test.*/ $input))' -t podman.tags -t glibc.tags -t coreutils832.tags rootless
      rootless	/home/yamato/var/podman/pkg/rootless/rootless.go	/^package rootless$/
      rootless	/home/yamato/var/podman/pkg/rootless/rootless_freebsd.go	/^package rootless$/
      rootless	/home/yamato/var/podman/pkg/rootless/rootless_linux.go	/^package rootless$/
      rootless	/home/yamato/var/podman/pkg/rootless/rootless_unsupported.go	/^package rootless$/
      rootless	/home/yamato/var/podman/vendor/github.com/containers/image/v5/internal/rootless/rootless.go	/^package rootless$/
    
    Signed-off-by: Masatake YAMATO <[email protected]>
    masatake committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    953f035 View commit details
    Browse the repository at this point in the history