Skip to content

Commit 86b52dc

Browse files
ler762geoffmcl
authored andcommitted
Is htacg#718 PR htacg#727 - Update to CONTRIBUTING.md.2.txt
Modified README/CONTRIBUTING.md
1 parent 5f7e367 commit 86b52dc

File tree

1 file changed

+24
-9
lines changed

1 file changed

+24
-9
lines changed

README/CONTRIBUTING.md

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,18 @@ So you want to contribute to Tidy? Fantastic! Here's a brief overview on how bes
66

77
If you are having trouble running console `Tidy`, or using the `LibTidy` API in your own project, then maybe the best places to get help is either via a comment in [Tidy Issues](https://github.com/htacg/tidy-html5/issues), or on the [Tidy Mail Archive](https://lists.w3.org/Archives/Public/html-tidy/) list.
88

9+
And please do a **search** using different **key** words - see [searching](https://help.github.com/articles/searching-issues-and-pull-requests/) - to make sure it is **not** a duplicate. If something similar has been discussed before, but you still feel this is **different**, then add that related reference in your post...
10+
911
In either place please start with a short subject to describe the issue. If it involves running Tidy on an html file, or if it’s an API question, make sure to include:
1012

1113
- the version: `$ tidy -v`
1214
- what was the configuration used
1315
- a small sample input
1416
- the output
15-
- the _expected_ output expected
17+
- the _expected_ output
1618
- some sample code (if an API question).
1719

18-
These data will make replication of your issue much simpler for us.
20+
This information will make replication of your issue much simpler for us.
1921

2022
If you do add sample HTML input, then it can also be very helpful if that sample **passes** the W3C [validator](https://validator.w3.org/#validate_by_upload). Tidy attempts to follow all current W3C standards.
2123

@@ -41,7 +43,7 @@ Concerning the “Tidy Code Style,” checkout [CODESTYLE.md](CODESTYLE.md), but
4143

4244
1. Fork tidy to your own github account. Use top right `Fork` icon.
4345
2. Optional: Generate a SSH Key, and add it to your `https://github.com/<name>` settings, SSH and GPG keys
44-
3. Clone your own fork - `$ git clone [email protected]:<name>/tidy-html5.git tidy-fork` Or using `https`.
46+
3. Clone your own fork - `$ git clone [email protected]:<name>/tidy-html5.git [tidy-fork]` Or using `https`.
4547
4. Create a branch - `$ cd tidy-fork; $ git checkout -b <branch-name>`
4648
5. Edit, and commit your changes to this `branch` of your fork.
4749
6. Test your changes, and if appropriate run [regression](https://github.com/htacg/tidy-html5-tests/blob/next/README/RUNTESTS.md) tests.
@@ -51,9 +53,13 @@ Concerning the “Tidy Code Style,” checkout [CODESTYLE.md](CODESTYLE.md), but
5153

5254
Item 2., SSH Key, is optional, and only required if you want to use `clone [email protected]...`. And if you generate the ssh without a `passphrase`, things like `git push` can be done without a password. Just convenience. Alternatively you can use the `HTTPS` protocol...
5355

54-
Concerning 5., editing and committing your changes, **generally** it is better to `commit` changes often, adding an appropriate commit message to each. This also aids in the PR review. But the situation varies. Like adding say an option, which can mean several files have to be edited, where it is likely appropriate to combine a considerable number of edits into one commit. There can be no hard and fast rules on this.
56+
Concerning 5., editing and committing your changes, **generally** it is better to `commit` changes often, adding an appropriate commit message to each, like `$ git commit -m "Is. #NNN - reason for change" <file[s]>`. This also aids in the **PR** review.
57+
58+
But the situation varies. Like adding say an option, which can mean several files have to be edited, where it is likely appropriate to combine a considerable number of edits into one commit. There can be no hard and fast rules on this.
5559

56-
Please note, if you want to change **multiple** things that don't depend on each other, use **different** `branches`, and make sure you check the `next` branch back out, before making more changes in a **new** branch. That way we can take in each change separately, otherwise Github will combine all your branch commits into one PR. And see below on keeping your `next` fully in sync with here - this is **important**.
60+
Please note, if you want to change **multiple** things that don't depend on each other, use **different** `branches`, and make sure you check the `next` branch back out, before making more changes in a **new** branch name. That way we can take in each **change** separately, otherwise Github will **combine** all your branch commits into one **PR**.
61+
62+
See below on keeping your forks `next` fully in sync with here, called `upstream` - **this is important**.
5763

5864
```
5965
$ git remote add upstream [email protected]:htacg/tidy-html5.git # once only
@@ -66,19 +72,28 @@ $ git stash pop # if required, and fix conflicts
6672
$ git push # update the fork next
6773
```
6874

69-
This has to be repeated for other branches, too. `$ git checkout <your-branch>`, `$ git rebase next`, fix conflict, if any, and `$ git push`, for each branch. It is not fun to keep multiple `branches` fully up-to-date with an active `upstream`...
75+
This has to be repeated for other branches, too. `$ git checkout <your-branch>`, `$ git rebase next`, fix conflict, if any, and `$ git push`, for **each** branch. It is **not** fun to keep multiple `branches` fully up-to-date with an active `upstream`...
76+
77+
Of course, the **regression** tests, 6., are really only if you have made `code` changes, but it is a good habit to get into. As can be seen the `tests` are in a **separate** repo, so you must also clone that, or **fork** and clone that, to be able to present a **PR**. This is best done in the same `root` folder where where you cloned `tidy-html5`, and your `tidy-fork`. See [RUNTESTS.md](https://github.com/htacg/tidy-html5-tests/blob/next/README/RUNTESTS.md).
7078

71-
Of course, the **regression** tests, 6., are really only if you have made `code` changes, but it is a good habit to get into. As can be seen the `tests` are in a **separate** repo, so you must also clone that. This is best done in the same `root` folder where where you cloned `tidy-html5`.
79+
In brief, for unix, to use your potentially **new** `tidy-fork` tidy executable -
7280

7381
```
7482
$ git clone [email protected]:htacg/tidy-html5-tests.git
7583
$ cd tidy-html5-tests/tools-sh
76-
$ ./testall.sh ../../tidy-html5/build/cmake/tidy
84+
$ ./testall.sh ../../tidy-fork/build/cmake/tidy
7785
$ diff -u ../cases/testbase-expects ../cases/testbase-results
7886
```
7987

80-
If the `testall.sh` shows a different exit value, or there are differences between the `expects` and `results` these **must** be studied, checked very carefully. There may be cases where the **new** `results` are correct, in which case a simultaneous PR for the tests must be created to match your source PR.
88+
Use folder `tools-cmd` for windows. Run `alltest.bat --help`.
89+
90+
If the `tests` shows a different exit value, or there are differences between the `expects` and `results`, these **must** be studied, and checked, very carefully. There may be cases where the **new** `results` are correct, in which case a simultaneous **PR** for the forked `tests` **must** be created to match your forked source **PR**.
91+
92+
Do **NOT** change either the root `version.txt` here, nor the `cases/_version.txt` in `tests`. This will be handled by the person that does the **PR** merge. To differentiate your modified `tidy` there is a cmake option, like `-DTIDY_RC_NUMBER=I123`, which will appear in `tidy -v` as `5.7.16.I123`. The number can be anything, but using the relevant issue value is a good choice.
93+
94+
Add an `issue` if you need further **help**... thanks...
8195

8296
### Help Tidy Get Better
8397

8498
It goes without saying **all help is appreciated**. We need to work together to make Tidy better!
99+

0 commit comments

Comments
 (0)