GithubHelp home page GithubHelp logo

Comments (18)

SleeplessByte avatar SleeplessByte commented on July 21, 2024 2

It's possible that an external link breaks in the time between the last master build and the PR.

TBH I don't care that much about external links at time of merge, but we should check it periodically.

from concepts.

iHiD avatar iHiD commented on July 21, 2024 2

For clarity, if someone PRs it to be better, I'll merge it :)

@ErikSchierboom - You can use -b 1 to grep to previous lines I believe (I don't understand piping really though, so it might not work in that context)

from concepts.

SaschaMann avatar SaschaMann commented on July 21, 2024 1

(sorry I clicked the wrong button)

from concepts.

SaschaMann avatar SaschaMann commented on July 21, 2024 1

We'd have to make sure we don't lose the context of the errors, i.e. the file in which the errors are contained.

The current link verifier works on individual files anyway, so that'd be doable. I'd still like to switch to a faster one anyway.

from concepts.

ErikSchierboom avatar ErikSchierboom commented on July 21, 2024

I like these ideas!

from concepts.

SleeplessByte avatar SleeplessByte commented on July 21, 2024

Perhaps the link-check run during pull requests should be limited to the files being changed? Then periodic link-checking can report on existing links that are broken, so that I don't have to address C#-related links when pushing Haskell-related documentation that has no links.

Absolutely agreed!

The files that have been changed I think come in into GH via the API.

Also, wrt. flakiness, one strategy we have at work is to run it twice and only report failure if it fails in both cases. Otherwise the amount of links added over time will make the link-check fail a linearly growing percentage of the time.

I'd hope we can just turn off absolute paths, because they shouldn't be checked imo.

from concepts.

iHiD avatar iHiD commented on July 21, 2024

I'd hope we can just turn off absolute paths, because they shouldn't be checked imo.

I'm good with this.

Then periodic link-checking can report on existing links that are broken, so that I don't have to address C#-related links when pushing Haskell-related documentation that has no links.

Master should be green, so this should never be a problem though? ie, the only errors you should see is ones that the PR introduces.

The other problem is that you might remove a file, that has links in other files pointing to it. There is lots of valuable cross-referencing.

When I scroll to the culprit on line 773 (there you are!), the failed link is this:

Can we pipe the output through a grep pattern that only shows errors? That sounds straight-forward for someone who can linux.

from concepts.

SaschaMann avatar SaschaMann commented on July 21, 2024

Master should be green, so this should never be a problem though? ie, the only errors you should see is ones that the PR introduces.

It's possible that an external link breaks in the time between the last master build and the PR.

from concepts.

SleeplessByte avatar SleeplessByte commented on July 21, 2024

Can we pipe the output through a grep pattern that only shows errors? That sounds straight-forward for someone who can linux.

Sounds like a great idea!

from concepts.

ErikSchierboom avatar ErikSchierboom commented on July 21, 2024

Can we pipe the output through a grep pattern that only shows errors? That sounds straight-forward for someone who can linux.

We'd have to make sure we don't lose the context of the errors, i.e. the file in which the errors are contained.

from concepts.

ErikSchierboom avatar ErikSchierboom commented on July 21, 2024

Ah cool, didn't know!

from concepts.

SleeplessByte avatar SleeplessByte commented on July 21, 2024

https://github.com/exercism/v3/pull/127/checks?check_run_id=393575497

Is it possible that it skips _files.md and then not allow /root/based/paths?

from concepts.

iHiD avatar iHiD commented on July 21, 2024

I'm merging #134 for now.

from concepts.

iHiD avatar iHiD commented on July 21, 2024

If someone wants to edit the OP with the tangible steps that need doing that will probably solicit fixes form the community.

from concepts.

 avatar commented on July 21, 2024

I believe this is similar to #222 (comment). It asserts markdown persisted in the repository metadata ( .git/) when it probably shouldn't.
The logic is here for future contributors:

deleted_or_renamed=$(git diff --no-commit-id --name-only --diff-filter DR origin/master | grep -i .md$ | grep -v -i _sidebar.md | grep -v -i ISSUE_TEMPLATE | wc -l)
if [ "$GITHUB_REF" = "master" ] || [ $deleted_or_renamed -ne 0 ]
then
files=$(find . -name \*.md ! -iname _sidebar.md ! -ipath \*/ISSUE_TEMPLATE/\*.md)
else
files=$(git diff --no-commit-id --name-only --diff-filter AM origin/master | grep -i .md$ | grep -v -i _sidebar.md | grep -v -i ISSUE_TEMPLATE | cat)
fi
for file in $files; do
if [ -f "$file" ]
then
markdown-link-check -q -c .github/markdown-link-check-config.json $file
fi
done

from concepts.

ErikSchierboom avatar ErikSchierboom commented on July 21, 2024

@sshine I think this issue can be closed. Correct?

from concepts.

sshine avatar sshine commented on July 21, 2024

Reading back it seems that @iHiD suggested one thing that I don't see fulfilled:

The other problem is that you might remove a file, that has links in other files pointing to it. There is lots of valuable cross-referencing.

Maybe I overlooked a detail in a PR related to this issue, and maybe this needs to be addressed elsewhere. Moving or removing files should probably trigger a repo-wide check for references to precisely those files.

If we're limited to only checking local links, then doing a repo-wide check on every PR should be equivalent to only checking affected files. It is not my impression that we have reached a consensus here?

Feel free to close this issue if the above is irrelevant or should be addressed later.

from concepts.

ErikSchierboom avatar ErikSchierboom commented on July 21, 2024

Maybe I overlooked a detail in a PR related to this issue, and maybe this needs to be addressed elsewhere. Moving or removing files should probably trigger a repo-wide check for references to precisely those files.

This is in the workflow:

deleted_or_renamed=$(git diff --no-commit-id --name-only --diff-filter DR origin/master | grep  -i .md$ | grep -v -i _sidebar.md | grep -v -i ISSUE_TEMPLATE | wc -l)
if [ "$GITHUB_REF" = "master" ] || [ $deleted_or_renamed -ne 0 ]
then
    files=$(find . -name \*.md ! -iname _sidebar.md ! -ipath \*/ISSUE_TEMPLATE/\*.md -not -path "./.git/*")
else
    files=$(git diff --no-commit-id --name-only --diff-filter AM origin/master | grep  -i .md$ | grep -v -i _sidebar.md | grep -v -i ISSUE_TEMPLATE | cat)
fi

It could of course be that this does not work.

from concepts.

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.