From 0e372fd2314e5d28f9df1dfe36725eb107607f13 Mon Sep 17 00:00:00 2001 From: jld3103 Date: Sun, 10 Dec 2023 13:56:13 +0100 Subject: [PATCH 1/3] refactor(ci): Rename and merge lint workflow Signed-off-by: jld3103 --- .github/workflows/{neon.yml => lint.yml} | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) rename .github/workflows/{neon.yml => lint.yml} (56%) diff --git a/.github/workflows/neon.yml b/.github/workflows/lint.yml similarity index 56% rename from .github/workflows/neon.yml rename to .github/workflows/lint.yml index 1af50abf61d..2382eba5db1 100644 --- a/.github/workflows/neon.yml +++ b/.github/workflows/lint.yml @@ -1,14 +1,14 @@ -name: Neon +name: Lint on: pull_request: concurrency: - group: neon-${{ github.head_ref || github.run_id }} + group: lint-${{ github.head_ref || github.run_id }} cancel-in-progress: true jobs: - untested-apis: - name: Untested APIs + lint: + name: Linting runs-on: ubuntu-22.04 steps: - name: Checkout repository @@ -17,12 +17,5 @@ jobs: - name: Find untested Neon APIs run: ./tool/find-untested-neon-apis.sh - dart-io-usage: - name: dart:io usage - runs-on: ubuntu-22.04 - steps: - - name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 - - name: Find dart:io usage run: ./tool/find-dart-io-usage.sh From 868c4b0d272780bf9db2d7aaa80d909ecdcbe7ca Mon Sep 17 00:00:00 2001 From: jld3103 Date: Sun, 10 Dec 2023 13:56:39 +0100 Subject: [PATCH 2/3] feat(tool,ci): Check for relative markdown links Signed-off-by: jld3103 --- .github/workflows/lint.yml | 3 +++ tool/find-relative-markdown-links.sh | 10 ++++++++++ 2 files changed, 13 insertions(+) create mode 100755 tool/find-relative-markdown-links.sh diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 2382eba5db1..9b380cdab93 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -19,3 +19,6 @@ jobs: - name: Find dart:io usage run: ./tool/find-dart-io-usage.sh + + - name: Find relative markdown links + run: ./tool/find-relative-markdown-links.sh diff --git a/tool/find-relative-markdown-links.sh b/tool/find-relative-markdown-links.sh new file mode 100755 index 00000000000..085d933609d --- /dev/null +++ b/tool/find-relative-markdown-links.sh @@ -0,0 +1,10 @@ +#!/bin/bash +set -euxo pipefail +cd "$(dirname "$0")/.." + +relative_markdown_links=("$(grep -r packages --include "*\.md" -e "\[.*\]\((?!http).*\)" -l -P || true)") + +if [[ -n "${relative_markdown_links[*]}" ]]; then + printf "%s\n" "${relative_markdown_links[@]}" + exit 1 +fi From 7e839fdb6cb56aabdb3fdeea81e8e4da8fc4ece1 Mon Sep 17 00:00:00 2001 From: jld3103 Date: Sun, 10 Dec 2023 13:52:07 +0100 Subject: [PATCH 3/3] chore: Remove relative markdown links in packages markdown files Signed-off-by: jld3103 --- packages/app/README.md | 8 ++++---- packages/dynamite/dynamite_end_to_end_test/README.md | 2 +- packages/dynamite/dynamite_petstore_example/README.md | 2 +- packages/neon_lints/README.md | 2 +- packages/nextcloud/README.md | 2 +- packages/nextcloud_test/README.md | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/app/README.md b/packages/app/README.md index 9f0412b1d78..9435498af32 100644 --- a/packages/app/README.md +++ b/packages/app/README.md @@ -10,7 +10,7 @@ The app will be published on F-Droid, the Google Playstore and Flathub later on. For more screenshots see `./screenshots/`. -| ![](screenshots/login_server_selection.png) | ![](screenshots/home_drawer.png) | ![](screenshots/settings_oled.png) | -|---------------------------------------------|------------------------------------------------|--------------------------------------| -| ![](screenshots/files_photos.png) | ![](screenshots/news_articles_unread_list.png) | ![](screenshots/notes_note_edit.png) | -| ![](screenshots/notifications_list.png) | | | +| ![](https://raw.githubusercontent.com/nextcloud/neon/main/packages/app/screenshots/login_server_selection.png) | ![](https://raw.githubusercontent.com/nextcloud/neon/main/packages/app/screenshots/home_drawer.png) | ![](https://raw.githubusercontent.com/nextcloud/neon/main/packages/app/screenshots/settings_oled.png) | +|----------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------| +| ![](https://raw.githubusercontent.com/nextcloud/neon/main/packages/app/screenshots/files_photos.png) | ![](https://raw.githubusercontent.com/nextcloud/neon/main/packages/app/screenshots/news_articles_unread_list.png) | ![](https://raw.githubusercontent.com/nextcloud/neon/main/packages/app/screenshots/notes_note_edit.png) | +| ![](https://raw.githubusercontent.com/nextcloud/neon/main/packages/app/screenshots/notifications_list.png) | | | diff --git a/packages/dynamite/dynamite_end_to_end_test/README.md b/packages/dynamite/dynamite_end_to_end_test/README.md index 4c1b83f523b..eba219eaf36 100644 --- a/packages/dynamite/dynamite_end_to_end_test/README.md +++ b/packages/dynamite/dynamite_end_to_end_test/README.md @@ -1,4 +1,4 @@ # Dynamite end to end test -This package contains OpenAPI specs to test the [dynamite](../dynamite) generator. +This package contains OpenAPI specs to test the [dynamite](https://github.com/nextcloud/neon/tree/main/packages/dynamite/dynamite) generator. This package is not meant for publishing. diff --git a/packages/dynamite/dynamite_petstore_example/README.md b/packages/dynamite/dynamite_petstore_example/README.md index 6423ba82f38..214aced6115 100644 --- a/packages/dynamite/dynamite_petstore_example/README.md +++ b/packages/dynamite/dynamite_petstore_example/README.md @@ -1,3 +1,3 @@ # dynamite petstore example -An example showcasing the [dynamite generator](../dynamite) for OpenAPI using the [Swagger Petstore](https://github.com/swagger-api/swagger-petstore). +An example showcasing the [dynamite generator](https://github.com/nextcloud/neon/tree/main/packages/dynamite/dynamite) for OpenAPI using the [Swagger Petstore](https://github.com/swagger-api/swagger-petstore). diff --git a/packages/neon_lints/README.md b/packages/neon_lints/README.md index 971c86a4288..1661a2bfae9 100644 --- a/packages/neon_lints/README.md +++ b/packages/neon_lints/README.md @@ -1,7 +1,7 @@ A package containing a very strict set of linting rules. ### Update rules: -To update the rules you need to update the `commitHash` in [lint_maker.yaml](lint_maker.yaml) and regenerate by running: +To update the rules you need to update the `commitHash` in [lint_maker.yaml](https://github.com/nextcloud/neon/blob/main/packages/neon_lints/lint_maker.yaml) and regenerate by running: ```sh fvm dart run lint_maker ``` diff --git a/packages/nextcloud/README.md b/packages/nextcloud/README.md index b5059a93913..b54004179cf 100644 --- a/packages/nextcloud/README.md +++ b/packages/nextcloud/README.md @@ -58,7 +58,7 @@ Alternatively you can also go to https://pub.dev/documentation/nextcloud/latest The endpoints are grouped by app and most apps also group their endpoints again. They can be accessed using getters on the `NextcloudClient`. -For an example checkout the [example](./example/example.dart). +For an example checkout the [example](https://github.com/nextcloud/neon/blob/main/packages/nextcloud/example/example.dart). ## Development diff --git a/packages/nextcloud_test/README.md b/packages/nextcloud_test/README.md index 6dcbca8629f..9ff9e574330 100644 --- a/packages/nextcloud_test/README.md +++ b/packages/nextcloud_test/README.md @@ -1,3 +1,3 @@ # nextcloud_test -A helper package for running tests in the [nextcloud](../nextcloud) package. +A helper package for running tests in the [nextcloud](https://github.com/nextcloud/neon/tree/main/packages/nextcloud) package.