-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Pull #13176: Fail linkcheck on internal broken site link #13176
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
Conversation
@rnveach @nrmancuso @romani We need this to make the linkcheck job work as we want - catch broken links between site pages. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please test/show failure in CI. grep
with expression behavior varies between OSs.
@nrmancuso https://app.circleci.com/pipelines/github/checkstyle/checkstyle/18778/workflows/49905029-0d70-42cf-b1c6-4c69d50f6a78/jobs/302519?invite=true#step-103-1683
Uhh, that's different. Shall I just make an exclusion list for those and open an issue to deal with later? The |
@stoyanK7 i am not sure that I understand what’s going on here. Was CI green until we added one bad link, then we got 1306 unexpected failures? |
@nrmancuso Those failures were always present in the report if you check it at |
Then I don’t understand
|
@nrmancuso Just checked. I didn't see these errors from the script locally because I had excluded checks in This is what I had done locally. $ gd
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
modified: pom.xml
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
@ pom.xml:1955 @
-->
<excludedPages>
<excludedPage>dependencies.html</excludedPage>
+ <excludedPage>apidocs/**</excludedPage>
<excludedPage>jacoco/**</excludedPage>
<excludedPage>dsm/**</excludedPage>
<excludedPage>xref/**</excludedPage>
@ pom.xml:1972 @
<excludedHttpStatusError>401</excludedHttpStatusError>
</excludedHttpStatusErrors>
<excludedLinks>
+ <excludedLink>apidocs</excludedLink>
<excludedLink>reports/google-style/guava</excludedLink>
<excludedLink>reports/javadoc/openjdk8</excludedLink>
<!-- posting to the mailing list "checkstyle-announce" is private -->
|
We have to suppress those for now. |
Please do, make sure we have |
This looks better:
|
.ci/run-link-check-plugin.sh
Outdated
RESULT=$(diff -y --suppress-common-lines config/linkcheck-suppressions.txt \ | ||
.ci-temp/linkcheck-errors-sorted.txt | wc -l) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Taken from https://stackoverflow.com/a/48287203/9553927
diff
can do all the first part of the job but no counting;wc
-l does the rest:
If someone was wondering:
-y
is a shorthand for--side-by-side
, which outputs the files in two columns.
I believe this is the failure of semaphore(I still have no access to logs):
|
I have PR opened at #13201 for this |
Please use PR number instead of minor, it is not minor update. |
Done. |
@stoyanK7 please make CI happy, linkcheck is failing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Items:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last item from me:
I fixed a missed broken link from split #13103 |
Please fix CI
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am good as CI passes.
@romani This one is good to go. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok to merge
Extends script to fail on broken links between xdocs.
EDIT: I had excluded any checks in and to
apidocs/
when I ran those scripts. Therefore some 1300 errors that were present before do not show.I broke two links before running the experiments below.
Before changes
The script greps
externalLink
, finds broken external link to oracle but not the internal one.In the report the 2 errors are shown.

After changes