Open petdance opened 5 years ago
Good lord, people use formats? ;)
Good lord, people use formats? ;)
Yes, people work with codebases that include programs that have been keeping the company running since the early 2000s, and that happen to use formats.
Please fix. This is very annoying. And the longer your @<<<<<<
lines are the more errors you get.
Can I up the priority somewhere?
$ cat test.pl
#!/usr/bin/perl
use strict;
use warnings;
our $VERSION = "1.00";
write;
format STDOUT =
@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
$0
.
$ perl test.pl
test.pl
$ perlcritic -1 test.pl
test.pl#11.2: [4 - Freenode::DeprecatedFeatures] Bare here-doc is deprecated :@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
test.pl#11.4: [4 - Freenode::DeprecatedFeatures] Bare here-doc is deprecated :@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
test.pl#11.6: [4 - Freenode::DeprecatedFeatures] Bare here-doc is deprecated :@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
test.pl#11.8: [4 - Freenode::DeprecatedFeatures] Bare here-doc is deprecated :@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
test.pl#11.10: [4 - Freenode::DeprecatedFeatures] Bare here-doc is deprecated :@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
test.pl#11.12: [4 - Freenode::DeprecatedFeatures] Bare here-doc is deprecated :@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
test.pl#11.14: [4 - Freenode::DeprecatedFeatures] Bare here-doc is deprecated :@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
test.pl#11.16: [4 - Freenode::DeprecatedFeatures] Bare here-doc is deprecated :@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
test.pl#11.18: [4 - Freenode::DeprecatedFeatures] Bare here-doc is deprecated :@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
test.pl#11.20: [4 - Freenode::DeprecatedFeatures] Bare here-doc is deprecated :@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
test.pl#11.22: [4 - Freenode::DeprecatedFeatures] Bare here-doc is deprecated :@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
test.pl#11.24: [4 - Freenode::DeprecatedFeatures] Bare here-doc is deprecated :@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
test.pl#11.26: [4 - Freenode::DeprecatedFeatures] Bare here-doc is deprecated :@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
test.pl#11.28: [4 - Freenode::DeprecatedFeatures] Bare here-doc is deprecated :@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
test.pl#11.30: [4 - Freenode::DeprecatedFeatures] Bare here-doc is deprecated :@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
test.pl#11.32: [4 - Freenode::DeprecatedFeatures] Bare here-doc is deprecated :@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
test.pl#11.34: [4 - Freenode::DeprecatedFeatures] Bare here-doc is deprecated :@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
test.pl#11.36: [4 - Freenode::DeprecatedFeatures] Bare here-doc is deprecated :@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
You can up the priority by providing a PR :)
As a note, this will have to start with a PR to PPI. Here is the ppi_dumper output for your example file:
PPI::Document
PPI::Token::Comment '#!/usr/bin/perl\n'
PPI::Token::Whitespace '\n'
PPI::Statement::Include
PPI::Token::Word 'use'
PPI::Token::Whitespace ' '
PPI::Token::Word 'strict'
PPI::Token::Structure ';'
PPI::Token::Whitespace '\n'
PPI::Statement::Include
PPI::Token::Word 'use'
PPI::Token::Whitespace ' '
PPI::Token::Word 'warnings'
PPI::Token::Structure ';'
PPI::Token::Whitespace '\n'
PPI::Token::Whitespace '\n'
PPI::Statement::Variable
PPI::Token::Word 'my'
PPI::Token::Whitespace ' '
PPI::Token::Symbol '$x'
PPI::Token::Whitespace ' '
PPI::Token::Operator '='
PPI::Token::Whitespace ' '
PPI::Token::Number '14'
PPI::Token::Structure ';'
PPI::Token::Whitespace '\n'
PPI::Statement
PPI::Token::Word 'format'
PPI::Token::Whitespace ' '
PPI::Token::Word 'STDOUT'
PPI::Token::Whitespace ' '
PPI::Token::Operator '='
PPI::Token::Whitespace '\n'
PPI::Token::Cast '@'
PPI::Token::Operator '<<'
PPI::Token::Operator '<<'
PPI::Token::Operator '<<'
PPI::Token::Operator '<<'
PPI::Token::Operator '<'
PPI::Token::Whitespace '\n'
PPI::Token::Symbol '$x'
PPI::Token::Whitespace '\n'
PPI::Token::Operator '.'
PPI::Token::Whitespace '\n'
PPI::Token::Whitespace '\n'
PPI::Token::Word 'write'
PPI::Token::Whitespace ' '
PPI::Token::Word 'STDOUT'
PPI::Token::Structure ';'
PPI::Token::Whitespace '\n'
PPI::Token::Cast '@'
PPI::Token::Operator '<<'
PPI::Token::Operator '<<'
PPI::Token::Operator '<<'
PPI::Token::Operator '<<'
PPI::Token::Operator '<'
It would appear that PPI isn't recognizing formats either. So that's where to start.