GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [core] Explicitly name all language versions by adangel · Pull Request #4387 · pmd/pmd

Conversation

@adangel

@adangel adangel commented Feb 9, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

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:

      pmd/pmd-core/src/main/java/net/sourceforge/pmd/lang/document/FileCollector.java

      Lines 233 to 236 in de9d395

      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

  • Fixes [core] Explicitly name all language versions #4120

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)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@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
[core] Explicitly name all language versions #4120
Closed
@ghost

ghost commented Feb 9, 2023 •
edited by ghost
Loading

Uh oh!

There was an error while loading. Please reload this page.

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@adangel
adangel marked this pull request as ready for review February 9, 2023 17:27
@adangel adangel mentioned this pull request Feb 10, 2023
[core] Language lifecycle #4060
Merged
8 tasks done
@adangel

This comment was marked as resolved.

Sign in to view
@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 reviewed Feb 10, 2023
View reviewed changes

@oowekyala oowekyala left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Thanks for starting this!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/ApexLanguageModule.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread pmd-apex/src/main/java/net/sourceforge/pmd/cpd/ApexLanguage.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

This was referenced Feb 10, 2023
PMD 7 Tracking Issue #3898
Closed
[core] Refactor CPD #4397
Merged
adangel added 8 commits February 17, 2023 08:44
@adangel
[core] Require explicit language versions (pmd#4120)
6c95689
@adangel
Add explicit language versions (pmd#4120)
d7d2ad5
@adangel
Reuse names and extensions for CPD language
e2bb0c8
@adangel
[doc] Update release notes regarding ecmascript version
ee3f08a
@adangel
[doc] Update release notes (pmd#4120) [skip ci]
8aaef01
@adangel
Refactor LanguageMetdata::extensions usages
a283615
@adangel
[core] Don't allow languages without versions
56dbdd1
@adangel
[doc] Update language versions doc
eebe908
@adangel
adangel force-pushed the pmd7-language-versions branch from ef2d6df to eebe908 Compare February 17, 2023 08:46
@adangel
[vf] Refactor dependency to apex language module
be6a46c
@adangel
adangel marked this pull request as ready for review February 17, 2023 10:43
oowekyala added 3 commits February 26, 2023 15:07
@oowekyala
Merge branch '7.0.x' into pr/4387
95b7ca3
@oowekyala
Rewrite binaryDistributionIt to be easier to maintain
50577f2
@oowekyala
Revert version change
71dbeb2
@oowekyala oowekyala self-assigned this Feb 26, 2023
oowekyala added 2 commits February 26, 2023 16:17
@oowekyala
Merge branch '7.0.x' into pr/4387
65725c1
@oowekyala
Fix merge
bf2c699
@oowekyala oowekyala added the an:enhancement An improvement on existing features / rules label Feb 26, 2023
oowekyala
oowekyala approved these changes Feb 26, 2023
View reviewed changes

@oowekyala oowekyala left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Thanks!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@oowekyala
oowekyala merged commit f2f8357 into pmd:pmd/7.0.x Feb 26, 2023
@jsotuyod jsotuyod mentioned this pull request Feb 27, 2023
[doc] Update release notes for PMD 7.0.0-rc1 #4373
Merged
8 tasks done
@adangel
adangel deleted the pmd7-language-versions branch February 28, 2023 18:38
@adangel adangel mentioned this pull request Mar 2, 2023
[core] Explicitly name all language versions #4120
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@oowekyala oowekyala oowekyala approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@oowekyala oowekyala

Labels

an:enhancement An improvement on existing features / rules

Projects

None yet

Milestone

7.0.0

Development

Successfully merging this pull request may close these issues.

[core] Explicitly name all language versions

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@adangel @oowekyala
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.