mirror of
https://github.com/tiennm99/serena.git
synced 2026-10-14 00:16:57 +00:00
Include .t files in Perl::LanguageServer fileFilter
Serena's file-to-language router already maps `.t` to the Perl LS (`Language.PERL` in `solidlsp/ls_config.py`), but the Perl::LanguageServer-side `fileFilter` was hardcoded to `[".pm", ".pl"]`. As a result Perl::LanguageServer skipped `.t` files entirely: symbol queries on a `.t` returned empty, and references to `.pm`/`.pl` subs missed any callers defined in `.t` files. Add `.t` to the filter, deduplicate the two `fileFilter` literals into a `_FILE_FILTER` class constant, and note the sync requirement with `Language.PERL.get_source_fn_matcher()` in a comment. Cover the behavior with a new cross-file references test plus a `helper.t` fixture; the test fails on unpatched `main` and passes on this branch.
This commit is contained in:
1 parent
0909ae05f7
commit
860c5841df
3 files changed
+26
-2
No files matched your search
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env perl
|
||||
|
||||
use lib '.';
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use Test::More tests => 1;
|
||||
|
||||
require helper;
|
||||
|
||||
helper_function();
|
||||
ok(1, 'helper_function callable from .t file');
|
||||
Reference in new issue
Block a user