Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[apex,vf] Fix #1648 - Remove CodeClimate dependency #1702

Merged
merged 6 commits into from
Mar 6, 2019
Merged

[apex,vf] Fix #1648 - Remove CodeClimate dependency #1702

merged 6 commits into from
Mar 6, 2019

Conversation

rsoesemann
Copy link
Member

No description provided.

@ghost
Copy link

ghost commented Feb 26, 2019

1 Warning
⚠️ Running pmdtester failed, this message is mainly used to remind the maintainers of PMD.

Generated by 🚫 Danger

@rsoesemann rsoesemann requested a review from oowekyala February 26, 2019 16:29
@oowekyala oowekyala changed the title Fix #1648 ([apex,vf] Remove CodeClimate dependency) [apex,vf] Fix #1648 - Remove CodeClimate dependency Feb 27, 2019
Copy link
Member

@oowekyala oowekyala left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution @rsoesemann. Overall I'm happy with the change, I think rule properties should be used only to configure the rule's behaviour, not expose metadata.

So if I sum up my understanding of this changeset:

  • Properties cc_categories, cc_remediation_points_multiplier, cc_block_highlighting can no longer be overridden by a user (since they don't exist anymore, any user overriding them would get a "Property does not exist" error)
    • This should be documented explicitly in the release notes, not just with a link to the issue (in this PR)
    • Deprecations should be ported to master in another PR
  • The CodeClimate renderer now only outputs default values

<ruleset xmlns="http://pmd.sourceforge.net/ruleset/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Default ruleset used by the CodeClimate Engine for Salesforce.com Apex" xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 https://pmd.sourceforge.io/ruleset_2_0_0.xsd">
<description>Default ruleset used by the Code Climate Engine for Salesforce.com Apex</description>
<ruleset xmlns="http://pmd.sourceforge.net/ruleset/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Default ruleset for Salesforce.com Apex" xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 https://pmd.sourceforge.io/ruleset_2_0_0.xsd">
<description>Default ruleset for Salesforce.com Apex</description>
Copy link
Member

Choose a reason for hiding this comment

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

This ruleset should probably be renamed quickstart.xml for consistency with the Java one. Not in this PR though. I'll open an issue to track that.

Copy link
Member Author

Choose a reason for hiding this comment

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

No need for an extra issue. I'll do that in my corrections.

Copy link
Member Author

@rsoesemann rsoesemann Feb 27, 2019

Choose a reason for hiding this comment

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

Regarding your above comments:

  • This PR brings PMD where it was before CodeClimate wise. I never heard that anyone in the Salesforce world uses it so its fair to clean up the mess I made. I have no interest in improving anything Code Climate related. Let that do others...
  • I will add the additional consequences to the release notes doc.
  • Porting to master. Sound right will do it when this is merged. Maybe you can show me some tricks (via Gitter) how to do that ;-)

@rsoesemann
Copy link
Member Author

Comments to your overall comment:

  • This PR just removed stuff from PMD that I fought hard with Andreas in 2016 to get it in. I'm just cleaning my mess. Nobody in the Salesforce world uses Code Climate. So lets get rid of tech debt and waste. I have no interest at all in supporting them more by adding new concepts.

  • I will add a text to the release notes.

  • Can you help me once with merging my stuff to the master. Maybe on Thursday via Gitter chat. Never did it and I guess there are some pitfalls and tricks.

@rsoesemann
Copy link
Member Author

I accidentally "resolved" your comment by renaming the description of the ruleset. I don't want to do it because it is not a quickstart but the default that every starter should use. There are not that many and no controversial rules so its simpler to just say: Bäm thats the default. Use it!

@rsoesemann rsoesemann requested a review from oowekyala February 27, 2019 19:46
@adangel adangel added this to the 7.0.0 milestone Mar 2, 2019
<rule-property name="skipTestMethodUnderscores">true</rule-property>
<expected-problems>0</expected-problems>
Copy link
Member

Choose a reason for hiding this comment

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

I don't understand this change: Why is this necessary, or did we change the rule-test schema?

Copy link
Member Author

Choose a reason for hiding this comment

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

The builds failed here because the order was wrong. I have no clue why this didn’t fail in the past but I fixed it for this pr

Copy link
Member

@adangel adangel Mar 3, 2019

Choose a reason for hiding this comment

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

We seem to run into this problem: junit-team/junit5#987
The tests for MethodNamingConventions are not executed at all on the master branch, due to the XML invalid problem.

Copy link
Member

Choose a reason for hiding this comment

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

@adangel
Copy link
Member

adangel commented Mar 2, 2019

Can you help me once with merging my stuff to the master.

We won't merge from 7.0.0 -> master, but only from master -> 7.0.0.
So, what we need on master is a separate PR that:

  • Deprecates CodeClimateRule (if not already done)
  • Deprecates the rule properties (if not already done)
  • Update the api changes section in the release notes, the these classes/constants are deprecated for removal.

Ideally, we'll do this change on master first before we merge this PR to 7.0.0.

@adangel
Copy link
Member

adangel commented Mar 2, 2019

Btw, it seems like Apex support was only added in November 2018 to code climate (see codeclimate/codeclimate-pmd@5455b68)... for Java, I assume, they just use the default category/remediation points...

I see, your plugin https://docs.codeclimate.com/docs/apexmetrics is deprecated in favor of the more general https://docs.codeclimate.com/v1.0/docs/pmd

@rsoesemann
Copy link
Member Author

Ok as I understand @adangel I will add a second PR for master PR first before this will be merged.

@rsoesemann rsoesemann merged commit 4d90f23 into pmd:pmd/7.0.x Mar 6, 2019
@rsoesemann rsoesemann deleted the remove-codeclimate branch March 6, 2019 21:02
@jsotuyod
Copy link
Member

jsotuyod commented Apr 1, 2019

I see we deprecated CodeClimateRule on master, but we didn't do so with CodeClimateRenderer… we should do so ASAP.

@adangel
Copy link
Member

adangel commented Apr 1, 2019

See also: #1648 (comment)

But true, as soon we are going to remove the code climate specific properties, the category and remediation points will fall back to default....
So, the code climate renderer can still be used, even without having a CodeClimateRule.

@adangel adangel added the dependencies Pull requests that update a dependency file label Jan 12, 2023
@adangel adangel mentioned this pull request Jan 23, 2023
55 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants