Skip to content
This repository has been archived by the owner on Mar 8, 2020. It is now read-only.

unmapped comments in semantic mode #34

Open
3 tasks
bzz opened this issue Mar 21, 2019 · 1 comment
Open
3 tasks

unmapped comments in semantic mode #34

bzz opened this issue Mar 21, 2019 · 1 comment
Labels
Milestone

Comments

@bzz
Copy link
Contributor

bzz commented Mar 21, 2019

Discovered as part of the bblfsh/bblfshd#268 (comment)

Driver fails to parse ~200 files due to un-mapped comment

  • 3 Param: comments
  • 32 Scalar_String: attributes
  • 175 Stmt_Use: comments

Normalization mapping for semantic mode needs to be updated, more details with file paths are in #34 (comment)

@bzz bzz added the bug label Mar 21, 2019
@bzz bzz added this to the v2.7.2 milestone Mar 21, 2019
@bzz bzz changed the title unmapped node in semantic mode Expr_Include > comments unmapped comments in semantic mode Apr 5, 2019
@bzz
Copy link
Contributor Author

bzz commented Apr 5, 2019

To avoid confusion, similar to #35 (comment) going to publish all the cases of unmapped comment handling here

$ grep "language=php$" bblfshd.log | \
  grep -oP "rpc error: code = \K(.*)" | \
  grep -oP " on node \K([^\"].*)" | \
  cut -d "\"" -f 1 | sort | uniq -c

      3 Param: comments
     32 Scalar_String: attributes
    175 Stmt_Use: comments

There seems to be 3 main cases, list of file for each one is attached in details.

unused field(s) on node Expr_Include: comments

$ grep "language=php$" bblfshd.log | grep -oP "rpc error: code = \K(.*)" | grep "Param: comments" | grep -oP "filename=\"\K([^\"]*)"

drupal/sites/all/libraries/phpmailer/class.phpmailer.php
libraries/vendor/phpmailer/phpmailer/class.phpmailer.php
modules/custom/db_email_results/src/Controller/class.phpmailer.php

unused field(s) on node Param: comments

$ grep "language=php$" bblfshd.log | grep -oP "rpc error: code = \K(.*)" | grep "Scalar_String: attributes" | grep -oP "filename=\"\K([^\"]*)"

vendor/psy/psysh/src/Psy/Command/ClearCommand.php
vendor/psy/psysh/src/Psy/Command/ExitCommand.php
vendor/symfony/process/Tests/PhpProcessTest.php
vendor/psy/psysh/test/Psy/Test/Formatter/CodeFormatterTest.php
vendor/symfony/var-dumper/Tests/Caster/PdoCasterTest.php
vendor/psy/psysh/src/Psy/Command/ThrowUpCommand.php
vendor/psy/psysh/src/Psy/Command/BufferCommand.php
vendor/symfony/console/Command/HelpCommand.php
vendor/nikic/php-parser/test/PhpParser/NodeDumperTest.php
vendor/symfony/console/Command/ListCommand.php
vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Methods/FunctionCallSignatureUnitTest.inc
vendor/psy/psysh/src/Psy/Util/Str.php
vendor/psy/psysh/src/Psy/Command/DumpCommand.php
vendor/symfony/config/Tests/Definition/Dumper/XmlReferenceDumperTest.php
vendor/nikic/php-parser/test/PhpParser/BuilderFactoryTest.php
vendor/symfony/config/Tests/Definition/Dumper/YamlReferenceDumperTest.php
vendor/psy/psysh/src/Psy/Command/WtfCommand.php
vendor/psy/psysh/src/Psy/Command/SudoCommand.php
vendor/psy/psysh/src/Psy/Command/WhereamiCommand.php
vendor/nikic/php-parser/test/PhpParser/Builder/ClassTest.php
vendor/psy/psysh/src/Psy/Compiler.php
vendor/psy/psysh/src/Psy/Command/ParseCommand.php
vendor/psy/psysh/src/Psy/Command/TraceCommand.php
vendor/symfony/config/Tests/Resource/ReflectionClassResourceTest.php
vendor/nikic/php-parser/test/PhpParser/ParserTest.php
vendor/psy/psysh/src/Psy/Command/HistoryCommand.php
vendor/psy/psysh/src/Psy/Command/ListCommand.php
vendor/cakephp/cakephp/src/Core/StaticConfigTrait.php
vendor/cakephp/plugin-installer/src/Installer/PluginInstaller.php
vendor/symfony/var-dumper/Dumper/HtmlDumper.php
lib/tests/output_external_test.php
lib/tests/output_external_test.php

unused field(s) on node Stmt_Use: comments

grep "language=php$" bblfshd.log | grep -oP "rpc error: code = \K(.*)" | grep "Stmt_Use: comments" | grep -oP "filename=\"\K([^\"]*)" | head

vendor/symfony/var-dumper/Resources/functions/dump.php
vendor/cakephp/cakephp/src/Utility/bootstrap.php
vendor/cakephp/cakephp/config/bootstrap.php
vendor/cakephp/cakephp/tests/test_app/TestApp/Template/Error/error500.ctp
vendor/cakephp/cakephp/tests/test_app/TestApp/Template/Error/error400.ctp
vendor/twig/twig/lib/Twig/ContainerRuntimeLoader.php
vendor/cakephp/cakephp/src/Collection/functions.php
vendor/cakephp/cakephp/tests/test_app/config/routes.php
vendor/symfony/polyfill-php72/bootstrap.php
vendor/cakephp/cakephp/src/Template/Element/plugin_class_error.ctp

Again, one might need to try multiple files from github, as we do not have the repository names.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant