Skip to content

Commit a4211ec

Browse files
committed
WIP | Add CONTRIBUTING
1 parent 3cec429 commit a4211ec

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed

CONTRIBUTING.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Contributing to the PHP_CodeSniffer documentation
2+
3+
## PHP_CodeSniffer Wiki
4+
5+
For now, the documentation for the PHP_CodeSniffer project is available via the [project Wiki](https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki).
6+
7+
### Contributing to the Wiki
8+
9+
If you would like to improve the documentation:
10+
1. Fork this repo.
11+
2. Create a new branch off the `main` branch.
12+
3. Make your changes. The Wiki source files are in the `/wiki` subdirectory.
13+
4. Commit your changes with a meaningful commit message.
14+
5. Push your changes to your fork.
15+
6. Submit a pull request from your fork to this repository.
16+
17+
When in doubt, open an issue first to discuss your change proposal.
18+
19+
### How does the wiki get updated ?
20+
21+
* The source of the Wiki was imported into this repository to maintain the commit history.
22+
* A [GitHub Actions workflow](https://github.com/PHPCSStandards/PHP_CodeSniffer-documentation/blob/main/.github/workflows/publish-wiki.yml) was added to automatically push changes made in the Wiki files to the upstream Wiki repo.
23+
* Prior to pushing the changes, the workflow will make various changes to the files:
24+
* Replace `<!-- START doctoc --> <!-- END doctoc -->` placeholders with a Table of Contents for the page in Markdown.
25+
* Replace `{{ .... }}` CLI output placeholders with actual CLI output.
26+
The code samples used for this can be found in the `build/wiki/code-samples` directory.
27+
28+
### Guidelines
29+
30+
* Always use fully qualified links. This ensures that the links will work when pages are viewed/edited in this repo, as well as when the pages are viewed from the PHPCS wiki.
31+
32+
33+
### Frequently Asked Questions
34+
35+
#### Why not make the Wiki publicly editable ?
36+
37+
Publicly editable Wiki pages for big projects get vandalized pretty often and we don't want to risk this type of vandalism leading to users getting incorrect information.
38+
39+
As a secondary reason, there are parts of the wiki (especially the output examples) which were pretty out of date.
40+
By having the wiki source in this repo, it allows for automating certain updates which would otherwise have to be done manually.

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,8 @@ The intention is for that website to be a GitHub Pages/Jekyll site, but we'll ne
88
In the mean time, the documentation for the PHP_CodeSniffer project is available via the [project Wiki](https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki) and made publicly editable via this repository.
99

1010
_This is an interim solution and the intention is to eventually migrate the wiki documentation to the website._
11+
12+
13+
## Want to contribute ?
14+
15+
Have a look at the [CONTRIBUTING guide](CONTRIBUTING.md).

0 commit comments

Comments
 (0)