Skip to content

[core] Explicitly name all language versions#4387

Merged
oowekyala merged 14 commits into
pmd:pmd/7.0.xfrom
adangel:pmd7-language-versions
Feb 26, 2023
Merged

[core] Explicitly name all language versions#4387
oowekyala merged 14 commits into
pmd:pmd/7.0.xfrom
adangel:pmd7-language-versions

Conversation

@adangel

@adangel adangel commented Feb 9, 2023

Copy link
Copy Markdown
Member

Describe the PR

  • Add the versions. Always select the latest version as "default".
  • Make the version name be required - empty version names are not allowed anymore
  • Make sure for each PMD language, that the names are reused for the CPD language (e.g. Ecmascript / JavaScript)
  • Make sure for each PMD language, that the same extensions are used for CPD language
  • ❌ Change extension for pom to xml (refs [pom] Maven POM Rules don't check files named "pom.xml" #1540) - won't do with this PR
    • we probably have anyway some extension clashes, at least for CPD (cpp vs. objectivec)
    • it turns out, that correctly detect, that "pom.xml" has two languages associated,
      but we just use the first language:
      Language lang = languages.get(0);
      if (languages.size() > 1) {
      LOG.trace("File {} matches multiple languages ({}), selecting {}", file, languages, lang);
      }
    • this results in identifying any xml file now as language "pom" - and we don't execute the XML rules anymore against this file...
  • Update release notes (esp. ecmascript versions)

Related issues

Ready?

  • Added unit tests for fixed bug/feature
  • Passing all unit tests
  • Complete build ./mvnw clean verify passes (checked automatically by github actions)
  • Added (in-code) documentation (if needed)

@adangel adangel added this to the 7.0.0 milestone Feb 9, 2023
@adangel adangel marked this pull request as draft February 9, 2023 15:35
@adangel adangel changed the title Pmd7 language versions [core] Explicitly name all language versions Feb 9, 2023
@adangel adangel linked an issue Feb 9, 2023 that may be closed by this pull request
@ghost

ghost commented Feb 9, 2023

Copy link
Copy Markdown
2 Messages
📖 Compared to pmd/7.0.x:
This changeset changes 9 violations,
introduces 1 new violations, 0 new errors and 0 new configuration errors,
removes 1 violations, 0 errors and 0 configuration errors.
Full report
📖 Compared to master:
This changeset changes 50620 violations,
introduces 34690 new violations, 12 new errors and 0 new configuration errors,
removes 142020 violations, 4 errors and 7 configuration errors.
Full report
Compared to pmd/7.0.x:
This changeset changes 7 violations,
introduces 1 new violations, 0 new errors and 0 new configuration errors,
removes 1 violations, 0 errors and 0 configuration errors.
Full report
Compared to master:
This changeset changes 50620 violations,
introduces 34690 new violations, 12 new errors and 0 new configuration errors,
removes 142020 violations, 4 errors and 7 configuration errors.
Full report
Compared to pmd/7.0.x:
This changeset changes 9 violations,
introduces 2 new violations, 0 new errors and 0 new configuration errors,
removes 2 violations, 0 errors and 0 configuration errors.
Full report
Compared to master:
This changeset changes 50624 violations,
introduces 34682 new violations, 12 new errors and 0 new configuration errors,
removes 142045 violations, 4 errors and 7 configuration errors.
Full report
Compared to pmd/7.0.x:
This changeset changes 5 violations,
introduces 0 new violations, 0 new errors and 0 new configuration errors,
removes 0 violations, 0 errors and 0 configuration errors.
Full report
Compared to master:
This changeset changes 50624 violations,
introduces 34682 new violations, 12 new errors and 0 new configuration errors,
removes 142045 violations, 4 errors and 7 configuration errors.
Full report
Compared to pmd/7.0.x:
This changeset changes 10 violations,
introduces 1 new violations, 0 new errors and 0 new configuration errors,
removes 1 violations, 0 errors and 0 configuration errors.
Full report
Compared to master:
This changeset changes 50624 violations,
introduces 34682 new violations, 12 new errors and 0 new configuration errors,
removes 142045 violations, 4 errors and 7 configuration errors.
Full report
Compared to pmd/7.0.x:
This changeset changes 7 violations,
introduces 1 new violations, 0 new errors and 0 new configuration errors,
removes 1 violations, 0 errors and 0 configuration errors.
Full report
Compared to master:
This changeset changes 50624 violations,
introduces 34682 new violations, 12 new errors and 0 new configuration errors,
removes 142045 violations, 4 errors and 7 configuration errors.
Full report
Compared to pmd/7.0.x:
This changeset changes 13 violations,
introduces 1 new violations, 0 new errors and 0 new configuration errors,
removes 1 violations, 0 errors and 0 configuration errors.
Full report
Compared to master:
This changeset changes 50624 violations,
introduces 34682 new violations, 12 new errors and 0 new configuration errors,
removes 142045 violations, 4 errors and 7 configuration errors.
Full report

Generated by 🚫 Danger

@adangel adangel marked this pull request as ready for review February 9, 2023 17:27
@adangel adangel mentioned this pull request Feb 10, 2023
8 tasks
@adangel

This comment was marked as resolved.

@adangel adangel marked this pull request as draft February 10, 2023 10:55
@adangel adangel force-pushed the pmd7-language-versions branch from 5aeee8b to ef2d6df Compare February 10, 2023 12:01

@oowekyala oowekyala left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for starting this!

Comment thread pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/ApexLanguageModule.java Outdated
Comment thread pmd-apex/src/main/java/net/sourceforge/pmd/cpd/ApexLanguage.java Outdated
This was referenced Feb 10, 2023
@adangel adangel force-pushed the pmd7-language-versions branch from ef2d6df to eebe908 Compare February 17, 2023 08:46
@adangel adangel marked this pull request as ready for review February 17, 2023 10:43
@oowekyala oowekyala self-assigned this Feb 26, 2023
@oowekyala oowekyala added the an:enhancement An improvement on existing features / rules label Feb 26, 2023

@oowekyala oowekyala left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@oowekyala oowekyala merged commit f2f8357 into pmd:pmd/7.0.x Feb 26, 2023
@adangel adangel deleted the pmd7-language-versions branch February 28, 2023 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

an:enhancement An improvement on existing features / rules

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[core] Explicitly name all language versions

2 participants