PMD Apex and Salesforce Lighting CLI as global inspections

Issue #418 resolved
Scott Wells repo owner created an issue

Add an external annotator that displays the results of this:

https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/cli_rules.htm

directly in the editor.

Comments (15)

  1. Scott Covert

    Thanks @RoseSilverSoftware - that would be awesome. In the meantime I installed the 'File Watchers' plugin to IntelliJ and set it up to run the Salesforce Lightning CLI tool anytime a component or javascript file is edited in my project-so far it's working pretty well! If any others are interested here is a screenshot showing my setup; I also have a second watcher where the file type is set to Javascript Files.

    Screen Shot 2016-12-16 at 3.34.31 PM.png

  2. Scott Wells reporter

    That's very cool, Scott! Thanks for sharing the details. That might also be a nice way to integrate PMD Apex until I add a first-class integration.

  3. Scott Wells reporter

    @scottbcovert, what did you use for output filters? Because the output of lightning:lint is multi-line and potentially has multiple issues reported per-file (and therefore multiple line numbers per-file), the best I can do is hyperlink to the file but not the line/column. Have you managed to set up something better than that? I'd like to document various ways to integrate PMD Apex and Salesforce Lightning CLI in advance of first-class integration for those who are interested.

  4. Scott Covert

    @RoseSilverSoftware I actually didn't set up any output filters; yes, you're right about the multi-line nature of the linter's output 😦 As of yet I haven't set anything more advanced up b/c given the size of my project the current setup meets my needs; if I do end up making any additions I will post them here. One thing I was planning on doing was adding a file watcher to run the PMD Apex tool as you've mentioned. I have the codeclimate CLI installed on my machine with the ApexMetrics engine enabled so I believe it could be valuable to have a file watcher run that periodically and print the output to a .html in my project workspace.

  5. Scott Wells reporter

    Gotcha. I think I'm going to post a blog entry sometime this week documenting how to integrate PMD Apex and Lightning CLI as external tools with hyperlinking to original source. That will allow users to get benefit from these tools in a reasonably integrated way until I add first-class integrations.

  6. Scott Wells reporter

    I've implemented both PMD Apex and Lightning Lint as first-class global inspection tools. I'll be releasing these in the next day or two.

  7. Log in to comment