Skip to content

Commit 2cdfa0e

Browse files
Tim Zakianbors-diem
authored andcommitted
Fix all broken links, add github action to check for broken links on each PR
Closes: #102
1 parent 584bfc8 commit 2cdfa0e

File tree

17 files changed

+46
-35
lines changed

17 files changed

+46
-35
lines changed

.github/workflows/ci-test.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,3 +273,20 @@ jobs:
273273
uses: ./.github/actions/early-terminator
274274
with:
275275
github-token: ${{secrets.GITHUB_TOKEN}}
276+
check-for-broken-links:
277+
name: Check for broken links in files
278+
runs-on: ubuntu-20.04
279+
needs:
280+
- prepare
281+
steps:
282+
- uses: actions/checkout@v2
283+
- name: Set up Ruby 2.6
284+
uses: actions/setup-ruby@v1
285+
with:
286+
ruby-version: 2.6.x
287+
- name: Run Checks
288+
run: |
289+
gem install awesome_bot
290+
# Don't look in git or target dirs. Don't check png, bib, tex, or shell files
291+
# We allow links to be redirects, allow duplicates, and we also allow Too Many Requests (429) errors
292+
find . -not \( -path "./.git*" -prune \) -not \( -path "./target" -prune \) -type f -not -name "*.png" -not -name "*.sh" -not -name "*.bib" -not -name "*.tex" | while read arg; do awesome_bot --allow-redirect --allow-dupe --allow 429 --skip-save-results $arg; done

CONTRIBUTING.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,9 @@ detailed guidance about how to contribute to the project.
3838
#### Documentation
3939

4040
Diem's developer website is also open source (the code can be found in this
41-
[repository](https://github.com/diem/diem/developers.diem.com/website/)). It is built using
41+
[repository](https://github.com/diem/diem/tree/main/developers.diem.com)). It is built using
4242
[Docusaurus](https://docusaurus.io/):
4343

44-
If you know Markdown, you can already contribute! How to contribute can be found in the [website
45-
repo](https://github.com/diem/developers.diem.com/website/CONTRIBUTING.md).
46-
4744
## Developer Workflow
4845

4946
Changes to the project are proposed through pull requests. The general pull

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Move is a new programmable platform for blockchains and other applications where
1414

1515
## Contributing
1616

17-
To begin contributing, [sign the CLA](https://diem.com/en-US/cla-sign/). You can learn more about contributing to the Diem project by reading our [Contribution Guide](https://developers.diem.com/docs/community/contributing) and by viewing our [Code of Conduct](https://developers.diem.com/docs/policies/code-of-conduct).
17+
To begin contributing, [sign the CLA](https://diem.com/en-US/cla-sign/). You can learn more about contributing to the Diem project by reading our [Contribution Guide](https://github.com/diem/diem/blob/main/CONTRIBUTING.md) and by viewing our [Code of Conduct](https://developers.diem.com/docs/policies/code-of-conduct).
1818

1919
## Community
2020

documentation/coding_guidelines.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ diem$ cargo xfmt
2121
diem$ cargo xclippy --all-targets
2222
```
2323

24-
In general, we follow the recommendations from [rust-lang-nursery](https://rust-lang-nursery.github.io/api-guidelines/about.html) and [The Rust Programming Language](https://doc.rust-lang.org/book/). The remainder of this guide provides detailed guidelines on specific topics in order to achieve uniformity of the codebase.
24+
In general, we follow the recommendations from [rust-lang-nursery](https://rust-lang.github.io/api-guidelines/) and [The Rust Programming Language](https://doc.rust-lang.org/book/). The remainder of this guide provides detailed guidelines on specific topics in order to achieve uniformity of the codebase.
2525

2626
## Code documentation
2727

@@ -243,11 +243,11 @@ This is a brief and simplified mini guide of the different functions that exist
243243

244244
We currently use [log](https://docs.rs/log/) for logging.
245245

246-
* [error!](https://docs.rs/log/0.4.10/log/macro.error.html) - Error-level messages have the highest urgency in [log](https://docs.rs/log/). An unexpected error has occurred (e.g. exceeded the maximum number of retries to complete an RPC or inability to store data to local storage).
247-
* [warn!](https://docs.rs/log/0.4.4.10/log/macro.warn.html) - Warn-level messages help notify admins about automatically handled issues (e.g. retrying a failed network connection or receiving the same message multiple times, etc.).
248-
* [info!](https://docs.rs/log/0.4.4.10/log/macro.info.html) - Info-level messages are well suited for "one-time" events (such as logging state on one-time startup and shutdown) or periodic events that are not frequently occurring - e.g. changing the validator set every day.
249-
* [debug!](https://docs.rs/log/0.4.4.10/log/macro.debug.html) - Debug-level messages can occur frequently (i.e. potentially > 1 message per second) and are not typically expected to be enabled in production.
250-
* [trace!](https://docs.rs/log/0.4.4.10/log/macro.trace.html) - Trace-level logging is typically only used for function entry/exit.
246+
* [error!](https://docs.rs/log/0.4.14/log/macro.error.html) - Error-level messages have the highest urgency in [log](https://docs.rs/log/). An unexpected error has occurred (e.g. exceeded the maximum number of retries to complete an RPC or inability to store data to local storage).
247+
* [warn!](https://docs.rs/log/0.4.14/log/macro.warn.html) - Warn-level messages help notify admins about automatically handled issues (e.g. retrying a failed network connection or receiving the same message multiple times, etc.).
248+
* [info!](https://docs.rs/log/0.4.14/log/macro.info.html) - Info-level messages are well suited for "one-time" events (such as logging state on one-time startup and shutdown) or periodic events that are not frequently occurring - e.g. changing the validator set every day.
249+
* [debug!](https://docs.rs/log/0.4.14/log/macro.debug.html) - Debug-level messages can occur frequently (i.e. potentially > 1 message per second) and are not typically expected to be enabled in production.
250+
* [trace!](https://docs.rs/log/0.4.14/log/macro.trace.html) - Trace-level logging is typically only used for function entry/exit.
251251

252252
### Testing
253253

language/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
id: move-language
33
title: Move Language
4-
custom_edit_url: https://github.com/diem/diem/edit/main/language/README.md
4+
custom_edit_url: https://github.com/diem/move/edit/main/language/README.md
55
---
66

77

language/changes/4-unit-testing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ In the development of unit tests, there were a couple of alternatives considered
336336

337337
### Expected Value Tests
338338

339-
Move already supports [expected value tests](https://github.com/diem/diem/tree/main/language/tools/move-cli#testing-with-the-move-cli) in the Move CLI, however these cover a different aspect of testing for Move. In particular, there is no concept of test-only code and test-only dependencies, which makes testing non-public functions much more difficult. Additionally, each expected value test entry must be a transaction or script function. Because of this, the expected value tests rely on a specific Move adapter implementation, whereas the unit tests do not rely on an adapter implementation and rely solely on the Move compiler and VM.
339+
Move already supports [expected value tests](https://github.com/diem/move/tree/main/language/tools/move-cli#testing-with-the-move-cli) in the Move CLI, however these cover a different aspect of testing for Move. In particular, there is no concept of test-only code and test-only dependencies, which makes testing non-public functions much more difficult. Additionally, each expected value test entry must be a transaction or script function. Because of this, the expected value tests rely on a specific Move adapter implementation, whereas the unit tests do not rely on an adapter implementation and rely solely on the Move compiler and VM.
340340

341341
Due to the design of unit tests, unit tests make it easier to test the individual units of code that comprise a Move module. However, because the unit tests do not require or use an adapter, they do not support certain features that you may wish to test. E.g., there is no way in Move unit tests to query if a specific event has been emitted.
342342

language/move-analyzer/editors/code/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ The `move-analyzer` language server is a Rust program that is part of
2222
1. You may clone [the Diem repository](https://github.com/diem/diem) yourself and build
2323
`move-analyzer` from its source code. This is recommended for Diem hackathon participants, and
2424
Diem & Move core developers. To do so, follow the instructions in the Move tutorial's
25-
[Step 0: Installation](https://github.com/diem/diem/tree/main/language/documentation/tutorial#step-0-installation).
25+
[Step 0: Installation](https://github.com/diem/move/tree/main/language/documentation/tutorial#step-0-installation).
2626
2. You may use Rust's package manager `cargo` to install `move-analyzer` in your user's PATH. This
2727
is recommended for people who do not work on Diem & Move core.
2828
1. If you don't already have a Rust toolchain installed, you should install

language/move-analyzer/editors/code/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"license": "Apache-2.0",
77
"version": "0.0.5",
88
"preview": true,
9-
"homepage": "https://developers.diem.com/docs/move/move-overview",
9+
"homepage": "https://developers.diem.com",
1010
"repository": {
1111
"url": "https://github.com/diem/diem.git",
1212
"type": "git"

language/move-binary-format/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
id: vm
33
title: Virtual Machine
4-
custom_edit_url: https://github.com/diem/diem/edit/main/language/move-binary-format/README.md
4+
custom_edit_url: https://github.com/diem/move/edit/main/language/move-binary-format/README.md
55
---
66

77

@@ -14,7 +14,7 @@ metering logical abstraction is also defined there.
1414

1515
The MoveVM is a stack machine with a static type system. The MoveVM honors
1616
the specification of the Move language through a mix of file format,
17-
verification (for reference [bytcode verifier README](https://github.com/diem/diem/blob/main/language/bytecode-verifier/README.md))
17+
verification (for reference [bytcode verifier README](https://github.com/diem/move/blob/main/language/move-bytecode-verifier/README.md))
1818
and runtime constraints. The structure of the file format allows the
1919
definition of modules, types (resources and unrestricted types), and
2020
functions. Code is expressed via bytecode instructions, which may have
@@ -40,7 +40,7 @@ The `CompiledModule` and `CompiledScript` definitions in
4040
`diem/language/move-binary-format/src/file_format.rs` are the top-level structs for a Move
4141
*Module* or *Transaction Script*, respectively. These structs provide a
4242
simple abstraction over the file format. Additionally, a set of
43-
[*Views*](https://github.com/diem/diem/blob/main/language/move-binary-format/src/views.rs) are defined to easily navigate and inspect
43+
[*Views*](https://github.com/diem/move/blob/main/language/move-binary-format/src/views.rs) are defined to easily navigate and inspect
4444
`CompiledModule`s and `CompiledScript`s.
4545

4646
## Folder Structure

language/move-bytecode-verifier/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
id: bytecode-verifier
33
title: Bytecode Verifier
4-
custom_edit_url: https://github.com/diem/diem/edit/main/language/bytecode-verifier/README.md
4+
custom_edit_url: https://github.com/diem/move/edit/main/language/move-bytecode-verifier/README.md
55
---
66

77

0 commit comments

Comments
 (0)