Skip to content

Commit

Permalink
Issue checkstyle#13059: Broken Link: Github search links are broken i…
Browse files Browse the repository at this point in the history
…n documentation
  • Loading branch information
shamithDI committed May 23, 2023
1 parent 1af308f commit 352ae42
Show file tree
Hide file tree
Showing 20 changed files with 766 additions and 766 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1349,8 +1349,8 @@ private static void validateViolationSection(String fileName, String sectionName
expectedUrl = "https://github.com/search?q="
+ "path%3Asrc%2Fmain%2Fresources%2F"
+ clss.getPackage().getName().replace(".", "%2F")
+ "+filename%3Amessages*.properties+repo%3Acheckstyle%2Fcheckstyle+%22"
+ linkText + "%22";
+ "%20path%3A**%2Fmessages*.properties+repo%3Acheckstyle%2F"
+ "checkstyle+%22"+ linkText + "%22";
}

assertWithMessage(fileName + " section '" + sectionName
Expand Down Expand Up @@ -1382,13 +1382,13 @@ private static void validateUsageExample(String fileName, String sectionName, No
if ("Checkstyle Style".equals(linkText)) {
hasCheckstyle = true;
expectedUrl = "https://github.com/search?q="
+ "path%3Aconfig+filename%3Acheckstyle-checks.xml+"
+ "path%3Aconfig%20path%3A**%2Fcheckstyle-checks.xml+"
+ "repo%3Acheckstyle%2Fcheckstyle+" + sectionName;
}
else if ("Google Style".equals(linkText)) {
hasGoogle = true;
expectedUrl = "https://github.com/search?q="
+ "path%3Asrc%2Fmain%2Fresources+filename%3Agoogle_checks.xml+"
+ "path%3Asrc%2Fmain%2Fresources%20path%3A**%2Fgoogle_checks.xml+"
+ "repo%3Acheckstyle%2Fcheckstyle+"
+ sectionName;

Expand All @@ -1400,7 +1400,7 @@ else if ("Google Style".equals(linkText)) {
else if ("Sun Style".equals(linkText)) {
hasSun = true;
expectedUrl = "https://github.com/search?q="
+ "path%3Asrc%2Fmain%2Fresources+filename%3Asun_checks.xml+"
+ "path%3Asrc%2Fmain%2Fresources%20path%3A**%2Fsun_checks.xml+"
+ "repo%3Acheckstyle%2Fcheckstyle+"
+ sectionName;

Expand Down Expand Up @@ -1691,7 +1691,7 @@ private static void validateStyleModules(Set<Node> checks, Set<Node> configs,

if ("config".equals(configName)) {
final String expectedUrl = "https://github.com/search?q="
+ "path%3Asrc%2Fmain%2Fresources+filename%3A" + styleName
+ "path%3Asrc%2Fmain%2Fresources%20path%3A**%2F" + styleName
+ "_checks.xml+repo%3Acheckstyle%2Fcheckstyle+" + moduleName;

assertWithMessage(styleName + "_style.xml rule '" + ruleName + "' module '"
Expand Down
12 changes: 6 additions & 6 deletions src/xdocs/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -485,15 +485,15 @@
<subsection name="Example of Usage" id="Checker_Example_of_Usage">
<ul>
<li>
<a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources+filename%3Agoogle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+Checker">
<a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%20path%3A**%2Fgoogle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+Checker">
Google Style</a>
</li>
<li>
<a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources+filename%3Asun_checks.xml+repo%3Acheckstyle%2Fcheckstyle+Checker">
<a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%20path%3A**%2Fsun_checks.xml+repo%3Acheckstyle%2Fcheckstyle+Checker">
Sun Style</a>
</li>
<li>
<a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle-checks.xml+repo%3Acheckstyle%2Fcheckstyle+Checker">
<a href="https://github.com/search?q=path%3Aconfig%20path%3A**%2Fcheckstyle-checks.xml+repo%3Acheckstyle%2Fcheckstyle+Checker">
Checkstyle Style</a>
</li>
</ul>
Expand Down Expand Up @@ -605,15 +605,15 @@
<subsection name="Example of Usage" id="TreeWalker_Example_of_Usage">
<ul>
<li>
<a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources+filename%3Agoogle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+TreeWalker">
<a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%20path%3A**%2Fgoogle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+TreeWalker">
Google Style</a>
</li>
<li>
<a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources+filename%3Asun_checks.xml+repo%3Acheckstyle%2Fcheckstyle+TreeWalker">
<a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%20path%3A**%2Fsun_checks.xml+repo%3Acheckstyle%2Fcheckstyle+TreeWalker">
Sun Style</a>
</li>
<li>
<a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle-checks.xml+repo%3Acheckstyle%2Fcheckstyle+TreeWalker">
<a href="https://github.com/search?q=path%3Aconfig%20path%3A**%2Fcheckstyle-checks.xml+repo%3Acheckstyle%2Fcheckstyle+TreeWalker">
Checkstyle Style</a>
</li>
</ul>
Expand Down

0 comments on commit 352ae42

Please sign in to comment.