Coder Social home page Coder Social logo

Comments (6)

maxwondercorn avatar maxwondercorn commented on August 30, 2024

I've run into a quandary with checking broken links. There is one link that will always fail in CI and that is http://localhost:4200. The linter has no method for whitelisting or excluding urls to check.

By default Remark only issues warnings, so the current lint process doesn't throw an error if the linter finds anything. If we markdown lint errors we were't catching them in CI. Remark will trigger an error if the --frail option is used.

Normally, I'd say we should trigger an error to catch issues before accepting a change. In this case, we'd never pass CI because of the "dead" localhost link.

I see a few options here:

  • Change the guide writing-addons/intro-tutorial.md to not have the link. Not the best idea because it adds value to the guide
  • Ask contributors to have a clean lint and maintainers review the Travis log as part of the review process. Not hard to do but does add burden to the maintainers
  • I'm going to raise an issue in the plugin's repo to see if exclusions can be added. I've looked at all the dependencies down to the module that does the checking - no exclusion options
  • other options?

There may be some method to stub this but I'm a neophyte when it comes to travis-ci

In any case, we should add something to CONTRIBUTING.md asking contributors to run the listing tests and clean up the warnings before submitting a PR. I'll add something when I have a PR.

from cli-guides.

mansona avatar mansona commented on August 30, 2024

@maxwondercorn the alternative is that we could do the link checking ourselves 🤔 We're already checking internal links with the guidemaker link checker (which is essentially just a port of @jenweber's link-checking code on the Ember Guides)

We could expand that link checker to also check outbound links 🤔 What kinds of links are we looking to check exactly? do we have an example of something that was broken and should have been caught in CI?

from cli-guides.

maxwondercorn avatar maxwondercorn commented on August 30, 2024

@mansona The existing checks in node-tests are only for relative links in the markdown. The link checker I'm referring to will catch outbound links as you indicated.

You gave me an idea 🤔 I can add a script command just to lint dead links. It can be manually run as needed. We can have the other linting generate errors to catch inconsistencies.

from cli-guides.

jenweber avatar jenweber commented on August 30, 2024

I think remark would prob welcome the whitelisting PR. The remark ecosystem is on the upswing and I know one of the maintainers.

from cli-guides.

maxwondercorn avatar maxwondercorn commented on August 30, 2024

PR #79 closed per discussion about dead link checking - needs to be automated from day one.

from cli-guides.

mehulkar avatar mehulkar commented on August 30, 2024

@jenweber @locks I think this can be closed. npm run test:node checks for broken links using guidemaker, from what I can tell

from cli-guides.

Related Issues (20)

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.