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

Automate URL and typo checking when README.md is checked in #500

Open
petefoth opened this issue Oct 30, 2023 · 0 comments
Open

Automate URL and typo checking when README.md is checked in #500

petefoth opened this issue Oct 30, 2023 · 0 comments

Comments

@petefoth
Copy link
Contributor

petefoth commented Oct 30, 2023

We should implement some tests / checks to be run when README.md is run.

The following comment has details of how to check for incorrect URLs, and for 'space before comma' typos

Possible tests

I have not used the Markdown editor MarkText for this commit (hence #499), but with its spell checker (on Linux Mint in my case) already raises some typos such as:

  • buid
  • intallation
  • knowlegdeable

In addition to find out incorrect commas use:

grep -E " ,|,'" README.md

I just established (hence #499) the following command-line to check URL updates:

grep -Eo "(http|https)://[a-zA-Z0-9./?=_%:-]*" README.md | sort -u | xargs -i sh -c 'curl -s -I "{}" | grep -wq "301" && echo "{}" && curl -s -I "{}" | grep location | cut -d ':' -f2-'> ```


currently outputting:

https://source.android.com/setup/build/building
/docs/setup/build/building

The tests should be implemented in a new workflow README-check.yml

@petefoth petefoth changed the title Automate url and type checking when README.md is checked in Automate URL and typo checking when README.md is checked in Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant