Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Mar 06 13:11
    oowekyala edited #2701
  • Mar 06 12:53
    pmd-test commented #3162
  • Mar 06 12:29
    oowekyala labeled #3162
  • Mar 06 12:29
    oowekyala milestoned #3162
  • Mar 06 12:29
    oowekyala synchronize #3162
  • Mar 06 12:29
    oowekyala opened #3162
  • Mar 06 06:15
    pmd-test commented #3127
  • Mar 06 05:52
    oowekyala synchronize #3127
  • Mar 06 05:08
    oowekyala commented #3119
  • Mar 05 16:56
    pmd-test commented #3161
  • Mar 05 16:42
    hvbtup opened #3161
  • Mar 05 15:39
    pmd-test commented #3127
  • Mar 05 15:15
    oowekyala synchronize #3127
  • Mar 05 14:32

    pmd-bot on gh-pages

    Update documentation https://g… (compare)

  • Mar 05 14:32
    oowekyala synchronize #3127
  • Mar 05 14:14

    oowekyala on 7.0.x

    Test for #3160 Merge branch 'master' into 7.0.x (compare)

  • Mar 05 14:13
    oowekyala closed #3160
  • Mar 05 14:13
    oowekyala labeled #3160
  • Mar 05 14:13

    oowekyala on master

    Test for #3160 (compare)

  • Mar 05 14:08
    oowekyala commented #3160
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
Gunther Schrijvers
@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
Gunther Schrijvers
@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....
Gunther Schrijvers
@GuntherSchrijvers
Ah ok, maybe it is better to start with another issue then
Gunther Schrijvers
@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?
Gunther Schrijvers
@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
Gunther Schrijvers
@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
Prakash Tarun Kumar
@prakashkumar264
CPD-OFF and CPD-ON property does not seem to work on C# code, has some one faced similar issue? Is there a different way to ignore code in C#?
Juan Martín Sotuyo Dodero
@jsotuyod
@prakashkumar264 what version of PMD are you using? Make sure to be using an up-to-date release… Also, I'm a bit confused about you calling them "properties", as they are simple flags in comments… for reference, there is a unit test sample on the codebase: https://github.com/pmd/pmd/blob/master/pmd-cs/src/test/resources/net/sourceforge/pmd/lang/cs/cpd/testdata/specialComments.cs
the test is green, so this is effectively working, just make sure you are using the comments properly
Prakash Tarun Kumar
@prakashkumar264
I am using 6.24.0. I will try updating the version thanks
Gunther Schrijvers
@GuntherSchrijvers
Hello, can I help with issues other then the ones labeled with help-wanted? Or is this not the idea?
Juan Martín Sotuyo Dodero
@jsotuyod
you are most welcome to help with anything you find interesting! The issues labelled help wanted are simply an indication of whether this is something with low priority in our backlog .
Clément Fournier
@oowekyala
There is also the good first issue label to find a starting point
Sayed MohamadAmin Khodaie
@SMAKH
Hi, If I want to cite PMD in an academic paper, how should I do that?
Clément Fournier
@oowekyala
I suggest citing it as you would cite the website https://pmd.github.io/ (eg I would use this format, but ymmv). The author field would be "The PMD Community" I think.
Alexandre Locci Martins
@aloccim_twitter
Hi. I am PhD. student and I am interesting to use PMD code for some experiments. So, I would like to know who is the person responsable by the PMD tests.
Juan Martín Sotuyo Dodero
@jsotuyod
@aloccim_twitter welcomed! I'm not sure what you mean by "responsible", but all code in the project is managed by the PMD maintainers team… what would you need from us?
Alexandre Locci Martins
@aloccim_twitter
@jsotuyod Hi Juan. Thank you for your attention. I intend to perform some experiments involved rigorous code coverage criteria like MCDC. So I want to use the PMD code for that, but I need to know how you, the developers, implement the tests, more specifically, the regression test. Therefore, I would like to know what kind of tools and switch test are used as well as the kind of bug you have found.
Juan Martín Sotuyo Dodero
@jsotuyod
sure! There are 2 kinds of tests. Unit tests (found under src/test/* for each Maven module), and an integration regression test. The unit tests may cover the internals (classic unit tests checking behavior of components) or the rule's performance, by feeding it code snippets to analyze and enforce we avoid false positives / negatives.
the integration regression uses a custom tool (found at https://github.com/pmd/pmd-regression-tester ) which runs the snapshot PMD build against a set of real-life projects (currently a given version of Checkstyle and Spring Framework), and compares the analysis output vs a baseline from the latest stable build. When differences arise, we manually check those (the diff report is pretty consice), and are therefore able to find issues our tests may have missed, and try to add unit tests for those
Juan Martín Sotuyo Dodero
@jsotuyod
ie: here we fixed a FP, and the integration report sees 3 violations removed, and the detailed report shows which violations were so we can assess all these were actually false positives
Alexandre Locci Martins
@aloccim_twitter
@jsotuyod OK perfect. I will download the tool to perform the regression test, I intend to replicate the same conditions that you perform the test. I assume that unit tests are performed according to the maven standard, right? By the way, what is the IDE adopted by project? Thank you, I believe I have enough information to start my work.
Juan Martín Sotuyo Dodero
@jsotuyod
we do not favor one IDE in particular, part of our team uses Eclipse, others use IntelliJ, the wiki shows how to setup either: https://github.com/pmd/pmd/wiki/Setup-IDE
Artem
@KroArtem
Hello there! I know there is a PMD in the press page on PMD site. Just wanted to say that PMD was slightly presented in this very small and superficial talk: https://youtu.be/L42zH5ne074 (approx. since 5:24)
Andreas Dangel
@adangel
@KroArtem Thanks for sharing! I've added it to our page: pmd/pmd@41076fa