Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

does remark-lint require git? #8

Open
wesley-dean-flexion opened this issue Nov 7, 2019 · 2 comments
Open

does remark-lint require git? #8

wesley-dean-flexion opened this issue Nov 7, 2019 · 2 comments

Comments

@wesley-dean-flexion
Copy link

Hi. I'm trying to see what I'm doing wrong here..

I'm attempting to lint a one-off markdown file that's in a directory not managed by git. The tool finds warnings as one would expect, but it also issues an error asserting that the directory is not a part of a git repository after a failed git remote -v request.

So, question is, does remark-lint require that the directory being scanned belong to a git repository?

$ ls 
untitled.md

$ docker run --rm -i -v $PWD:/lint/input:ro zemanlx/remark-lint .
untitled.md
     1:1  error    Error: Command failed: git remote -v
fatal: not a git repository (or any parent up to mount point /lint)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

    at ChildProcess.exithandler (child_process.js:294:12)
    at ChildProcess.emit (events.js:198:13)
    at maybeClose (internal/child_process.js:982:16)
    at Socket.stream.socket.on (internal/child_process.js:389:11)
    at Socket.emit (events.js:198:13)
    at Pipe._handle.close (net.js:606:12)
   34:83  warning  Line must be at most 80 characters    maximum-line-length  remark-lint
   37:83  warning  Line must be at most 80 characters    maximum-line-length  remark-lint
   70:94  warning  Line must be at most 80 characters    maximum-line-length  remark-lint
   81:92  warning  Line must be at most 80 characters    maximum-line-length  remark-lint
  112:85  warning  Line must be at most 80 characters    maximum-line-length  remark-lint
  205:83  warning  Line must be at most 80 characters    maximum-line-length  remark-lint

7 messages (✖ 1 error, ⚠ 6 warnings)
@wesley-dean-flexion wesley-dean-flexion changed the title does remark-lint require git does remark-lint require git? Nov 7, 2019
@zemanlx
Copy link
Owner

zemanlx commented Nov 7, 2019

To be honest, I have no idea. I have never used it outside of git repo. JS is my least preferred language and I am using Docker, in this case, to make it a bit more bearable. However, to make it work in Docker it requires git as a dependency.

@achatain
Copy link

achatain commented Oct 4, 2021

@cob16 and myself bumped into a similar issue today. We fixed it by adding repository: false under the validate-links plugin config in .remarkrc.yaml, e.g.:

plugins:
  validate-links:
    repository: false

We found this option in the remark-validate-links plugin documentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants