Menu

#1536 [core] PMD language filter not applied if file specified explicitely

New Tickets
duplicate
nobody
None
PMD
3-Major
Bug
2023-01-13
2016-10-30
No

See [#1531]:

[fjalvingh] Another but related issue is related to the language filter that is used to "filter" files in directories that should be scanned. This filter list is constructed from the rules selected. The filter is however not applied to the FILES that are added on the command line..

[adangel] Regarding the second issue: Are you taking about CPD or PMD? At least for CPD, this is correct behavior, as it is assumed that you know what you do, if you explicitely name the files on the command line :) See also https://github.com/adangel/pmd/pull/30 . For PMD, I would expect the same behavior...

[fjalvingh] So, the issue is with PMD. And I think it is easy to prove that the behavior is wrong. If I start PMD with a rule set that does not contain any PLSQL rules, then parsing of these files is useless because the only result they can possibly give is parsing errors - no rule violations. So even if I do pass them on the command line - the result is just a longer run time (and a loop if you're unlucky ;)
Hope I explained it well.. By itself this issue is not a real problem; it's just inconsistent in my opinion.

Related

Issues: #1531

Discussion

  • Andreas Dangel

    Andreas Dangel - 2023-01-13
    • status: open --> duplicate
     
  • Andreas Dangel

    Andreas Dangel - 2023-01-13
     

Log in to post a comment.