Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8356853
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T10:18:18+00:00 2026-06-09T10:18:18+00:00

When defining a PMD ruleset is it possible to exclude a source file from

  • 0

When defining a PMD ruleset is it possible to exclude a source file from a specific rule?

I want to do something like the following:

<rule ref=rulesets/java/logging-java.xml>
  <exclude name="Ignore.java" />
</rule>

Exclude only seems to be supported for rule names. Is there anything similar for source files?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T10:18:19+00:00Added an answer on June 9, 2026 at 10:18 am

    Not without writing a custom rule that adds logic for excluding by file name.

    I think in your scenario the best approach is to run PMD in two passes – one with the larger set of rules against all the code. And one with the smaller set of rules against the code you want extra checks on.

    This does have the downside of generating two reports. But that is an easier problem to solve than the one you posed (or than creating a custom rule.) PMD can generate XML output. You can merge those programmatically and then call PMD’s code to generate an HTML report at the end. Or you can just have two reports and be done right away.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When defining something like a background image URL in a CSS file, when using
While defining the following lambda function // file prog.hpp template<typename T> auto function =
When defining properties I like to do just before property declaration, something like this
When defining rake tasks, it is possible to use namespaces, like this: namespace :demolition
When Defining a constructor in a class I initially had something like: public function
When defining a method on a class in Python, it looks something like this:
Defining my boost::graph like the following, I get edge indices zero for all edges.
I have problem while defining keys in resource file for globalization. i want to
When defining a resources in routes.rb in Rails, I have the following problem: My
After defining the following : abstract class A { type T def print(p: T)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.