gugod / gugod/Perl-Critic-TooMuchCode
ProhibitUnusedImport fails in conditional operator ?: with concatenation
- Dominant language
- Perl
- Stars
- 8
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
It fails like this
```
$ perlcritic --noprofile --single TooMuchCode::ProhibitUnusedImport
use Foo qw(bar);
my $a = 1 ? 'prefix-'. bar : 'noop';
Unused import: bar at line 1, column 5. A token is imported but not used in the same code. (Severity: 1)
```
But works in other combinations:
```
$ perlcritic --noprofile --single TooMuchCode::ProhibitUnusedImport
use Foo qw(bar);
my $a = 1 ? 'noop' : 'prefix-'. bar ;
source OK
```
```
$ perlcritic --noprofile --single TooMuchCode::ProhibitUnusedImport
use Foo qw(bar);
my $a = 1 ? bar . '-suffix' : 'noop';
source OK
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.