Skip to content

Commit

Permalink
Add new ignored urls and fix logic in check-broken-links.sh (#6552)
Browse files Browse the repository at this point in the history
  • Loading branch information
zeme-wana authored Oct 9, 2024
1 parent be2555e commit df74625
Showing 1 changed file with 22 additions and 16 deletions.
38 changes: 22 additions & 16 deletions scripts/check-broken-links.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,36 @@ TARGETS=(
*.adoc
)

# For some reason linkchecker fails to check these URLs though they are valid
# For some reason linkchecker fails to check these URLs though they are valid.
# It's plausible that these domains are blocking the linkchecker user agent, or
# that we are running into rate-limiting issues.
IGNORE_URLS=(
--ignore-url="^https://pvp\.haskell\.org.*"
--ignore-url="^https://www\.haskell\.org/cabal.*"
--ignore-url="^https://img\.shields\.io/matrix/plutus-core%3Amatrix\.org.*"
https://pvp.haskell.org
https://www.haskell.org/cabal
)

FAILED=0

check_links() {
linkchecker --no-warnings --recursion-level 0 --output failures --check-extern --stdin
}

grep_links() {
grep -oE "\b(https?://|www\.)[^\[\(\)\"]+\b" "$1"
for file in $(find "${TARGETS[@]}"); do
grep -oE "\b(https?://|www\.)[^\[\(\)\"]+\b" "${file}"
done
}

check_links() {
linkchecker --no-warnings --recursion-level 0 --output failures --check-extern "${IGNORE_URLS[@]}" --stdin
valid_links() {
local all_links="$(grep_links | sort | uniq | tr ' ' '\n')"
local ignore_links="$(echo "${IGNORE_URLS[@]}" | sort | uniq | tr ' ' '\n')"
comm -3 <(echo "$all_links") <(echo "$ignore_links")
}

for file in $(find "${TARGETS[@]}"); do
echo "Checking ${file}"
grep_links "${file}" | check_links
if [ $? -ne 0 ]; then
echo "${file} has broken links, see output above"
FAILED=1
fi
done
check_links <<< "$(valid_links)"

if [[ "$?" != "0" ]]; then
echo "Found broken links, see output above"
exit 1
fi

exit "${FAILED}"

1 comment on commit df74625

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Plutus Benchmarks'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.05.

Benchmark suite Current: df74625 Previous: be2555e Ratio
validation-crowdfunding-success-1 299.8 μs 281.9 μs 1.06
validation-crowdfunding-success-3 299.3 μs 238.4 μs 1.26
validation-currency-1 353.9 μs 249.4 μs 1.42
validation-future-increase-margin-5 1175 μs 898.1 μs 1.31
validation-future-pay-out-1 354.3 μs 248.1 μs 1.43
validation-future-pay-out-2 768.9 μs 542.5 μs 1.42
validation-future-pay-out-3 770.9 μs 541.1 μs 1.42
validation-future-settle-early-2 770.9 μs 691.9 μs 1.11
validation-multisig-sm-7 425.3 μs 391.9 μs 1.09
validation-multisig-sm-8 562.9 μs 392.8 μs 1.43
validation-multisig-sm-9 565.3 μs 394.7 μs 1.43
validation-multisig-sm-10 795.4 μs 559.5 μs 1.42
validation-ping-pong-1 471.8 μs 335.8 μs 1.41
validation-ping-pong-2 472.5 μs 446.5 μs 1.06
validation-pubkey-1 203.6 μs 170.8 μs 1.19
validation-stablecoin_1-1 1305 μs 910.6 μs 1.43
validation-stablecoin_1-2 280.5 μs 195.2 μs 1.44
validation-token-account-1 245.1 μs 225 μs 1.09
validation-uniswap-1 559.3 μs 415.7 μs 1.35
validation-uniswap-2 316.5 μs 222 μs 1.43
validation-uniswap-3 2502 μs 1761 μs 1.42
validation-uniswap-4 480.6 μs 335.9 μs 1.43
validation-uniswap-5 1648 μs 1155 μs 1.43
validation-uniswap-6 459.6 μs 339.1 μs 1.36
validation-vesting-1 498.1 μs 444.5 μs 1.12
validation-decode-game-sm-success_1-3 725.6 μs 518.6 μs 1.40
validation-decode-game-sm-success_1-4 230.6 μs 162.3 μs 1.42
validation-decode-game-sm-success_2-1 721.3 μs 523.4 μs 1.38
validation-decode-game-sm-success_2-2 229.8 μs 161.9 μs 1.42
validation-decode-game-sm-success_2-3 740.9 μs 525 μs 1.41
validation-decode-game-sm-success_2-4 229.9 μs 161.9 μs 1.42
validation-decode-game-sm-success_2-6 197 μs 162.2 μs 1.21
validation-decode-multisig-sm-1 826.4 μs 581.5 μs 1.42
validation-decode-multisig-sm-2 817.4 μs 581.7 μs 1.41
validation-decode-multisig-sm-3 815.8 μs 581.3 μs 1.40
validation-decode-multisig-sm-4 826.4 μs 581 μs 1.42
validation-decode-multisig-sm-5 820.3 μs 582.1 μs 1.41
validation-decode-multisig-sm-6 826.7 μs 581.4 μs 1.42
validation-decode-multisig-sm-7 823 μs 582.6 μs 1.41
validation-decode-multisig-sm-8 802.3 μs 581.2 μs 1.38
validation-decode-multisig-sm-9 803.4 μs 581.3 μs 1.38
validation-decode-multisig-sm-10 702 μs 581.4 μs 1.21
validation-decode-prism-1 214.4 μs 159.7 μs 1.34
validation-decode-prism-2 553.3 μs 522 μs 1.06
validation-decode-prism-3 253.8 μs 238.2 μs 1.07
validation-decode-stablecoin_1-5 1202 μs 843.3 μs 1.43
validation-decode-stablecoin_1-6 229.4 μs 161.7 μs 1.42
validation-decode-token-account-2 298.2 μs 255.7 μs 1.17
validation-decode-uniswap-1 340.1 μs 257 μs 1.32
nofib-queens5x5/fc 243800 μs 171600 μs 1.42
marlowe-semantics/119fbea4164e2bf21d2b53aa6c2c4e79414fe55e4096f5ce2e804735a7fbaf91 1086 μs 795.4 μs 1.37
marlowe-semantics/12910f24d994d451ff379b12c9d1ecdb9239c9b87e5d7bea570087ec506935d5 705.5 μs 507.9 μs 1.39
marlowe-semantics/18cefc240debc0fcab14efdd451adfd02793093efe7bc76d6322aed6ddb582ad 1072 μs 755.9 μs 1.42
marlowe-semantics/1a2f2540121f09321216090b2b1f211e3f020c2c133a1a3c3f3c232a26153a04 432.1 μs 305.7 μs 1.41
marlowe-semantics/1a573aed5c46d637919ccb5548dfc22a55c9fc38298d567d15ee9f2eea69d89e 1282 μs 906.6 μs 1.41
marlowe-semantics/1d56060c3b271226064c672a282663643b1b0823471c67737f0b076870331260 1105 μs 777.8 μs 1.42
marlowe-semantics/1d6e3c137149a440f35e0efc685b16bfb8052ebcf66ec4ad77e51c11501381c7 433.9 μs 306.3 μs 1.42
marlowe-semantics/1f0f02191604101e1f201016171604060d010d1d1c150e110a110e1006160a0d 1403 μs 990.9 μs 1.42
marlowe-semantics/202d273721330b31193405101e0637202e2a0f1140211c3e3f171e26312b0220 8122 μs 5866 μs 1.38
marlowe-semantics/21953bf8798b28df60cb459db24843fb46782b19ba72dc4951941fb4c20d2263 510.6 μs 361.9 μs 1.41
marlowe-semantics/238b21364ab5bdae3ddb514d7001c8feba128b4ddcf426852b441f9a9d02c882 428.4 μs 371.7 μs 1.15
marlowe-semantics/ced1ea04649e093a501e43f8568ac3e6b37cd3eccec8cac9c70a4857b88a5eb8 1002.9999999999999 μs 841.4 μs 1.19
marlowe-semantics/cf542b7df466b228ca2197c2aaa89238a8122f3330fe5b77b3222f570395d9f5 705.5 μs 495.2 μs 1.42
marlowe-semantics/d1ab832dfab25688f8845bec9387e46ee3f00ba5822197ade7dd540489ec5e95 48330 μs 36430 μs 1.33
marlowe-semantics/d1c03759810747b7cab38c4296593b38567e11195d161b5bb0a2b58f89b2c65a 1460 μs 1028 μs 1.42
marlowe-semantics/d64607eb8a1448595081547ea8780886fcbd9e06036460eea3705c88ea867e33 428.3 μs 302.1 μs 1.42
marlowe-semantics/dc241ac6ad1e04fb056d555d6a4f2d08a45d054c6f7f34355fcfeefebef479f3 668.8 μs 469.8 μs 1.42
marlowe-semantics/dd11ae574eaeab0e9925319768989313a93913fdc347c704ddaa27042757d990 1079 μs 760.1 μs 1.42
marlowe-semantics/e26c1cddba16e05fd10c34cbdb16ea6acdbac7c8323256c31c90c520ee6a1080 529.2 μs 375.1 μs 1.41
marlowe-semantics/e34b48f80d49360e88c612f4016f7d68cb5678dd8cd5ddb981375a028b3a40a5 558.6 μs 393.2 μs 1.42
marlowe-semantics/e3afd22d01ff12f381cf915fd32358634e6c413f979f2492cf3339319d8cc079 433.8 μs 305.3 μs 1.42
marlowe-semantics/e9234d2671760874f3f660aae5d3416d18ce6dfd7af4231bdd41b9ec268bc7e1 1346 μs 950.2 μs 1.42
marlowe-semantics/eb4a605ed3a64961e9e66ad9631c2813dadf7131740212762ae4483ec749fe1d 427.9 μs 302 μs 1.42
marlowe-semantics/ecb5e8308b57724e0f8533921693f111eba942123cf8660aac2b5bac21ec28f0 945.1 μs 663.9 μs 1.42
marlowe-semantics/f2a8fd2014922f0d8e01541205d47e9bb2d4e54333bdd408cbe7c47c55e73ae4 1061 μs 746.6 μs 1.42
marlowe-semantics/f339f59bdf92495ed2b14e2e4d3705972b4dda59aa929cffe0f1ff5355db8d79 6392 μs 4553 μs 1.40
marlowe-semantics/ffdd68a33afd86f8844c9f5e45b2bda5b035aa02274161b23d57709c0f8b8de6 1369 μs 959.4 μs 1.43
marlowe-role-payout/0004000402010401030101030100040000010104020201030001000204020401 261 μs 183.2 μs 1.42
marlowe-role-payout/0100000100010000000001000100010101000101000001000000010000010000 367.1 μs 258.3 μs 1.42
marlowe-role-payout/0101000100000101010000010101000100010101000001000001000000010101 276.4 μs 223.3 μs 1.24
marlowe-role-payout/6d66bddb4269bdf77392d3894da5341cf019d39787522af4f83f01285991e93c 242.4 μs 170.5 μs 1.42
marlowe-role-payout/73f044f34a30f26639c58bafe952047f74c7bf1eafebab5aadf5b73cfb9024ed 237.9 μs 167.1 μs 1.42
marlowe-role-payout/7b1dd76edc27f00eb382bf996378155baf74d6a7c6f3d5ec837c39d29784aade 242.5 μs 170.5 μs 1.42
marlowe-role-payout/803eae94d62e2afc0e835c204af8362170301bc329e2d849d5f5a47dddf479ec 268.3 μs 188.6 μs 1.42
marlowe-role-payout/87167fc5469adac97c1be749326fa79a6b7862ce68aa4abcb438e3c034bd0899 280.8 μs 197.6 μs 1.42
marlowe-role-payout/8c0fa5d9d6724c5c72c67e055d4bfc36a385ded7c3c81c08cdbd8705829af6e6 276.8 μs 199.2 μs 1.39
marlowe-role-payout/a27524cfad019df45e4e8316f927346d4cc39da6bdd294fb2c33c3f58e6a8994 237.7 μs 167.1 μs 1.42
marlowe-role-payout/a6664a2d2a82f370a34a36a45234f6b33120a39372331678a3b3690312560ce9 282.1 μs 207 μs 1.36

This comment was automatically generated by workflow using github-action-benchmark.

CC: @IntersectMBO/plutus-core

Please sign in to comment.