Skip to content

class rules should apply to plans as well #21

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

Open
bastelfreak opened this issue Aug 8, 2024 · 7 comments
Open

class rules should apply to plans as well #21

bastelfreak opened this issue Aug 8, 2024 · 7 comments
Labels
enhancement New feature or request

Comments

@bastelfreak
Copy link
Collaborator

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

@bastelfreak bastelfreak added the enhancement New feature or request label Aug 8, 2024
@jay7x
Copy link

jay7x commented Aug 9, 2024

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
Copy link
Collaborator Author

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

@jordanbreen28
Copy link

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
Copy link
Contributor

@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 danadoherty639 transferred this issue from puppetlabs/puppet-lint Oct 11, 2024
@danadoherty639
Copy link

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

@bastelfreak
Copy link
Collaborator Author

@danadoherty639 hey, do you have any update here?

@davidsandilands
Copy link
Contributor

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

No branches or pull requests

5 participants