Skip to content

Join forces PMD #208

Closed
Closed

Description

@rsoesemann

Just stumbled over your great tool and wondered if it wouldn't make sense to port your rules (or even merge it partially) with PMD. Just recently @aidan-harding contributed code to make Flow rules possible.

What do you think? If contributing your Flow knowledge to #PMD sounds not crazy for you, ping me and I tell you how to do it.

Activity

  1. rsoesemann commented on Oct 1, 2021

    @rsoesemann
    Author

    @RubenHalman I told @aidan-harding to connect with you on this. Let me know when I can help with anything.

  2. changed the title [-]Join forces and contribute Flow rules for PMD[/-] [+]Join forces PMD[/+] on Oct 2, 2021
  3. RubenHalman commented on Oct 2, 2021

    @RubenHalman
    Member

    @aidan-harding

    I'm having some difficulty grasping where you with the language based on the ticket and fork. Not sure if there's anything usable from this repo, but if you can fill me in Ill see where I can help!

  4. transferred this issue fromon Oct 2, 2021
  5. aidan-harding commented on Oct 4, 2021

    @aidan-harding

    Hi @RubenHalman

    Sorry for being fairly unresponsive on this. I've was all-in working on the PMD Flow language for a bit, but I've had other projects take away my time over the past month or so.

    It would be great to get input on the rules when I've got my implementation ready to write some rules.

    The current state in PMD is that 2 things were required to check Flow:

    1. Some language detection changes so that PMD could support different languages with the same file extension. For this, I've made a small change to PMD. My change forces PMD to use the language you provide as a command-line argument instead of trying to match for itself. This was released in PMD and gives us enough for an MVP of Flow checking in PMD. The ideal would be something smarter so that you can point PMD at a directory tree with multiple languages and it could auto-detect across multiple languages. That was too big for me to take on initially, but it's tracked here [xml] Please externalize the mapping of file extensions to languages as preference file  pmd/pmd#461
    2. A new PMD language module for Flow. Although Flow is stored in XML, the XML structure of the files doesn't represent the structure of the Flow directly. I imagine that your tool does the same thing of reading in the XML and building the Flow graph in memory so that you can do analysis on it. Since PMD already has support for easily writing rules against an AST for other languages, my intention is to translate the Flow into an AST. Then we can make use of the existing PMD tool for writing rules.

    Once I get back and finish writing the Flow language module, I'll definitely look through your rules as an initial set of rules of PMD.

  6. RubenHalman commented on Oct 4, 2021

    @RubenHalman
    Member

    @aidan-harding No worries, thank you for your reply. We all know how it goes=)

    These are the same rules as from the standard help documentation.

    I think I can help you help with the implementation of the language module?

  7. rsoesemann commented on Oct 15, 2021

    @rsoesemann
    Author

    Any plan on when you continue your work @aidan-harding ?

  8. transferred this issue fromon Nov 30, 2025
  9. locked and limited conversation to collaborators on Dec 6, 2025
  10. converted this issue into a discussion #267 on Dec 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions