[yamato@x201]~/var/ctags-github% cat /tmp/foo.js
if (true) {
this[0] = function() {};
}
[yamato@x201]~/var/ctags-github% ./ctags -o - /tmp/foo.js
ctags: Warning: ignoring null tag in /tmp/foo.js(line: 2)
[yamato@x201]~/var/ctags-github% js /tmp/foo.js
[yamato@x201]~/var/ctags-github%
これに関する更新はありますか?
それとも私は何か間違ったことをしていますか? 私がタグ付けしようとしているコードはJavascript / Reactです:)
どうやらそれは次のようなオブジェクトの破壊に関連しています:
const { name, email } = user;
私は警告をよく調べていません。
ただし、ノードコマンドで入力をテストしたため、指定した入力は有効に見えます
入力のために新しい問題を開いてほしい。
JavaScriptが得意な方は、参考として仕様を教えてください。
https://github.com/universal-ctags/ctags/issues/1949#issuecomment-457829914私がどのように苦労したかを参照して
const { name, email } = user;
name
とemail
は適切にタグ付けする必要があります。
[yamato@slave]~% node
> var user = {name: 'a', email: 'b'}
var user = {name: 'a', email: 'b'}
undefined
> const { name, email } = user;
const { name, email } = user;
undefined
> name
name
'a'
JavaScriptが得意な方は、参考として仕様を教えてください。
質問があるかどうかはわかりませんが、オブジェクトの破棄の仕様はECMAScriptの仕様にあります。
https://www.ecma-international.org/ecma-262/6.0/#sec -destructuring-assignment
:)
ありがとう。 それが私に必要なものです。
この問題が解決されないのはなぜですか? 私も同じ問題を抱えています。
ありがとう。 それが私に必要なものです。
警告をどのように削除しましたか?
警告をどのように削除しましたか?
警告を削除しませんでした。
警告をどのように削除しましたか?
警告を削除しませんでした。
同じ問題があります。 {A, B} = some_obj
はctagsで正しく解析できます。
誰もこの問題を修正するつもりはないようです
誰もこの問題を修正するつもりはないようです
破壊的なバインディングのために、私は一度試しました。
[jet@living]/tmp% cd /tmp
cd /tmp
[jet@living]/tmp% git clone https://github.com/masatake/ctags.git
git clone https://github.com/masatake/ctags.git
Cloning into 'ctags'...
...
[jet@living]/tmp% cd ctags
cd ctags
[jet@living]/tmp/ctags% git checkout origin/js-destructual-binding
git checkout origin/js-destructual-binding
Note: switching to 'origin/js-destructual-binding'.
...
HEAD is now at 4eeac5b9 JavaScript: support more forms of destructuring assignments
[jet@living]/tmp/ctags% bash ./autogen.sh
bash ./autogen.sh
+ type autoreconf
...
optlib2c: translating optlib/inko.ctags to optlib/inko.c
+ ./misc/optlib2c optlib/inko.ctags
+ exit 0
[jet@living]/tmp/ctags% ./configure
./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
...
config.status: creating config.h
config.status: executing depfiles commands
[jet@living]/tmp/ctags% make -j 9
make -j 9
REPOINFO main/repoinfo.h
make all-recursive
make[1]: Entering directory '/tmp/ctags'
make[2]: Entering directory '/tmp/ctags'
...
AR libctags.a
CCLD ctags
CCLD mini-geany
make[2]: Leaving directory '/tmp/ctags'
make[1]: Leaving directory '/tmp/ctags'
[jet@living]/tmp/ctags% cat /tmp/bar.js
cat /tmp/bar.js
const { name, email } = user;
[jet@living]/tmp/ctags% ./ctags -o - /tmp/bar.js
./ctags -o - /tmp/bar.js
email /tmp/bar.js /^const { name, email } = user;$/;" C
name /tmp/bar.js /^const { name, email } = user;$/;" C
ブランチは非常に多くの変更を導入します。
そのため、毎日使用するマスターブランチにマージするには、さらに検討が必要です。
this[0] = function() {};
この場合、ctagsは何も言いません。
{
this[0] = function() {};
}
この場合、警告が表示されました。 これは、元の入力の重要なヒント修正になります。
誰もこの問題を修正するつもりはないようです
破壊的なバインディングのために、私は一度試しました。
[jet@living]/tmp% cd /tmp cd /tmp [jet@living]/tmp% git clone https://github.com/masatake/ctags.git git clone https://github.com/masatake/ctags.git Cloning into 'ctags'... ... [jet@living]/tmp% cd ctags cd ctags [jet@living]/tmp/ctags% git checkout origin/js-destructual-binding git checkout origin/js-destructual-binding Note: switching to 'origin/js-destructual-binding'. ... HEAD is now at 4eeac5b9 JavaScript: support more forms of destructuring assignments [jet@living]/tmp/ctags% bash ./autogen.sh bash ./autogen.sh + type autoreconf ... optlib2c: translating optlib/inko.ctags to optlib/inko.c + ./misc/optlib2c optlib/inko.ctags + exit 0 [jet@living]/tmp/ctags% ./configure ./configure checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes ... config.status: creating config.h config.status: executing depfiles commands [jet@living]/tmp/ctags% make -j 9 make -j 9 REPOINFO main/repoinfo.h make all-recursive make[1]: Entering directory '/tmp/ctags' make[2]: Entering directory '/tmp/ctags' ... AR libctags.a CCLD ctags CCLD mini-geany make[2]: Leaving directory '/tmp/ctags' make[1]: Leaving directory '/tmp/ctags' [jet@living]/tmp/ctags% cat /tmp/bar.js cat /tmp/bar.js const { name, email } = user; [jet@living]/tmp/ctags% ./ctags -o - /tmp/bar.js ./ctags -o - /tmp/bar.js email /tmp/bar.js /^const { name, email } = user;$/;" C name /tmp/bar.js /^const { name, email } = user;$/;" C
ブランチは非常に多くの変更を導入します。
そのため、毎日使用するマスターブランチにマージするには、さらに検討が必要です。
私はそれを試しました、非常に良い解決策、ありがとう。
これらのブランチを作成しましたか、パッチがたくさんあります。
こんにちは
これはctags自体の問題の原因ではありませんが、JavaScriptファイルに対するこの特定の警告を無視するctags
シェル関数を作成しました: https :
コマンドラインでctagsを頻繁に実行し、問題が修正されるまで警告を非表示にしたい場合に備えて。
ディートリッヒ
配列の破壊でこの警告も表示されます:
const [lang, setLang] = useState("en")
@Strangehill 、同じコメントを#1112に追加できますか?
もちろん
ありがとうございました。