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

Run url script in all directories #6082

Closed

Conversation

NotMyFault
Copy link
Member

ref #6081 (comment)

Untested, I expect this to fail.

@zbynek
Copy link
Contributor

zbynek commented Feb 26, 2023

EDIT: There best pathspec I could find was

git grep -l https://www.jenkins.io -- 'content/*.adoc'

which finds 48 files.

@NotMyFault
Copy link
Member Author

EDIT: There best pathspec I could find was

git grep -l https://www.jenkins.io -- 'content/*.adoc'

which finds 48 files.

Ye, anything browsing subdirectories works. I just chose the easiest path because I want to get an exhaustive list of all occasions this script covers. We surely can adjust it, thanks for sharing :)

Copy link
Contributor

@zbynek zbynek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use the simpler pathspec to find more files.

scripts/check-hard-coded-URL-references Outdated Show resolved Hide resolved
scripts/check-hard-coded-URL-references Outdated Show resolved Hide resolved
@zbynek
Copy link
Contributor

zbynek commented Feb 26, 2023

sorry, the apostrophes matter

@NotMyFault
Copy link
Member Author

sorry, the apostrophes matter

I noticed, rip.

Running this version outputs the same results I used for my other PR.

kmartens27 pushed a commit that referenced this pull request Feb 27, 2023
This PR is generated based on the results in
#6082.

I decided to file a dedicated PR because there are failures left, e.g.,
when URLs are used in documentation or comments. These spots need to be
addressed separately.
@NotMyFault
Copy link
Member Author

The following entries are left:

➜  jenkins.io git:(master) ✗ ./scripts/check-hard-coded-URL-references
ERROR: incorrectly used https://www.jenkins.io in content/_data/upgrades/2-303-3.adoc
content/doc/book/security/controller-isolation/required-role-check.adoc
content/doc/developer/handling-requests/actions.adoc
content/doc/developer/handling-requests/stapler-accessible-type.adoc
content/doc/developer/security/scan.adoc
content/doc/developer/tutorial-improve/add-a-link-to-report-an-issue.adoc

See https://github.com/jenkins-infra/jenkins.io/issues/5718
See also https://github.com/jenkins-infra/jenkins.io/pull/5715

ERROR: incorrectly used https://jenkins.io in content/_data/upgrades/2-138-4.adoc
content/_data/upgrades/2-176-2.adoc
content/blog/2016/2016-05-10-jenkins-20-vjam.adoc
content/blog/2017/01/2017-01-19-converting-conditional-to-pipeline.adoc
content/blog/2017/04/2017-04-27-columbia.adoc
content/blog/2018/01/2018-01-13-jep-200.adoc
content/blog/2018/03/2018-03-15-jep-200-lts.adoc
content/blog/2019/02/2019-02-06-ssh-steps-for-jenkins-pipeline.adoc
content/blog/2020/01/2020-01-29-gsoc-report.adoc
content/blog/2020/03/2020-03-02-pipeline-authoring-sig-update.adoc
content/doc/book/managing/system-properties.adoc
content/doc/developer/extensibility/serialization-of-anonymous-classes.adoc
content/doc/developer/handling-requests/deprecated-reflective-access.adoc
content/doc/developer/security/xss-prevention.adoc
content/projects/advocacy-and-outreach/outreach-programs.adoc
content/projects/blueocean/roadmap/index.adoc
content/projects/gsoc/2021/projects/remoting-monitoring.adoc
content/projects/gsoc/2022/application.adoc

The common cases are redirects, documentation purposes, examples, or other cases where an absolute URL is necessary. Can (and should) we exempt them, somehow?

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

Successfully merging this pull request may close these issues.

2 participants