-
Notifications
You must be signed in to change notification settings - Fork 106
Support for mapping custom TSLint rules to dedicated Sonar rules #31
Conversation
- loading core rules from property file - added missing rules to tests - added test for unexpected rules in plugin
added configuration property to define custom TSLint rules for sonar analysis
- added documentation for the 'sonar.ts.tslint.customrules' property - added a test for disabled TSLint rules in the configuration
Sorry I've not had time to review and merge this yet, working on finding some! |
Took a day off work, so finally have time to look at this! Sorry for delay:
I think there're pretty good functional wins though, loading in new rules via configuration rather than needing a plugin update seems like a pretty solid victory! |
Thanks for the Review, I agree on those points. |
# Conflicts: # src/main/java/com/pablissimo/sonar/TsLintSensor.java # src/test/java/com/pablissimo/sonar/TsLintSensorTest.java
Hi @Pablissimo I have started work on the discussed changes to the PR and saw that there is another PR #37 that has some changes that would need to be reworked to be compatible with this one. Just let me know how you think we should handle it. Regards |
I agree - I'd take your changes to master first then I can rework @NikitaEgorov's changes since they're pretty much incompatible with the change to how we'll then be storing rules. To be honest, it shouldn't be a big job. Means I can't merge their Nikita's changes as a PR directly but I can use the work that went into getting the right tech debt values! |
I'm currently looking into making the transition to support multiple rule configuration collections. This is what I have currently ... instead of a single text config parameter in the plugin settings, we can now specify multiple configurations. That way it should be easier to manage multiple TsLint-Sonar-Rules configurations for multiple corresponding TsLint rules packages ... For demonstration I added three separate configurations there which would logically map to separate TsLint rule packages (they will just be globally concatenated in Sonar, the separation is just for the user's convenience) The rules will then be available in the TsLint profile... PS:
I'm currently trying to avoid using any ambient config files ... because I assume this will cause big trouble if the server and scanner are running on different machines, because the config files will most likely be only stored on the server and not be accessible for the client. Am I missing some SonarQube API functionality that would allow to use config files instead of Sonar config properties ??? |
Small update to the used names ... @Pablissimo let me know if this would be ok for you: |
- multiple separated rule config collections now supported - added parsing & handling of technical debt properties for rules - added some more test coverage for rule parsing & handling
@Pablissimo please review the latest commit, which hopefully should now be fine to wrap up this PR. The changes that I made (in respect to the above points):
|
Amazing thanks - will be Sunday before I get to it probably but I've got a good feeling! |
I performed the following additions & changes: