Skip to content

Commit

Permalink
Add GitHub Action's linter to check markdown files and remove invalid…
Browse files Browse the repository at this point in the history
… links

When a pr is opened the linter will run over all md files and check if a link is not valid.

# Notes:
- Some md files were removed because I couldn't file a redirection to them:
  - deleted:    coverpage.md
  - deleted:    developer-guides/android-developer-guide.md
  - deleted:    developer-guides/samples.md
  - deleted:    ../start/coverpage.md
- The removed link were removed from the doc, it doesn't makes sense have an invalid link.
For example:
  - https://www.ekito.fr/people/sparkjava-and-koin/
  - https://medium.com/mindorks/using-dependency-injection-with-koin-bee0b461714a
- Config Files comments:
  - CHANGELOG.md is excluded from the linter.
  It contains a lot of github links, so when the linter checks it, GitHub returns a max requests reached error (429 HTTP error code).
  The [linter library is adding a feature to fix this case. However, they have to release a new version with this feature](tcort/markdown-link-check#114).
  - https://developer.android.com/ links are removed from the check because it requires authentication, so they fail due to an redirect loop.
  • Loading branch information
mirland committed Oct 19, 2020
1 parent 929a235 commit c612943
Show file tree
Hide file tree
Showing 11 changed files with 66 additions and 325 deletions.
7 changes: 7 additions & 0 deletions .config/mlc_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"ignorePatterns": [
{
"pattern": "^https://developer.android.com"
}
]
}
16 changes: 16 additions & 0 deletions .github/workflows/check_md.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Check Markdown links
on: pull_request
jobs:
markdown-link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
use-verbose-mode: 'yes'
config-file: '.config/mlc_config.json'
# CHANGELOG.md is excluded.
# GitHub returns 429 error code due to the amount of requests.
# This will be fixed after https://github.com/tcort/markdown-link-check/issues/114 be released
folder-path: 'koin-projects, .github'
file-path: './README.md, ./CODE_OF_CONDUCT.md'
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,3 @@ classes/
.DS_Store
/build
/captures


4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ class MyApplication : Application() {
### Articles

* [Dagger is dead. Long live Koin](https://www.linkedin.com/pulse/dagger-dead-long-live-koin-yordan-olave-cordero)
* [Testing a Koin application with KotlinTest](https://dev.to/kerooker/testing-koin-applications-with-kotlintest-1iip)
* [Testing a Koin application with KotlinTest](https://medium.com/@mutebibrian256/testing-koin-applications-with-kotlintest-d2ff9b23fff4)
* [Ready for Koin 2.0](https://medium.com/koin-developers/ready-for-koin-2-0-2722ab59cac3)
* [Migration from Dagger2 to Koin](https://proandroiddev.com/migrating-from-dagger2-to-koin-3b2b3f5285e9)
* [From Dagger to Koin, a step by step migration guide](https://medium.com/@giuliani.arnaud/the-thermosiphon-app-from-dagger-to-koin-step-by-step-a09af7f5b5b1)
Expand All @@ -197,8 +197,6 @@ class MyApplication : Application() {
* [Testing with Koin](https://proandroiddev.com/testing-with-koin-ade8a46eb4d)
* [Painless Android testing with Room & Koin](https://android.jlelse.eu/painless-android-testing-with-room-koin-bb949eefcbee)
* [Unlock your Android ViewModel power with Koin](https://medium.com/@giuliani.arnaud/unlock-your-android-viewmodel-power-with-koin-23eda8f493be)
* [Using dependency injection with Koin](https://medium.com/mindorks/using-dependency-injection-with-koin-bee0b461714a)
* [Koin + Spark = ❤️]()
* [Push SparkJava to the next level](https://medium.com/koin-developers/pushing-sparkjava-to-the-next-level-with-koin-ed1f0b80953e) ([Kotlin Weekly issue 73](http://mailchi.mp/kotlinweekly/kotlin-weekly-73), [DZone.com](https://dzone.com/articles/push-sparkjava-to-the-next-level-with-koin) )
* [When Koin met Ktor ...](https://medium.com/koin-developers/when-koin-met-ktor-c3b2395662bf) ([Kotlin Weekly issue 72](https://us12.campaign-archive.com/?u=f39692e245b94f7fb693b6d82&id=3135ae0cf5))
* [Android Dependency Injection – Why we moved from Dagger 2 to Koin?](https://www.nan-labs.com/blog/android-dependency-injection-moved-dagger-2-koin/)
Expand Down
12 changes: 0 additions & 12 deletions koin-projects/docs/reference/coverpage.md

This file was deleted.

This file was deleted.

10 changes: 0 additions & 10 deletions koin-projects/docs/reference/developer-guides/samples.md

This file was deleted.

52 changes: 26 additions & 26 deletions koin-projects/docs/reference/sidebar.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
- [Intro](introduction)
- [Setup](setup/index)
- [Koin MP - Alpha](setup/koin_mp)
- [Intro](./introduction.md)
- [Setup](./setup/index.md)
- [Koin MP - Alpha](./setup/koin_mp.md)
- **Koin Core**
- [Koin DSL](koin-core/dsl)
- [Definitions](koin-core/definitions)
- [Modules](koin-core/modules)
- [Start Koin](koin-core/start-koin)
- [Koin Component](koin-core/koin-component)
- [Injecting Parameters](koin-core/injection-parameters)
- [Setters Injection](koin-core/setters)
- [Scope API](koin-core/scopes)
- [Using Java](koin-core/java)
- [Logging](koin-core/logging)
- [Properties](koin-core/properties)
- [Experimental Features](koin-core/experimental)
- [Koin DSL](./koin-core/dsl.md)
- [Definitions](./koin-core/definitions.md)
- [Modules](./koin-core/modules.md)
- [Start Koin](./koin-core/start-koin.md)
- [Koin Component](./koin-core/koin-component.md)
- [Injecting Parameters](./koin-core/injection-parameters.md)
- [Setters Injection](./koin-core/setters.md)
- [Scope API](./koin-core/scopes.md)
- [Using Java](./koin-core/java.md)
- [Logging](./koin-core/logging.md)
- [Properties](./koin-core/properties.md)
- [Experimental Features](./koin-core/experimental.md)
- **Koin Test**
- [JUnit & Mocks](koin-test/testing)
- [CheckModules gradle Plugin](koin-test/checkmodules_plugin)
- [JUnit & Mocks](./koin-test/testing.md)
- [CheckModules gradle Plugin](./koin-test/checkmodules_plugin.md)
- **Koin Android**
- [Start on Android](koin-android/start)
- [Android DSL](koin-android/dsl)
- [Retrieve Instances](koin-android/get-instances)
- [Koin Scope](koin-android/scope)
- [ViewModel](koin-android/viewmodel)
- [Fragment Factory](koin-android/fragment-factory)
- [Work Manager](koin-android/workmanager)
- [Compose](koin-android/compose)
- [Start on Android](./koin-android/start.md)
- [Android DSL](./koin-android/dsl.md)
- [Retrieve Instances](./koin-android/get-instances.md)
- [Koin Scope](./koin-android/scope.md)
- [ViewModel](./koin-android/viewmodel.md)
- [Fragment Factory](./koin-android/fragment-factory.md)
- [Work Manager](./koin-android/workmanager.md)
- [Compose](./koin-android/compose.md)
- **Koin Ktor**
- [Injecting with Ktor](koin-ktor/ktor)
- [Injecting with Ktor](./koin-ktor/ktor.md)
- **Links**
- [Changelog](https://github.com/InsertKoinIO/koin/blob/master/CHANGELOG.md)
- [WebSite](https://insert-koin.io/)
Expand Down
12 changes: 0 additions & 12 deletions koin-projects/docs/start/coverpage.md

This file was deleted.

Loading

0 comments on commit c612943

Please sign in to comment.