[sonar-dev] RulesFinder is deprecated, but what replaces it?

classic Classic list List threaded Threaded
3 messages Options
fge
Reply | Threaded
Open this post in threaded view
|

[sonar-dev] RulesFinder is deprecated, but what replaces it?

fge
I currently use this in my language plugin:

----
public final class MyLanguageProfile
    extends ProfileDefinition
{
    private final RuleFinder finder;

    public MyLanguageProfile(final RuleFinder finder)
    {
        this.finder = finder;
    }

    @Override
    public RulesProfile createProfile(final ValidationMessages messages)
    {
        // etc
----

but it is deprecated in sonar-plugin-api 5.1; what replaces it? What
is more I use an AnnotationBasedProfileBulder with the finder as an
argument to register the rules:

----
return new AnnotationBasedProfileBuilder(finder).build(repositoryKey,
    profileName, languageKey, checks, messages);
----

What should replace it?

--
Francis Galiegue, [hidden email], https://github.com/fge
JSON Schema in Java: http://json-schema-validator.herokuapp.com
Parsers in pure Java: https://github.com/fge/grappa

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: [sonar-dev] RulesFinder is deprecated, but what replaces it?

Julien HENRY
Hi Francis,

The @Deprecated tag was mainly added for batch side components. In a server side extension (like ProfileDefinition) it is fine to use RuleFinder until a proper replacement is provided.

++

Julien

2015-05-10 16:58 GMT+02:00 Francis Galiegue <[hidden email]>:
I currently use this in my language plugin:

----
public final class MyLanguageProfile
    extends ProfileDefinition
{
    private final RuleFinder finder;

    public MyLanguageProfile(final RuleFinder finder)
    {
        this.finder = finder;
    }

    @Override
    public RulesProfile createProfile(final ValidationMessages messages)
    {
        // etc
----

but it is deprecated in sonar-plugin-api 5.1; what replaces it? What
is more I use an AnnotationBasedProfileBulder with the finder as an
argument to register the rules:

----
return new AnnotationBasedProfileBuilder(finder).build(repositoryKey,
    profileName, languageKey, checks, messages);
----

What should replace it?

--
Francis Galiegue, [hidden email], https://github.com/fge
JSON Schema in Java: http://json-schema-validator.herokuapp.com
Parsers in pure Java: https://github.com/fge/grappa

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



fge
Reply | Threaded
Open this post in threaded view
|

Re: [sonar-dev] RulesFinder is deprecated, but what replaces it?

fge
Hello,

On Mon, May 11, 2015 at 9:18 AM, Julien HENRY
<[hidden email]> wrote:
> Hi Francis,
>
> The @Deprecated tag was mainly added for batch side components. In a server
> side extension (like ProfileDefinition) it is fine to use RuleFinder until a
> proper replacement is provided.
>
> ++
>

OK, thanks for the information!

--
Francis Galiegue, [hidden email], https://github.com/fge
JSON Schema in Java: http://json-schema-validator.herokuapp.com
Parsers in pure Java: https://github.com/fge/grappa

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email