Pull requests

Contributing code to webhint is done using pull requests. This is
the fastest way for us to evaluate your code and to merge it into
the code base.

Please only use pull requests and don’t file issues with snippets
of code, as doing so means that we need to manually merge the changes
and update any appropriate documentation and tests. That decreases the
likelihood of your code getting included in a timely manner.

Also, before embarking on any significant pull request (e.g.
implementing features, refactoring code, porting to a different
language, etc.), make sure there is an issue that describes what
you intend to do, the issue has been accepted, and was not assigned
to anyone else.

If there is no such issue, create a new issue. If there is one that
is not assigned, leave a comment stating that you want to work on it,
and we will assign it to you.

For bug fixes, documentation changes, and other small changes, there is
no need to create an issue, and you can make the pull request.

Getting started

If you’d like to work on a pull request, and you’ve never submitted
code before, follow these steps:

The first line of the commit message (the summary) constitutes the
one-sentence description of the change. It must be 50 characters in
length or shorter, and should start with a <Tag> that is one of the
following:

Respond to comments left on the pull request from team members.
Remember, we want to help you land your code, so please be receptive
to our feedback.

We may ask you to make changes, rebase, or squash your commits.

Before doing any of the following, make sure you are on the correct
branch:

git checkout fix-1234

Updating the Commit Message

If your commit message is in the incorrect format, you’ll be asked
to update it. You can do so via:

git commit --amend

This will open up your editor so you can make changes. After that,
you’ll need to do a forced push to fork:

git push -f origin fix-1234

Updating the Code

If we ask you to make code changes, there’s no need to close the pull
request and create a new one. Make your changes, and when you’re ready,
add your changes into the branch.

git add -Agit commit --amend

Then, do a forced push to your fork (this will also update the content
of your pull request).

git push -f origin fix-1234

Rebasing

If your code is out-of-date, we might ask you to rebase. That means
we want you to apply your changes on top of the latest upstream code.
Make sure you have set up a development environment,
and then you can rebase using these commands:

git fetch upstreamgit rebase upstream/master

You might find that there are merge conflicts when you attempt to
rebase. Please resolve the conflicts
and then do a forced push to your branch: