Git Product home page Git Product logo

Comments (10)

yegor256 avatar yegor256 commented on June 20, 2024 1

@pnatashap may you can take a look?

from qulice.

yegor256 avatar yegor256 commented on June 20, 2024 1

@c71n93 eo project uses jcabi-parent (as a parent POM), where this is set: https://github.com/jcabi/jcabi-parent/blob/master/pom.xml#L96-L97

from qulice.

pnatashap avatar pnatashap commented on June 20, 2024 1

@c71n93 please check PR #1273 on your project

from qulice.

github-actions avatar github-actions commented on June 20, 2024

@c71n93 thanks for the report, here is a feedback:

Problems

  • Lack of Clear Steps to Reproduce: The bug report fails to provide a clear, step-by-step process for recreating the error. Despite including links to the PR and workflow where the error surfaced, a comprehensive bug report should contain the exact steps leading to the error occurrence. This would aid developers in understanding what actions triggered the error.
  • Ambiguity in Error Description: The given error description is vague. It mentions that "PMD fails to analyze Java source with variables or methods named with unicode characters," but does not specifically identify which unicode characters cause the error. Such ambiguity may create confusion for developers attempting to replicate and rectify the bug.
  • No Clear Indication of the Expected Outcome: While the bug report outlines the error, it doesn't explicitly state the desired outcome. Defining the expected result is crucial as it helps developers comprehend the software's correct behavior in the given scenario.

I would recommend including clear, step-by-step instructions to reproduce the error in the bug report.

Please fix the bug report in order it to get resolved faster.
Analyzed with gpt-4

from qulice.

c71n93 avatar c71n93 commented on June 20, 2024

@yegor256 As expected this problem occured in this project too: in this PR (#1268), in windows workflow (https://github.com/yegor256/qulice/actions/runs/9003058334/job/24732811660?pr=1268).

from qulice.

pnatashap avatar pnatashap commented on June 20, 2024

What is strange, the error is the same "Lexical error at line 61, column 22. Encountered: "\u2020" (8224), after : "" (in lexical state 0)
2024-05-06T18:35:20.8373051Z at net.sourceforge.pmd.lang.java.ast.JavaParserTokenManager.getNextToken(JavaParserTokenManager.java:2534)" and φ is not a '\u2020' symbol (and is not considered as a good symbol in PMD, that's why we have a error). Looks like something is wrong with encoding, will check on windows env

from qulice.

pnatashap avatar pnatashap commented on June 20, 2024

@c71n93 the reason is in PMD, they use system property file.encoding to get default encoding, on Windows env it have Cp1251 (Check https://github.com/pmd/pmd/blob/master/pmd-core/src/main/java/net/sourceforge/pmd/AbstractConfiguration.java#L38 it is still the same in current version). So you need to set it up at least for now. Example - pnatashap#9

@yegor256 There two variants to fix: 1. Keep code as is, because it can be fixed using system variables 2. add a parameter to set up encoding explicitly (also MVN parameter project.build.sourceEncoding can be used)

from qulice.

yegor256 avatar yegor256 commented on June 20, 2024

@pnatashap I believe, sourceEncoding is set correctly in the pom.xml where the problem was reported. @c71n93 am I right?

from qulice.

c71n93 avatar c71n93 commented on June 20, 2024

@yegor256 as far as I understand, no, sourceEncoding is not set in the pom.xml anywhere in eo.

from qulice.

pnatashap avatar pnatashap commented on June 20, 2024

@yegor256 @c71n93 sourceEncoding doesn't help for now, only env variables will help.
It is possible to set up encoding explicitly for PMD via context using this method (and get this data from sourceEncoding) https://github.com/pmd/pmd/blob/ef3455348603aa25f86894b9930f05f141f44d20/pmd-core/src/main/java/net/sourceforge/pmd/AbstractConfiguration.java#L41-L43

For now workaround is to set up

JAVA_OPTS: "%JAVA_OPTS% -Dfile.encoding=UTF-8"

from qulice.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.