PMD Apex and Salesforce Lighting CLI as global inspections
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)
-
-
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.
-
@RoseSilverSoftware Great idea!
-
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.
-
@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.
-
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.
-
I'd be interested in this blog post Scott Wells
-
reporter I'll try to get it out very early next week.
-
reporter - changed version to 1.7.8.5
-
assigned issue to
-
reporter - changed title to PMD Apex and Salesforce Lighting CLI as global inspections
-
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.
-
reporter - changed status to resolved
Delivered in 1.7.8.5. See release notes for installation/configuration/usage details.
-
Very nice, thanks @RoseSilverSoftware !
-
reporter - changed component to Lightning (Aura)
-
reporter - changed component to Aura
- Log in to comment
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.