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

feat(ci): add markdown link checker #2651

Merged
merged 20 commits into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/actions/markdown-check/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
### Markdown Link Checker

Uses the following GitHub Action: https://github.com/gaurav-nelson/github-action-markdown-link-check

Config file options: https://github.com/tcort/markdown-link-check#config-file-format
23 changes: 23 additions & 0 deletions .github/actions/markdown-check/mlc-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"ignorePatterns": [
{
"pattern": "^(https?://)?localhost"
},
{
"pattern": "https://www.raspberrypi.com/documentation/computers/configuration.html"
},
{
"pattern": "https://en.wikipedia.org/wiki/"
}
],
"replacementPatterns": [
{
"pattern": "^[./]*api/cmake/",
"replacement": "https://nasa.github.io/fprime/UsersGuide/api/cmake/"
},
{
"pattern": "^[./]*api/c\\+\\+/",
"replacement": "https://nasa.github.io/fprime/UsersGuide/api/c++/"
}
]
}
1 change: 0 additions & 1 deletion .github/actions/spelling/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ File | Purpose | Format | Info
[allow.txt](allow.txt) | Add words to the dictionary | one word per line (only letters and `'`s allowed) | [allow](https://github.com/check-spelling/check-spelling/wiki/Configuration#allow)
[reject.txt](reject.txt) | Remove words from the dictionary (after allow) | grep pattern matching whole dictionary words | [reject](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-reject)
[excludes.txt](excludes.txt) | Files to ignore entirely | perl regular expression | [excludes](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-excludes)
[only.txt](only.txt) | Only check matching files (applied after excludes) | perl regular expression | [only](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-only)
[patterns.txt](patterns.txt) | Patterns to ignore from checked lines | perl regular expression (order matters, first match wins) | [patterns](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-patterns)
[candidate.patterns](candidate.patterns) | Patterns that might be worth adding to [patterns.txt](patterns.txt) | perl regular expression with optional comment block introductions (all matches will be suggested) | [candidates](https://github.com/check-spelling/check-spelling/wiki/Feature:-Suggest-patterns)
[line_forbidden.patterns](line_forbidden.patterns) | Patterns to flag in checked lines | perl regular expression (order matters, first match wins) | [patterns](https://github.com/check-spelling/check-spelling/wiki/Configuration-Examples%3A-patterns)
Expand Down
3 changes: 1 addition & 2 deletions .github/actions/spelling/advice.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ If items relate to a ...
File paths are Perl 5 Regular Expressions - you can [test](
https://www.regexplanet.com/advanced/perl/) yours before committing to verify it will match your files.

`^` refers to the file's path from the root of the repository, so `^README\.md$` would exclude [README.md](
../tree/HEAD/README.md) (on whichever branch you're using).
`^` refers to the file's path from the root of the repository, so `^README\.md$` would exclude README.md (on whichever branch you're using).

* well-formed pattern.

Expand Down
4 changes: 4 additions & 0 deletions .github/actions/spelling/expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,7 @@ fsw
fus
FWCASSERT
Gangianpour
gaurav
gbl
gcc
gcda
Expand Down Expand Up @@ -605,6 +606,7 @@ Merewether
methoddoc
methodstub
microcontrollers
mlc
mman
MMAPALLOCATOR
MML
Expand Down Expand Up @@ -1018,6 +1020,7 @@ tcgetattr
TCIFLUSH
tclist
tcomp
tcort
TCPCLIENT
TCPHELPER
tcpserver
Expand Down Expand Up @@ -1164,6 +1167,7 @@ WAITALL
watney
Wdog
whitebox
wikipedia
WLE
Wno
WORKDIR
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/markdown-link-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Check Markdown links

on:
push:
branches: [devel]
pull_request:
branches: [devel]

jobs:
markdown-link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
use-quiet-mode: 'yes'
config-file: ./.github/actions/markdown-check/mlc-config.json
2 changes: 1 addition & 1 deletion Autocoders/Python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ Cmake file that is present in all parts of directory tree to be built by cmake.
### Requirements

The Autocoder's requirements are covered by installing the F´ software package. This is covered by the install document
found at: [INSTALL.md](../../INSTALL.md).
found at: [INSTALL.md](../../docs/INSTALL.md).

## Schematron
In Autocoders/Python/schema/default there are various schematron .rng files mixed with the normal F Prime RelaxNG .rng schema files. The schematron files validate xml in the same way as the RelaxNG schemas (within the XmlParser classes), but these schematron files will only generate command line errors, not exceptions like the schema files will. Here is a short description of each file:
Expand Down
3 changes: 1 addition & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ Contributors to the [fprime](https://github.com/nasa/fprime) repository should u
F´ follows a standard git flow development model. Developers should start with a
[fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo) of one of the F´ repositories and then develop
according to [git flow](https://docs.github.com/en/get-started/quickstart/github-flow). Remember to add an
[upstream remote](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/configuring-a-remote-for-a-fork)
to your fork such that you may fetch the latest changes.
upstream remote to your fork such that you may fetch the latest changes.

For each contribution, developers should first fetch the latest changes from upstream. Then create a new branch off
`devel` and submit back to F´ using a pull request as described above.
Expand Down
4 changes: 2 additions & 2 deletions RPI/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ This demo was developed on a Raspberry Pi 2 model B. The following directions ar

**Disable use of the UART for the Linux console:**

[Disable UART](https://www.raspberrypi.org/documentation/configuration/uart.md)
[Disable UART](https://www.raspberrypi.com/documentation/computers/configuration.html)

If the UART port is not set up correctly, there will be a file open error.

Expand Down Expand Up @@ -52,7 +52,7 @@ sudo apt update && sudo apt install -y gcc-arm-linux-gnueabihf g++-arm-linux-gnu

**Crosscompiling using CMake:**

The following commands are described at length in the getting started [tutorial](../docs/Tutorials/HelloWorld/Tutorial.md). These commands will
The following commands are described at length in the getting started [tutorial](../docs/Tutorials/README.md). These commands will
go to the RPI directory and generate a build directory for the RPI example. This step generates a CMake Cache, sets the toolchain use to build the
code and does an initial scan of the source tree. Since the RPI example sets a default F´ toolchain file in its CMakeLists.txt, we do not need to
supply one on the command line when generating the build. This only needs to be done once to prepare for the build because CMake will detect
Expand Down
4 changes: 1 addition & 3 deletions Ref/PingReceiver/docs/sdd.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

## 1. Introduction

The `Ref::PingReceiver` is a demonstration component that accepts pings from the Health Component [HTML](../../../Svc/Health/docs/sdd.html) [MD](../../../Svc/Health/docs/sdd.md) and has commands to disable ping responses for testing purposes.
The `Ref::PingReceiver` is a demonstration component that accepts pings from the [Health Component](../../../Svc/Health/docs/sdd.md) and has commands to disable ping responses for testing purposes.

## 2. Requirements

Expand All @@ -26,8 +26,6 @@ The `Ref::PingReceiver` component has the following component diagram:

## 4. Dictionaries

Dictionaries: [HTML](PingReceiver.html) [MD](PingReceiver.md)

## 5. Module Checklists

## 6. Unit Testing
Expand Down
2 changes: 1 addition & 1 deletion Ref/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ cd fprime/Ref/build-artifacts/<platform>/bin/
- The F´ utility's build command can build individual components too.
- The 'generate' command can take a toolchain argument for quickly generating a cross-compile `fprime-util generate raspberrypi` for example.

Further work with the F´ utility can be found in the [Getting Started](../docs/Tutorials/HelloWorld/Tutorial.md) tutorial. Other tutorials
Further work with the F´ utility can be found in the [Getting Started](../docs/Tutorials/README.md) tutorial. Other tutorials
for many aspects of F´ are available [here](../docs/Tutorials/README.md).


4 changes: 1 addition & 3 deletions Ref/RecvBuffApp/docs/sdd.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

## 1. Introduction

The `Ref::RecvBuffApp` is a demonstration component that receives data buffers from `Ref::SendBuffApp` [HTML](../../SendBuffApp/docs/sdd.html) [MD](../../SendBuffApp/docs/sdd.md)
The `Ref::RecvBuffApp` is a demonstration component that receives data buffers from `Ref::SendBuffApp` [SDD](../../SendBuffApp/docs/sdd.md)

## 2. Requirements

Expand All @@ -26,8 +26,6 @@ The `Ref::RecvBuffApp` component has the following component diagram:

## 4. Dictionaries

Dictionaries: [HTML](RecvBuff.html) [MD](RecvBuff.md)

## 5. Module Checklists

## 6. Unit Testing
Expand Down
4 changes: 1 addition & 3 deletions Ref/SendBuffApp/docs/sdd.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

## 1. Introduction

The `Ref::SendBuffApp` is a demonstration component that sends data buffers to `Ref::RecvBuffApp` [HTML](../../RecvBuffApp/docs/sdd.html) [MD](../../RecvBuffApp/docs/sdd.md)
The `Ref::SendBuffApp` is a demonstration component that sends data buffers to `Ref::RecvBuffApp` ([SDD](../../RecvBuffApp/docs/sdd.md))

## 2. Requirements

Expand All @@ -26,8 +26,6 @@ The `Ref::SendBuffApp` component has the following component diagram:

## 4. Dictionaries

Dictionaries: [HTML](SendBuff.html) [MD](SendBuff.md)

## 5. Module Checklists

## 6. Unit Testing
Expand Down
4 changes: 1 addition & 3 deletions Ref/SignalGen/docs/sdd.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

## 1. Introduction

The `Ref::SignalGen` is a demonstration component that receives data buffers from `Ref::SignalGen` [HTML](../../SendBuffApp/docs/sdd.html) [MD](../../SendBuffApp/docs/sdd.md). It is a source for testing plots in the ground software.
The `Ref::SignalGen` is a demonstration component that receives data buffers from `Ref::SignalGen` ([SDD](../../SendBuffApp/docs/sdd.md)). It is a source for testing plots in the ground software.

## 2. Requirements

Expand All @@ -25,8 +25,6 @@ The `Ref::SignalGen` component has the following component diagram:

## 4. Dictionaries

Dictionaries: [HTML](SignalGen.html) [MD](SignalGen.md)

## 5. Module Checklists

## 6. Unit Testing
Expand Down
81 changes: 0 additions & 81 deletions Ref/docs/Ref.md

This file was deleted.

Loading
Loading