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

Support loading custom rules by their name instead of FQN #781

Merged
merged 2 commits into from
Aug 3, 2018

Conversation

olafurpg
Copy link
Contributor

@olafurpg olafurpg commented Aug 3, 2018

Previously, custom rules had to be configured through the 'class:FQN'
option but this was error prone since it's easy to mess up the rule
FQN and it's long to type. This commit adds support for loading custom
rules from the classpath using JDK ServiceLoaders:
https://docs.oracle.com/javase/7/docs/api/java/util/ServiceLoader.html

// Before
rules = [ "class:com.bar.FooRule" ]
// After
rules = [ FooRule ]

…ass:FQN'

Previously, custom rules had to be configured through the 'class:FQN'
option but this was error prone since it's easy to mess up the rule
FQN and it's long to type. This commit adds support for loading custom
rules from the classpath using JDK ServiceLoaders:
  https://docs.oracle.com/javase/7/docs/api/java/util/ServiceLoader.html

```
// Before
rules = [ "class:com.bar.FooRule" ]
// After
rules = [ FooRule ]
```
@olafurpg olafurpg merged commit 6a0c120 into scalacenter:master Aug 3, 2018
@olafurpg olafurpg deleted the service-loader branch August 3, 2018 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant