Skip to content
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

NEW Add docs linting step #23

Merged

Conversation

GuySartorelli
Copy link
Member

Description

Adds a new step for linting documentation, provided the matrix tells us to do so.

I've also moved the code for installing nvm into a separate script file so I can reuse it in the new step. This means if we ever need to update that code, we can just update it in the one place.

Issues

@GuySartorelli GuySartorelli marked this pull request as draft April 3, 2024 04:02
@GuySartorelli GuySartorelli force-pushed the pulls/1/new-docs-linting branch from a76a667 to d6c16c5 Compare April 3, 2024 22:02
@GuySartorelli GuySartorelli marked this pull request as ready for review April 3, 2024 22:04
action.yml Show resolved Hide resolved
install-nvm.sh Outdated
php -r '
$hash = "dd4b116a7452fc3bb8c0e410ceac27e19b0ba0f900fe2f91818a95c12e92130fdfb8170fec170b9fb006d316f6386f2b";
if (hash_file("sha384", "install.sh") === $hash) {
echo "Installer verified";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't just say "indentation". If there's a specific problem, please either use the code change suggestion tool to indicate what specific change you want, or use full sentences to tell me what needs to change.
I shouldn't have to re-review my code to see if I can decipher what you mean.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

install-nvm.sh Show resolved Hide resolved
install-nvm.sh Outdated
echo "Installer verified";
} else {
echo "Installer corrupt";
unlink('install.sh');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should also add a 'cleanup' thing to remove __install-nvm.sh e.g. https://github.com/silverstripe/gha-trigger-ci/blob/1/action.yml#L95

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

action.yml Show resolved Hide resolved
action.yml Outdated
nvm install $NPM_VERSION && nvm use $NPM_VERSION
npm install --global yarn
# Run the linting script
vendor/bin/ss-docs-lint
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
vendor/bin/ss-docs-lint
vendor/bin/doclint

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like this but I'll do it to avoid unnecessary ping pong. We can always change it later if we find a reason to.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@GuySartorelli GuySartorelli force-pushed the pulls/1/new-docs-linting branch from d6c16c5 to 357b4a5 Compare April 4, 2024 20:29
@emteknetnz emteknetnz merged commit 77fbc5f into silverstripe:1 Apr 4, 2024
4 checks passed
@emteknetnz emteknetnz deleted the pulls/1/new-docs-linting branch April 4, 2024 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants