A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pmd/pmd/issues/1559 below:

Lexical error in file (no file name provided) · Issue #1559 · pmd/pmd · GitHub

Affects PMD Version: 6.10.0

Rule: CPD

Description:

Running CPD on the given file (run.sh cpd --minimum-tokens 100 --language cpp --files File.cpp) produces the following error:
net.sourceforge.pmd.lang.ast.TokenMgrError: Lexical error in file (no file name provided) at line 7, column 37.
The parse error is unfortunate, but what is more surprising is that the error message says "no file name provided", even though I have provided the filename. When running the same command with PMD 6.9.0, the error message does contain the correct filename:
net.sourceforge.pmd.lang.ast.TokenMgrError: Lexical error in file /tmp/project/File.cpp at line 7, column 37. Encountered: "\n" (10), after : ""QML("

Code Sample demonstrating the issue:

namespace ABC
{
  namespace DEF
  {

#ifdef USE_QT
    const char* perPixelQml = R"QML(
)QML";
  }
}
#endif // USE_QT

Running PMD through: CLI


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4