Skip to content

Commit dd4606e

Browse files
committed
[SQUASH-ME] Add TOC to CONTRIBUTING + back to top links
1 parent ff5b599 commit dd4606e

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

CONTRIBUTING.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# Contributing to the PHP_CodeSniffer documentation
22

3+
## Table of Contents
4+
5+
* [PHP_CodeSniffer Wiki](#php_codesniffer-wiki)
6+
* [How does the wiki get updated ?](#how-does-the-wiki-get-updated-)
7+
* [Contributing to the Wiki](#contributing-to-the-wiki)
8+
* [Guidelines for updating the wiki files](#guidelines-for-updating-the-wiki-files)
9+
* [Running the pre-processing locally](#running-the-pre-processing-locally)
10+
* [Running code quality checks locally](#running-code-quality-checks-locally)
11+
* [Frequently Asked Questions](#frequently-asked-questions)
12+
* [Why not make the Wiki publicly editable ?](#why-not-make-the-wiki-publicly-editable-)
13+
14+
315
## PHP_CodeSniffer Wiki
416

517
For now, the documentation for the PHP_CodeSniffer project is available via the [project Wiki](https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki).
@@ -14,6 +26,8 @@ For now, the documentation for the PHP_CodeSniffer project is available via the
1426
* Replace `<!-- START doctoc --> <!-- END doctoc -->` placeholders with a Table of Contents for the page in Markdown.
1527
* Add a prominent (hidden) warning at the top of each wiki file to warn people against editing the wiki files via the GitHub wiki editing interface.
1628

29+
<p align="right"><a href="#table-of-contents">back to top</a></p>
30+
1731

1832
### Contributing to the Wiki
1933

@@ -31,6 +45,8 @@ If you would like to improve the documentation:
3145

3246
When in doubt, open an issue first to discuss your change proposal.
3347

48+
<p align="right"><a href="#table-of-contents">back to top</a></p>
49+
3450

3551
### Guidelines for updating the wiki files
3652

@@ -56,6 +72,8 @@ When in doubt, open an issue first to discuss your change proposal.
5672
* The command replacement will not add markdown code fence syntax, so make sure to do this yourself.
5773
* If a code sample is needed to generate the desired output, place the code sample in a file in the `build/wiki-code-samples` directory.
5874

75+
<p align="right"><a href="#table-of-contents">back to top</a></p>
76+
5977

6078
#### Running the pre-processing locally
6179

@@ -87,6 +105,8 @@ Note that this presumes the command replacer has already run and the files have
87105

88106
If you only want to test the TOC generation, make sure you copy the wiki files to the `_wiki` directory before running these commands.
89107

108+
<p align="right"><a href="#table-of-contents">back to top</a></p>
109+
90110

91111
#### Running code quality checks locally
92112

@@ -114,6 +134,8 @@ To run the quality checks locally, install the following tooling:
114134
* [Installation instructions](https://github.com/koalaman/shellcheck?tab=readme-ov-file#installing)
115135
* Run it like so: `shellcheck ./build/wiki-command-replacer.sh`
116136

137+
<p align="right"><a href="#table-of-contents">back to top</a></p>
138+
117139

118140
### Frequently Asked Questions
119141

@@ -123,3 +145,5 @@ Publicly editable Wiki pages for big projects get vandalized pretty often and we
123145

124146
As a secondary reason, there are parts of the wiki (especially the output examples), which were pretty out of date.
125147
By having the wiki source in this repository, it allows for automating certain updates which would otherwise have to be done manually.
148+
149+
<p align="right"><a href="#table-of-contents">back to top</a></p>

0 commit comments

Comments
 (0)