You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README/CONTRIBUTING.md
+24-9Lines changed: 24 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -6,16 +6,18 @@ So you want to contribute to Tidy? Fantastic! Here's a brief overview on how bes
6
6
7
7
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.
8
8
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
+
9
11
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:
10
12
11
13
- the version: `$ tidy -v`
12
14
- what was the configuration used
13
15
- a small sample input
14
16
- the output
15
-
- the _expected_ output expected
17
+
- the _expected_ output
16
18
- some sample code (if an API question).
17
19
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.
19
21
20
22
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.
21
23
@@ -41,7 +43,7 @@ Concerning the “Tidy Code Style,” checkout [CODESTYLE.md](CODESTYLE.md), but
41
43
42
44
1. Fork tidy to your own github account. Use top right `Fork` icon.
43
45
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`.
45
47
4. Create a branch - `$ cd tidy-fork; $ git checkout -b <branch-name>`
46
48
5. Edit, and commit your changes to this `branch` of your fork.
47
49
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
51
53
52
54
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...
53
55
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.
55
59
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**.
57
63
58
64
```
59
65
$ git remote add upstream [email protected]:htacg/tidy-html5.git # once only
@@ -66,19 +72,28 @@ $ git stash pop # if required, and fix conflicts
66
72
$ git push # update the fork next
67
73
```
68
74
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).
70
78
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 -
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...
81
95
82
96
### Help Tidy Get Better
83
97
84
98
It goes without saying **all help is appreciated**. We need to work together to make Tidy better!
0 commit comments