jfmengels / elm-review-documentation / Docs.UpToDateReadmeLinks

rule : Review.Rule.Rule

Reports links in the README.md that point to this project's package documentation on https://package.elm-lang.org/, where the version is set to latest or a different version than the current version of the package.

🔧 Running with --fix will automatically remove all the reported errors.

config =
    [ Docs.UpToDateReadmeLinks.rule
    ]

The problem with linking to latest is that if you release a new version later, the users who read the README for the older version will be directed to a version where the module/function/section you pointed to may not exist anymore.

This rule ensures that you always use the correct version in all of your releases, and that you do not forget to update the links.

This rule provides automatic fixes, so you won't to do the tedious job of updating the links yourself.

NOTE: Just make sure to run tests between bumping the version of the package and publishing the package. Otherwise the link for a given version could link to a previous one.

NOTE: A similar rule would be useful for links inside the modules. I'll be working on that too!

Try it out

You can try this rule out by running the following command:

elm-review --template jfmengels/elm-review-documentation/example --rules Docs.UpToDateReadmeLinks