Comments (10)
@pnatashap may you can take a look?
from qulice.
@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.
@c71n93 please check PR #1273 on your project
from qulice.
@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.
@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.
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.
@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.
@pnatashap I believe, sourceEncoding
is set correctly in the pom.xml
where the problem was reported. @c71n93 am I right?
from qulice.
@yegor256 as far as I understand, no, sourceEncoding
is not set in the pom.xml
anywhere in eo.
from qulice.
@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)
- IllegalArgumentException leads to execution failure HOT 7
- Java 17 record type not supported HOT 6
- JUnit test class must be final HOT 1
- method parameter must not hide field of the class HOT 1
- this qualifier must be required even inside lambda HOT 1
- How to Choose Google checks instead of Sun Checks (Checkstyle)? HOT 1
- BranchContains.java:44: Avoid branchContains usages in...
- EqualsTree.java:46: Avoid equalsTree usages in checks and... HOT 1
- PmdListener.java:88-89: If was added to avoid failing...
- PmdValidatorTest.java:130-131: Replace not+empty() with...
- Rebuild GitHub Pages HOT 4
- PMD.AvoidAccessToStaticMembersViaThis check works incorrectly HOT 4
- `java.lang.NullPointerException` at `com.qulice.checkstyle.DiamondOperatorCheck.isDiamondOperatorUsed` HOT 3
- check failed: java.util.concurrent.ExecutionException: java.lang.IllegalStateException: Failed to process files for 0.22.1 HOT 1
- add a rule to check that affirm is used for Assertion HOT 9
- diamond operator check gives false positive HOT 3
- PMD UseUnderscoresInNumericLiterals rule gives false positives on non-divisible number into even 3 digit parts HOT 3
- prohibit private constructors if they are not used in the class HOT 2
- ignore binary files automatically HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qulice.