On 16/08/2012, at 8:43 AM, Sean Reilly wrote:

> If the class' purpose is to provide DSL elements, then how about naming it 
> FindBugsDSL?

That's better than extension for me.

> 
> On Wed, Aug 15, 2012 at 9:16 PM, Adam Murdoch <[email protected]> 
> wrote:
> 
> On 15/08/2012, at 11:04 PM, Luke Daley wrote:
> 
>> I think we should avoid doing this.
>> 
>> My issue with it is that it's weak modelling. Not to pick on FindBugs (it's 
>> by far not the only plugin that does this, including my own), but what's the 
>> role of a class named “FindBugsExtension”? 
>> 
>> These things have a purpose or function, and the name should reflect it. The 
>> fact that it's a build language extension is not really relevant to its name 
>> I don't think. 
> 
> But that's exactly it's purpose. Every plugin has an extension object that 
> wires in the DSL for that plugin. It's just a container for a set of DSL 
> elements for that plugin. That's all it is, the entire reason for its 
> existence. Certainly, each particular element of the plugin's DSL has 
> individual purpose, and should be typed and modelled and named according to 
> it's purpose. No question there.
> 
> The fact that the FindBugs DSL currently only contains properties that define 
> some default values is a coincidence. We might later add, say, some ruleset 
> definitions. These aren't defaults - they're a model. So, FindBugsDefaults 
> would have to be renamed back to FindBugsExtension.
> 
> These things are DSL extensions.
> 
> 
> --
> Adam Murdoch
> Gradle Co-founder
> http://www.gradle.org
> VP of Engineering, Gradleware Inc. - Gradle Training, Support, Consulting
> http://www.gradleware.com
> 
> 

-- 
Luke Daley
Principal Engineer, Gradleware 
http://gradleware.com

Reply via email to