Giter Club home page Giter Club logo

link-inspector's Introduction

Hi ๐Ÿ‘‹, I'm Justin Dhillon

A Full Stack Developer from Canada ๐Ÿ‡จ๐Ÿ‡ฆ



  • ๐ŸŽ“ University of British Columbia
  • ๐Ÿง‘โ€๐Ÿ’ป Full Stack Developer
  • ๐Ÿง Linux Enthusiast
  • ๐Ÿ“ซ Send me an Email

Connect with me

link-inspector's People

Contributors

justindhillon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

link-inspector's Issues

Test Issue

The jest test does not terminate due to asynchronous operations.

Performance Issue

This project can be slow on large projects. Right now, it checks one link at a time to prevent hitting rate limits. But there should be an option to increase the amount of links are checked at once.

False Positive on Images

The program scans images for links. Returning false positives and slowing down the program. Images should be skipped over.

Update Tests

The project has grown immensely since the original tests where written. The tests should be updated to include false positives such as placeholder urls, redirect urls, and urls deemed to be skipped.

Link that breaks the program

The link:

https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/geekan/MetaGPT

The error:

node:_http_client:183
throw new ERR_INVALID_PROTOCOL(protocol, expectedProtocol);
^

TypeError [ERR_INVALID_PROTOCOL]: Protocol "vscode:" not supported. Expected "http:"
at new ClientRequest (node:_http_client:183:11)
at Object.request (node:http:103:10)
at ne.send_request (/home/justin/Git/link-inspector/dist/index.js:24:429723)
at ClientRequest. (/home/justin/Git/link-inspector/dist/index.js:24:430695)
at Object.onceWrapper (node:events:634:26)
at ClientRequest.emit (node:events:519:28)
at HTTPParser.parserOnIncomingClient [as onIncoming] (node:_http_client:693:27)
at HTTPParser.parserOnHeadersComplete (node:_http_common:119:17)
at TLSSocket.socketOnData (node:_http_client:535:22)
at TLSSocket.emit (node:events:519:28) {
code: 'ERR_INVALID_PROTOCOL'
}

Could also show file:line, not only URL of broken link

Currently link-inspector . output shows broken links like this:

$ link-inspector .
Broken Link: https://raw.githubusercontent.com/Homebrew/install/master/install
Broken Link: https://github.com/bitcoin/bips/blob/master/bip-0040.mediawiki
Broken Link: https://github.com/Joinmarket-Org/joinmarket-clientserver/blob/master/test/ygrunner.py
...

Would be useful if it showed also file and line number where broken URL is found, otherwise I need to do extra grep -R url steps afterwards for each URL.

FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal

FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal
----- Native stack trace -----

 1: 0xde0c10 node::Abort() [node]
 2: 0xcb1f63 node::OOMErrorHandler(char const*, v8::OOMDetails const&) [node]
 3: 0x102a180 v8::api_internal::ToLocalEmpty() [node]
 4: 0xde801c  [node]
 5: 0x7fdf9ddceadd 

----- JavaScript stack trace -----

1: readFileSync (node:fs:453:20)
2: vs (/home/justin/Git/link-inspector/dist/index.js:2:1052)
3: /home/justin/Git/link-inspector/dist/index.js:13:504
4: Ir (/home/justin/Git/link-inspector/dist/index.js:13:458)
5: u (/home/justin/Git/link-inspector/dist/index.js:13:681)
6: /home/justin/Git/link-inspector/dist/index.js:13:708
7: processTicksAndRejections (node:internal/process/task_queues:95:5)


Aborted (core dumped)

This error happens when running https://github.com/ubccsss/ubccsss.org on a Intel i5-8365U with 16G of ram. This is a out of RAM error. The solution is to use pipes.

Documentation: https://nodejs.org/docs/v0.5.10/api/streams.html#stream.pipe
Stack over flow on the issue: https://stackoverflow.com/questions/7883698/node-js-is-running-out-of-memory-on-large-bit-by-bit-file-read

" + returns false positive

Summery

Many programming languages will have the url as a string and add to the url using +. We should update the regex so that urls followed by " + are skipped.

Example

string url = "https://github.com/nzgamer41/tpgamemods/raw/master/" + m.GUID + ".zip";

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.