sindresorhus / awesome-lint

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

False-positive errors: invalid URL, awesome-git-repo-age, no-defined-references, no-repeat-punctuation, invalid git repository. #191

Open wongyah opened 4 months ago

wongyah commented 4 months ago

Error message

After running awesome-lint on my repo Awesome Technical Writing Learning, I got the following error messages:

C:\Users\Administrator>npx awesome-lint https://github.com/wongyah/awesome-technical-writing-learning
× Linting

  README.md:6:3ed with exit code 128: git clone --depth 1 -- https://github.com/wongyah/awesome-technical-writing-learni  ×    1:1   Invalid URL                                         remark-lint:double-link
  ×    1:1   Git repository must be at least 30 days old         remark-lint:awesome-git-repo-age
  ×    1:1   Awesome list must reside in a valid git repository  remark-lint:awesome-githubiled to connect to github.co  ×    6:3   Found reference to undefined definition             remark-lint:no-undefined-references
  ×    9:3   Found reference to undefined definition             remark-lint:no-undefined-references
  ×   54:11  Should not repeat "."                               remark-lint:no-repeat-punctuationng
  ×   54:12  Should not repeat "."                               remark-lint:no-repeat-punctuation
  ×  222:3   Found reference to undefined definition             remark-lint:no-undefined-references
  ×  256:39  Should not repeat "."                               remark-lint:no-repeat-punctuation
  ×  256:40  Should not repeat "."                               remark-lint:no-repeat-punctuation

  10 errors

Summary

There are five kinds of false-positive errors above:

Invalid URL

Repository URL: https://github.com/wongyah/awesome-technical-writing-learning.

Repo age

my-repo-age

Invalid git repository

em ...

Undefined definition

Github alerts syntax was detected as undefined definitions.

> [!TIP] 
> All resources in this curated list are free, unless otherwise noted.

Repeated punctuation

All the ellipsises (...) are detected as repeated dots.

But wait ..., you still need to ...

[Everything You Want to Know about ...](https://learn.microsoft.com/en-us/powershell/scripting/learn/deep-dives/everything-about-arrays?view=powershell-7.4)
wongyah commented 4 months ago

I followed @tapyu's suggestion to run awesome-lint again within the local git directory. The invalid URL and invalid repo errors weren't thrown again. But the other errors are still there:

S E:\Site-and-Repos\wyRepos\awesome-technical-writing-learning> npx awesome-lint https://github.com/wongyah/awesome-technical-writing-learning
✖ Linting

  README.md:6:3
  ✖    1:1   Git repository must be at least 30 days old  remark-lint:awesome-git-repo-age   
  ✖    6:3   Found reference to undefined definition      remark-lint:no-undefined-references
  ✖    9:3   Found reference to undefined definition      remark-lint:no-undefined-references
  ✖  127:3   https://code.visualstudio.com/               remark-lint:double-link
  ✖  161:3   https://code.visualstudio.com/               remark-lint:double-link
  ✖  237:3   Found reference to undefined definition      remark-lint:no-undefined-references
  ✖  271:39  Should not repeat "."                        remark-lint:no-repeat-punctuation  
  ✖  271:40  Should not repeat "."                        remark-lint:no-repeat-punctuation  

  8 errors

Errors

Repo age

Undefined definition

Github alerts syntax was detected as undefined definitions.

> [!TIP] 
> All resources in this curated list are free, unless otherwise noted.

Repeated punctuation

All the ellipsises (...) are detected as repeated dots.

[Everything You Want to Know about ...](https://learn.microsoft.com/en-us/powershell/scripting/learn/deep-dives/everything-about-arrays?view=powershell-7.4)
wongyah commented 4 months ago

I replaced ... with html entity …, then the repeated punctuation error is gone.

I still got 3 kinds of errors:

Double links

### Markdown

- [Visual Studio Code (VS Code)](https://code.visualstudio.com/)
    - Extension A 
    - Extension B

### reStructuredText

- [Visual Studio Code (VS Code)](https://code.visualstudio.com/)
    - Extension E
    - Extension F

If remove one of the VS Code link, one of the lists will be incomplete.

batrdn commented 4 months ago

The issue regarding repo age may be due to this reason

wongyah commented 4 months ago

@batrdn The readme.md file was updated 3 weeks ago, but it was created 4 months ago. It is the first file created in the repository.

I ever removed several commits using git commands and force push to the GitHub repository. Maybe these operations caused the awesome-git-repo-age error.

batrdn commented 4 months ago

@wongyah ahh I see, then probably has nothing to do with it.