puppetlabs / puppet-strings

The next generation Puppet documentation extraction and presentation tool.
http://puppetlabs.github.io/puppet-strings/
Apache License 2.0
90 stars 84 forks source link

(MAINT) Add CI workflow #310

Closed chelnak closed 2 years ago

chelnak commented 2 years ago

Prior to this commit puppet-strings relied on travis for ci. We have since moved away from travis and use GitHub actions.

This commit creates a new ci.yml workflow that runs on:

We also remove the legacy travis workflow.

In addition to the above there are also a number of rubocop fixes in this PR. These fixes were required to ensure that spec and linting tests were green.

chelnak commented 2 years ago

@david22swan With regards to the _prefix parameter.

It looks like it is a requirement brought forward by inheritance.

The base class for our CodeObjects classes inherit from YARD::CodeObjects::NamespaceObject. This has an instance method called name that expects a parameter (prefix).

Given that our classes seem to build on the OO nature of YARD i'd be hesitant to remove it because we do not know whether other methods will be expecting an object with a signature of my_object.name(prefix).

I think what can be misleading here is using false as a default. I've seen others use more descriptive symbols in these cases. We could adopt this change here?

There is however documentation for the param on most of these methods that states it's intention:

# @param [Boolean] prefix whether to show a prefix. Ignored for Puppet group namespaces.

There may be more value ensuring that this message is constant across all of the CodeObjects classes.

What do you think?

david22swan commented 2 years ago

Sounds good to me

pmcmaw commented 2 years ago

Merging as the outstanding status is for Travis CI which has been removed.