Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 17:25
    oowekyala commented #2923
  • 17:20
    Fernal73 commented #2923
  • 17:10
    Fernal73 commented #2923
  • 17:10
    Fernal73 commented #2923
  • 17:07
    Fernal73 commented #2923
  • 17:03
    Fernal73 commented #2923
  • 16:59
    oowekyala commented #2923
  • 16:57
    oowekyala commented #2923
  • 16:52
    Fernal73 edited #2923
  • 16:49
    Fernal73 commented #2923
  • 16:42
    oowekyala commented #2923
  • 15:53
    Fernal73 closed #2922
  • 15:53
    Fernal73 commented #2922
  • 15:52
    adangel edited #2523
  • 15:49
    adangel edited #2817
  • 15:49
    adangel edited #2817
  • 15:46
    adangel edited #2815
  • 15:41
    adangel commented #2896
  • 15:31
    adangel commented #2943
  • 15:31
    adangel commented #2943
Andreas Dangel
@adangel
:+1:
Test User1
@tuser1_gitlab
Just wanted to check if https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-6814 impacts PMD as groovy 2.4.7 is in use.
Juan Martín Sotuyo Dodero
@jsotuyod
@tuser1_gitlab no, PMD makes no use of serialization. Groovy is only in use to parse Groovy files, and may not even be in classpath if unneeded (ie: not analyzing groovy files)
Test User1
@tuser1_gitlab
Thanks @jsotuyod for the confirmation.
Sudharshan
@Suddukaluvai_twitter
Hi I am new to PMD, I want to add lint rules for kotlin
will pmd supports kotlin ? if yes how can i add rules for it?
Juan Martín Sotuyo Dodero
@jsotuyod
PMD already supports Kotlin, but ships no rules at the moment
adding rule support should be very straightforward
and you are off to write rules
PRs are always welcomed
Sudharshan
@Suddukaluvai_twitter
Thanks for the quick response
is there any existing PR's in pipeline for certain rules to avoid duplicate PR's
Juan Martín Sotuyo Dodero
@jsotuyod
AFAIK no one is currently working on rules for Kotlin
Sudharshan
@Suddukaluvai_twitter
ok thanks
Juan Martín Sotuyo Dodero
@jsotuyod
bare in mind, most complete Antlr4 support (Kotlin is an Antlr 4 Gramma) is in PMD 7 branch
I'd suggest you contribute to that branch
Sudharshan
@Suddukaluvai_twitter
Sure
Juan Martín Sotuyo Dodero
@jsotuyod
for reference, you can check the pmd-swift module, that also uses an Antlr4 Grammar… it was one of the modules used as Proof of Concept for the Antlr4 support
Sudharshan
@Suddukaluvai_twitter
ok
Prakash Tarun Kumar
@prakashkumar264
Hi, I am using CPD tool to find duplicate code in C# projects. I want to exclude all the .Designer.cs files in entire project. is there a way to do that? like --exclude "*.Designer.cs"?
Prakash Tarun Kumar
@prakashkumar264
I have lots of subdirectories and want to ignore Designer files in every one of them. One way is to create a text file with all subdirectories and pass it to --exclude, but i am looking to do this in cmd
Andreas Dangel
@adangel
according to the doc at https://pmd.github.io/latest/pmd_userdocs_cpd.html#cli-options-reference there is no direct way to do this. wildcards are not supported at the command line.
Prakash Tarun Kumar
@prakashkumar264
so is there a way to ignore some pieces of code in cpd?
Andreas Dangel
@adangel
Hi @prakashkumar264 , I've written up the different solutions here: https://github.com/adangel/scratchpad/tree/master/cpd-file-exclusions
CPD itself doesn't support exclusion patterns, but you can create a filelist file with some shell scripting or use ant or use maven to achieve what you want.
Artem
@KroArtem
Hi there! It seems I've got a stupid question. Let's say I've got pmd-designer and pmd repos cloned. I want to launch designer and finally try to do some stuff there. Should I start ./run.sh designer from pmd repo or should I try to run ./mvnw -Prunning,with-javafx exec:java from pmd-designer repo? In both cases I get a
Error: Could not find or load main class net.sourceforge.pmd.util.fxdesigner.DesignerStarter
Caused by: java.lang.ClassNotFoundException: net.sourceforge.pmd.util.fxdesigner.DesignerStarter
ok, first you complain about something; Then it starts to work :) I didn't manage to run .run.sh from pmd repo but managed to launch designer from pmd-designer repo. In both cases export JAVAFX_HOME=/path/to-javafx was set
Andreas Dangel
@adangel
see also https://github.com/pmd/pmd/wiki/Setup-IDE - there are some sections to run the designer from the IDE
Artem
@KroArtem
Thanks! I'm ok with running it from terminal, it's already much easier to understand hierarchy when it's visualized
Andreas Dangel
@adangel
Yes, seeing the AST is precious. You might be interested in this doc: https://pmd.github.io/latest/pmd_userdocs_extending_designer_reference.html if you don't know it already
cyberjj999
@cyberjj999
hello, i have a quick qns
for the Java files that i am running PMD on, it seems like the output report file will get extremely huge (its been writing til 70mb and still continuing), may I know if there is a way i can "cap" it at a particular size?
i.e. i will only write to the report file until i.e. 50mb before i stop
cyberjj999
@cyberjj999
anyone?
Andreas Dangel
@adangel
fyi - question moved to pmd/pmd#2898
GuntherSchrijvers
@GuntherSchrijvers
Hello, I would like to start contributing to the project by fixing the following bug: pmd/pmd#659
How do I go about this? Just make a fork, fix it and then submit a pull request?
Or is there anything else that I need to do?
Andreas Dangel
@adangel
Hi @GuntherSchrijvers , welcome! Yes, that's basically the way to go: fork, fix, pull request. There are a couple of documents to setup your dev environment, e.g. https://github.com/pmd/pmd/wiki/Newcomers%27-Guide , https://github.com/pmd/pmd/wiki/Setup-IDE and https://github.com/pmd/pmd/blob/master/CONTRIBUTING.md
GuntherSchrijvers
@GuntherSchrijvers
Thank you :) I will start following those :)
Andreas Dangel
@adangel
Note, that @oowekyala tagged this issue for pmd 7, because it's probably much easier to fix there than in pmd 6....
GuntherSchrijvers
@GuntherSchrijvers
Ah ok, maybe it is better to start with another issue then
GuntherSchrijvers
@GuntherSchrijvers
I was looking at pmd/pmd#2882, but when I try to reproduce it locally I get the warning:
nov. 12, 2020 10:47:23 A.M. net.sourceforge.pmd.PMD encourageToUseIncrementalAnalysis
WARNING: This analysis could be faster, please consider using Incremental Analysis: https://pmd.github.io/latest/pmd_userdocs_incremental_analysis.html
C:\temp\ViolatesUseTryWithResources.java:8:     Consider using a try-with-resources statement instead of explicitly closing the resource
Is there something that I'm missing, or is this issue already fixed?
GuntherSchrijvers
@GuntherSchrijvers
Is it possible that there is an issue with the CI build on Ubuntu?
It takes very, very long (~1 hour)
the other two steps (Windows and Mac OSX) complete in ~15 mins
Andreas Dangel
@adangel
yes, I'm working on it
GuntherSchrijvers
@GuntherSchrijvers
ah :) no problem :)
so far I could see there is an issue downloading dependencies from maven central which goes very slowly after a while.
Clément Fournier
@oowekyala
I targeted this for pmd 7 because of pmd/pmd#2894, and I know it will be fixed at this point. If you want to fix it on master, I would say go ahead, it's even better