Skip to content

Commit 6a1ee4b

Browse files
authored
Merge pull request #3580 from masatake/option--list-fields=NONE
[SELF-INCOMPATIBLE] main: add --list-fields=NONE and --list-extras=NONE
2 parents f9d21e7 + 2b74d4b commit 6a1ee4b

File tree

29 files changed

+78
-9
lines changed

29 files changed

+78
-9
lines changed

Tmain/broken-langdef.d/run.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ run_ctags()
1313

1414
run_ctags ""
1515
run_ctags all
16+
run_ctags NONE
1617
for c in '!' '"' '$' '%' '&' "'" '(' ')' '*' ',' '-' '.' '/' ':' ';' '<' '=' '>' '?' '@' '[' '\' ']' '^' '`' '|' '~'; do
1718
run_ctags "C$c"
1819
done

Tmain/broken-langdef.d/stderr-expected.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
ctags: No language specified for "langdef" option
33
# all
44
ctags: "all" is reserved; don't use it as the name for defining a new language
5+
# NONE
6+
ctags: "NONE" is reserved; don't use it as the name for defining a new language
57
# C!
68
ctags: don't use `!' in a language name (C!)
79
# C"

Tmain/list-extras.d/run.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ CTAGS=$1
55

66
${CTAGS} --quiet --options=NONE --extras='*' --with-list-header --list-extras
77
${CTAGS} --quiet --options=NONE --extras='*' --with-list-header --machinable --list-extras
8+
${CTAGS} --quiet --options=NONE --extras= --with-list-header --list-extras=NONE

Tmain/list-extras.d/stdout-expected.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,12 @@ s subparser yes NONE no Include tags generated by subparsers
2626
- configPrefixed yes Kconfig no prepend CONFIG_ to config names
2727
- funcmap yes QemuHX no Include mapping SQMP to C function name
2828
- whitespaceSwapped yes Robot no Include tags swapping whitespace and underscore chars
29+
#LETTER NAME ENABLED LANGUAGE FIXED DESCRIPTION
30+
- anonymous no NONE no Include tags for non-named objects like lambda
31+
F fileScope no NONE no Include tags of file scope
32+
f inputFile no NONE no Include an entry for the base file name of every input file
33+
g guest no NONE no Include tags generated by guest parsers
34+
p pseudo no NONE no Include pseudo tags
35+
q qualified no NONE no Include an extra class-qualified tag entry for each tag
36+
r reference no NONE no Include reference tags
37+
s subparser no NONE no Include tags generated by subparsers
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0

Tmain/list-fields-none.d/run.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Copyright: 2022 Masatake YAMATO
2+
# License: GPL-2
3+
4+
CTAGS=$1
5+
6+
$CTAGS --quiet --options=NONE --list-fields=NONE | grep -v xpath
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#LETTER NAME ENABLED LANGUAGE JSTYPE FIXED OP DESCRIPTION
2+
N name yes NONE s-- yes rw tag name
3+
F input yes NONE s-- yes r- input file
4+
P pattern yes NONE s-b yes -- pattern
5+
C compact no NONE s-- no -- compact input line (used only in xref output)
6+
E extras no NONE s-- no r- Extra tag type information
7+
K NONE no NONE s-- no -- Kind of tag in long-name form
8+
R NONE no NONE s-- no -- Marker (R or D) representing whether tag is definition or reference
9+
S signature no NONE s-- no rw Signature of routine (e.g. prototype or parameter list)
10+
T epoch yes NONE -i- no -- the last modified time of the input file (only for F/file kind tag)
11+
Z scope no NONE s-- no rw [tags output] prepend "scope:" key to s/scope field output, [xref and json output] the same as s/ field
12+
a access no NONE s-- no rw Access (or export) of class members
13+
e end no NONE -i- no rw end lines of various items
14+
f file yes NONE --b no -- File-restricted scoping
15+
i inherits no NONE s-b no -w Inheritance information
16+
k NONE yes NONE s-- no -- Kind of tag in one-letter form
17+
l language no NONE s-- no -- Language of input file containing tag
18+
m implementation no NONE s-- no -- Implementation information
19+
n line no NONE -i- no rw Line number of tag definition
20+
o nth no NONE -i- no -- the order in the parent scope
21+
p scopeKind no NONE s-- no -- [tags output] no effect, [xref and json output] kind of scope in long-name form
22+
r roles no NONE s-- no r- Roles
23+
s NONE yes NONE s-- no -- [tags output] scope (kind:name) of tag definition, [xref and json output] name of scope
24+
t typeref yes NONE s-- no rw Type and name of a variable or typedef
25+
z kind no NONE s-- no r- [tags output] prepend "kind:" to k/ (or K/) field output, [xref and json output] kind in long-name form

0 commit comments

Comments
 (0)