puppetlabs / language-style-guide

This will be the source for the Puppet Language Style Guide
https://puppetlabs.github.io/language-style-guide/
Creative Commons Attribution Share Alike 4.0 International
0 stars 1 forks source link

class rules should apply to plans as well #21

Open bastelfreak opened 3 months ago

bastelfreak commented 3 months ago

Use Case

We've a lot of checks that apply to classes (and sometimes defined resources). For example the parameter_order check. It ensures that parameter without a value are listed before parameters with a value. I think those checks should apply to plans as well, but puppet-lint explicitly only checks classes and defined resources: https://github.com/puppetlabs/puppet-lint/blob/main/lib/puppet-lint/plugins/check_classes/parameter_order.rb#L8

Describe the Solution You Would Like

Treat plans as classes and apply the same checks.

Describe Alternatives You've Considered

Additional Context

jay7x commented 3 months ago

I miss it when working on Bolt plans in a VSCode with Puppet plugin! Though need to check carefully for any corner cases. E.g. direct lookup() is pretty ok to have in a plan.

bastelfreak commented 3 months ago

Yes, not all checks apply to plans. But the majority.

jordanbreen28 commented 2 months ago

We don't believe plans have been fully reviewed in terms of style and semantics in the same fashion as the puppet language. Thanks for raising but to get more info we'll defer to @davidsandilands.

davidsandilands commented 2 months ago

@pmcmaw @jordanbreen28 not sure if this issue should be moved to https://github.com/puppetlabs/language-style-guide or kept open and referenced to an issue there?

danadoherty639 commented 1 month ago

@bastelfreak we have moved this to the appropriate repository for that teams review. Thanks

bastelfreak commented 1 week ago

@danadoherty639 hey, do you have any update here?

davidsandilands commented 2 days ago

@bastelfreak this is on my todo list as ultimately this should come from the language steering group which as part of the changes to open source should be made up of community and Puppet inc reps