lineageos4microg/docker-lineage-cicd

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

Open

#500 aperta il 30 ott 2023

Vedi su GitHub
 (0 commenti) (1 reazione) (0 assegnatari)Shell (206 fork)github user discovery
enhancementhelp wanted

Metriche repository

Star
 (555 star)
Metriche merge PR
 (Merge medio 1g 13h) (6 PR mergiate in 30 g)

Descrizione

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

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

Guida contributor