civictechindex / brigade-project-index

Brigade Project Index
https://brigade.cloud/
12 stars 19 forks source link

Add GitHub action checking links in .md files #48

Closed k3KAW8Pnf7mkmdSMPHz27 closed 3 years ago

k3KAW8Pnf7mkmdSMPHz27 commented 3 years ago

Adds a check for broken links when .md files are changed. It should probably ignore some files, hence the draft status.

k3KAW8Pnf7mkmdSMPHz27 commented 3 years ago

Also, the latest run on my fork

I have started to fix all broken links that are found but it is going to take a while and will be in a different PR.

themightychris commented 3 years ago

@k3KAW8Pnf7mkmdSMPHz27 it would be awesome to have a markdown linter in this workflow (or a separate one?) too

k3KAW8Pnf7mkmdSMPHz27 commented 3 years ago

@themightychris I'll look at adding a linter in the next couple of days (Friday most likely).

k3KAW8Pnf7mkmdSMPHz27 commented 3 years ago

Well, expect an update on Friday,

  1. Check README.md and docs/
  2. Exclude some "URLs" that should not work
  3. Add linter
k3KAW8Pnf7mkmdSMPHz27 commented 3 years ago

I added a linter with some default options, but I think there is a need to look over them, see https://github.com/k3KAW8Pnf7mkmdSMPHz27/brigade-project-index/runs/2205386468?check_suite_focus=true for latest run.

(I don't have time to look at it further today but I'll get back to it)

k3KAW8Pnf7mkmdSMPHz27 commented 3 years ago

@themightychris I'd argue that the rules are a bit on the strict side, but they are fairly easy to disable so perhaps keep them as is and see how it works out in the long run.

I'll start updating the markdown documents.

k3KAW8Pnf7mkmdSMPHz27 commented 3 years ago

Additionally, disabling these might be a good idea,

themightychris commented 3 years ago

I don't see any reason to keep consecutive blank lines around, I always clear those out to shut the linter up

I'd also leave the no-bare-urls rule on, bare URL's can simply be wrapped like <http://link> to turn them into links -- full links with meaningful names are ideal but when there isn't one or the content is the URL you can just wrap URLs in angle brackets