sindresorhus / awesome-lint

Linter for Awesome lists
MIT License
600 stars 56 forks source link

`remark-lint:awesome-github` gives false negative when remote name is not `origin` #169

Closed hyperupcall closed 11 months ago

hyperupcall commented 11 months ago

awesome-lint fails on the following remote configuration:

$ git remote -v
me      https://github.com/hyperupcall/awesome-mastodon (fetch)
me      https://github.com/hyperupcall/awesome-mastodon (push)

This is because the command git remote get-url --push origin is ran under the hood. The assumption that origin is the remote name does not always hold true. My changes fix that.

Before

$ awesome-lint
✖ Linting

  README.md:1:1
  ✖  1:1  Awesome list must reside in a valid git repository  remark-lint:awesome-github

  1 error

After

$ awesome-lint
✔ Linting