You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description:
I tried using cpd on Windows 10 in a medium large code base, but got a (wrong?) Lexical error immediately. I think MATLAB's weird sometimes-escape-character \ isn't handled properly:
net.sourceforge.pmd.lang.ast.TokenMgrError: Lexical error in file Untitled.m at line 3, column 56. Encountered: "$" (36), after : ""
at net.sourceforge.pmd.lang.matlab.ast.MatlabParserTokenManager.getNextToken(MatlabParserTokenManager.java:1996)
at net.sourceforge.pmd.lang.matlab.MatlabTokenManager.getNextToken(MatlabTokenManager.java:31)
at net.sourceforge.pmd.cpd.token.internal.BaseTokenFilter.getNextToken(BaseTokenFilter.java:30)
at net.sourceforge.pmd.cpd.internal.JavaCCTokenizer.tokenize(JavaCCTokenizer.java:40)
at net.sourceforge.pmd.cpd.CPD.addAndThrowLexicalError(CPD.java:144)
at net.sourceforge.pmd.cpd.CPD.add(CPD.java:139)
at net.sourceforge.pmd.cpd.CPD.add(CPD.java:108)
at net.sourceforge.pmd.cpd.CPD.add(CPD.java:70)
at net.sourceforge.pmd.cpd.CPD.addDirectory(CPD.java:80)
at net.sourceforge.pmd.cpd.CPD.addRecursively(CPD.java:65)
at net.sourceforge.pmd.cpd.CPDCommandLineInterface.addSourcesFilesToCPD(CPDCommandLineInterface.java:134)
at net.sourceforge.pmd.cpd.CPDCommandLineInterface.addSourceFilesToCPD(CPDCommandLineInterface.java:114)
at net.sourceforge.pmd.cpd.CPDCommandLineInterface.main(CPDCommandLineInterface.java:87)
at net.sourceforge.pmd.cpd.CPD.main(CPD.java:179)
--ignore-literals doesn't help as a work-around either...
Description:
I tried using cpd on Windows 10 in a medium large code base, but got a (wrong?) Lexical error immediately. I think MATLAB's weird sometimes-escape-character
\
isn't handled properly:--ignore-literals
doesn't help as a work-around either...Code Sample demonstrating the issue:
or
The text was updated successfully, but these errors were encountered: