<scriptsrc="/js/carbon.js"async></script><titledata-rh="true">Contributing | Task</title><metadata-rh="true"name="twitter:card"content="summary_large_image"><metadata-rh="true"property="og:url"content="https://taskfile.dev/contributing/"><metadata-rh="true"name="docusaurus_locale"content="en"><metadata-rh="true"name="docsearch:language"content="en"><metadata-rh="true"name="og:image"content="https://taskfile.dev/img/og-image.png"><metadata-rh="true"name="docusaurus_version"content="current"><metadata-rh="true"name="docusaurus_tag"content="docs-default-current"><metadata-rh="true"name="docsearch:version"content="current"><metadata-rh="true"name="docsearch:docusaurus_tag"content="docs-default-current"><metadata-rh="true"property="og:title"content="Contributing | Task"><metadata-rh="true"name="description"content="Contributions to Task are very welcome, but we ask that you read this document"><metadata-rh="true"property="og:description"content="Contributions to Task are very welcome, but we ask that you read this document"><linkdata-rh="true"rel="icon"href="/img/favicon.ico"><linkdata-rh="true"rel="canonical"href="https://taskfile.dev/contributing/"><linkdata-rh="true"rel="alternate"href="https://taskfile.dev/contributing/"hreflang="en"><linkdata-rh="true"rel="alternate"href="https://taskfile.dev/contributing/"hreflang="x-default"><linkdata-rh="true"rel="preconnect"href="https://7IZIJ13AI7-dsn.algolia.net"crossorigin="anonymous"><linkrel="stylesheet"href="/assets/css/styles.098dd58a.css">
before submitting a PR.</p><h2class="anchor anchorWithStickyNavbar_mojV"id="before-you-start">Before you start<aclass="hash-link"href="#before-you-start"title="Direct link to heading"></a></h2><ul><li><strong>Check existing work</strong> - Is there an existing PR? Are there issues discussing
the feature/change you want to make? Please make sure you consider/address these
discussions in your work.</li><li><strong>Backwards compatibility</strong> - Will your change break existing Taskfiles? It is
much more likely that your change will merged if it backwards compatible. Is
there an approach you can take that maintains this compatibility? If not,
consider opening an issue first so that API changes can be discussed before you
invest you time into a PR.</li></ul><h2class="anchor anchorWithStickyNavbar_mojV"id="1-setup">1. Setup<aclass="hash-link"href="#1-setup"title="Direct link to heading"></a></h2><ul><li><strong>Go</strong> - Task is written in <ahref="https://go.dev"target="_blank"rel="noopener noreferrer">Go</a>. We always support the latest two major Go
versions, so make sure your version is recent enough.</li><li><strong>Node.js</strong> - <ahref="https://nodejs.org/en/"target="_blank"rel="noopener noreferrer">Node.js</a> is used to host Task's documentation server and is
required if you want to run this server locally.</li><li><strong>Yarn</strong> - <ahref="https://yarnpkg.com/"target="_blank"rel="noopener noreferrer">Yarn</a> is the Node.js package manager used by Task.</li></ul><h2class="anchor anchorWithStickyNavbar_mojV"id="2-making-changes">2. Making changes<aclass="hash-link"href="#2-making-changes"title="Direct link to heading"></a></h2><ul><li><strong>Code style</strong> - Try to maintain the existing code style where possible and
ensure that code is formatted by <code>gofmt</code>. We use <code>golangci-lint</code> in our CI to
enforce a consistent style and best-practise. There's a <code>lint</code> command in
the Taskfile to run this locally.</li><li><strong>Documentation</strong> - Ensure that you add/update any relevant documentation. See
the <ahref="#updating-documentation">updating documentation</a> section below.</li><li><strong>Tests</strong> - Ensure that you add/update any relevant tests and that all tests
are passing before submitting the PR. See the <ahref="#writing-tests">writing tests</a>
section below.</li></ul><h3class="anchor anchorWithStickyNavbar_mojV"id="running-your-changes">Running your changes<aclass="hash-link"href="#running-your-changes"title="Direct link to heading"></a></h3><p>To run Task with working changes, you can use <code>go run ./cmd/task</code>. To run a
development build of task against a test Taskfile in <code>testdata</code>, you can use <code>go
run ./cmd/task --dir ./testdata/<my_test_dir><task_name></code>.</p><h3class="anchor anchorWithStickyNavbar_mojV"id="updating-documentation">Updating documentation<aclass="hash-link"href="#updating-documentation"title="Direct link to heading"></a></h3><p>Task uses <ahref="https://docusaurus.io"target="_blank"rel="noopener noreferrer">Docusaurus</a> to host a documentation server. This can be setup and run
locally by using <code>task docs:setup</code> and <code>task docs:start</code> respectively (requires
<code>nodejs</code>&<code>yarn</code>). All content is written in Markdown and is located in the
<code>docs/docs</code> directory. All Markdown documents should have an 80 character line
wrap limit.</p><p>When making a change, consider whether a change to the <ahref="/usage/">Usage Guide</a>
is necessary. This document contains descriptions and examples of how to use
Task features. If you're adding a new feature, try to find an appropriate place
to add a new section. If you're updating an existing feature, ensure that the
documentation and any examples are up-to-date. Ensure that any examples follow
the <ahref="/styleguide/">Taskfile Styleguide</a>.</p><p>If you added a new command/flag, ensure that you add it to the <ahref="/api/">API
Reference</a>.</p><h3class="anchor anchorWithStickyNavbar_mojV"id="writing-tests">Writing tests<aclass="hash-link"href="#writing-tests"title="Direct link to heading"></a></h3><p>Most of Task's test are held in the <code>task_test.go</code> file in the project root and
this is where you'll most likely want to add new ones too. Most of these tests
also have a subdirectory in the <code>testdata</code> directory where any Taskfiles/data
required to run the tests are stored.</p><p>When making a changes, consider whether new tests are required. These tests
should ensure that the functionality you are adding will continue to work in the
future. Existing tests may also need updating if you have changed Task's
behaviour.</p><h2class="anchor anchorWithStickyNavbar_mojV"id="3-committing-your-code">3. Committing your code<aclass="hash-link"href="#3-committing-your-code"title="Direct link to heading"></a></h2><p>Try to write meaningful commit messages and avoid having too many commits on
the PR. Most PRs should likely have a single commit (although for bigger PRs it
may be reasonable to split it in a few). Git squash and rebase is your friend!</p><h2class="anchor anchorWithStickyNavbar_mojV"id="4-submitting-a-pr">4. Submitting a PR<aclass="hash-link"href="#4-submitting-a-pr"title="Direct link to heading"></a></h2><ul><li><strong>Describe your changes</strong> - Ensure that you provide a comprehensive
description of your changes.</li><li><strong>Issue/PR links</strong> - Link any previous work such as related issues or PRs.
Please describe how your changes differ to/extend this work.</li><li><strong>Examples</strong> - Add any examples that you think are useful to demonstrate the
effect of your changes.</li><li><strong>Draft PRs</strong> - If your changes are incomplete, but you would like to discuss
them, open the PR as a draft and add a comment to start a discussion. Using
comments rather than the PR description allows the description to be updated
later while preserving any discussions.</li></ul><h2class="anchor anchorWithStickyNavbar_mojV"id="faq">FAQ<aclass="hash-link"href="#faq"title="Direct link to heading"></a></h2><blockquote><p>I want to contribute, where do I start?</p></blockquote><p>Take a look at the list of <ahref="https://github.com/go-task/task/issues"target="_blank"rel="noopener noreferrer">open issues</a>. We have a <ahref="https://github.com/go-task/task/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22"target="_blank"rel="noopener noreferrer">good first issue</a> label for
simpler issues that are ideal for first time contributions.</p><p>All kinds of contributions are welcome, whether its a typo fix or a shiny new
feature. You can also contribute by upvoting/commenting on issues, helping to
answer questions or contributing to other <ahref="/community/">community projects</a>.</p><blockquote><p>I'm stuck, where can I get help?</p></blockquote><p>If you have questions, feel free to ask them in the <code>#help</code> channel on our