-
Notifications
You must be signed in to change notification settings - Fork 2
Description
What the rule should do:
Forbid links to resources on the master branch, for resources hosted on GitHub. These links should be reported in module documentation and in the README
What problems does it solve:
I often see READMEs containing an image stored on the master branch to something like
https://raw.githubusercontent.com/jfmengels/elm-review/master/documentation/images/elm-review-report-hq.png
The problem with that is that if that images is ever changed/moved/removed on the master branch, then the image will disappear from the documentation.
If instead, we made the link point to an image hosted in a Git tag or a SHA, then the image would stay there forever, like
https://raw.githubusercontent.com/jfmengels/elm-review/2.0.1/documentation/images/elm-review-report-hq.png
I think we can apply this to other resources, like Markdown or any kind of files hosted on GitHub (through raw.githubusercontent.com or github.com (like https://github.com/jfmengels/elm-review/blob/master/documentation/images/elm-review-report-hq.png)
Example of things the rule would report:
{-|

-}Example of things the rule would not report:
{-|

-}When (not) to enable this rule:
I am looking for:
- Feedback: The problem will be for resources not yet published. Ideally we want to use a Git tag as the reference, but before you release the first version with that image, you will likely have to use a Git SHA or something. Do you see better solutions to that?
- A good rule name
- Someone to implement it (I can provide help and guidance)