CINXE.COM

pre-commit.ci

<!doctype html> <html> <head> <meta charset="utf-8"> <meta http-equiv="x-ua-compatible" content="ie=edge"> <title>pre-commit.ci</title> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-wEmeIV1mKuiNpC+IOBjI7aAzPcEZeedi5yW5f2yOq55WWLwNGmvvx4Um1vskeMj0" crossorigin="anonymous"> <style> a { color: #3a7db9; text-decoration: none; } a:hover { color: #343a40; text-decoration: underline; } .pc-top-shelf a { color: #f8f9fa; text-decoration: underline; } .pc-top-shelf a:hover { color: #f8f9fa; text-decoration: none; } .pc-logo { width: 5rem; height: 5rem; } h1 small, h2 small, h3 small { display: none; } h1:hover small, h2:hover small, h3:hover small { display: inline; } h2 { color: black; } footer { font-size: .825rem; } /* wrap table headers */ @media (max-width: 767.98px) { .table-bordered td:first-child { background: #eff0f2; } .table-bordered td { display: block; } } /* remove double spacing in tables */ td > :last-child { margin: 0; } pre { background-color: #f5f5f5; border: 1px solid #cfcfcf; border-radius: .25rem; padding: .5rem; } code { color: #e83e8c !important; white-space: nowrap; } .highlight .hll { background-color: #ffc; } .highlight .c { color: #008000; } /* Comment */ .highlight .err { border: 1px solid #ff0; } /* Error */ .highlight .k { color: #00f; } /* Keyword */ .highlight .cm { color: #008000; } /* Comment.Multiline */ .highlight .cp { color: #00f; } /* Comment.Preproc */ .highlight .c1 { color: #008000; } /* Comment.Single */ .highlight .cs { color: #008000; } /* Comment.Special */ .highlight .ge { font-style: italic; } /* Generic.Emph */ .highlight .gh { font-weight: bold; } /* Generic.Heading */ .highlight .gp { font-weight: bold; } /* Generic.Prompt */ .highlight .gs { font-weight: bold; } /* Generic.Strong */ .highlight .gu { font-weight: bold; } /* Generic.Subheading */ .highlight .kc { color: #00f; } /* Keyword.Constant */ .highlight .kd { color: #00f; } /* Keyword.Declaration */ .highlight .kn { color: #00f; } /* Keyword.Namespace */ .highlight .kp { color: #00f; } /* Keyword.Pseudo */ .highlight .kr { color: #00f; } /* Keyword.Reserved */ .highlight .kt { color: #2b91af; } /* Keyword.Type */ .highlight .s { color: #a31515; } /* Literal.String */ .highlight .nc { color: #2b91af; } /* Name.Class */ .highlight .ow { color: #00f; } /* Operator.Word */ .highlight .sb { color: #a31515; } /* Literal.String.Backtick */ .highlight .sc { color: #a31515; } /* Literal.String.Char */ .highlight .sd { color: #a31515; } /* Literal.String.Doc */ .highlight .s2 { color: #a31515; } /* Literal.String.Double */ .highlight .se { color: #a31515; } /* Literal.String.Escape */ .highlight .sh { color: #a31515; } /* Literal.String.Heredoc */ .highlight .si { color: #a31515; } /* Literal.String.Interpol */ .highlight .sx { color: #a31515; } /* Literal.String.Other */ .highlight .sr { color: #a31515; } /* Literal.String.Regex */ .highlight .s1 { color: #a31515; } /* Literal.String.Single */ .highlight .ss { color: #a31515; } /* Literal.String.Symbol */ .highlight .gi { color: #070; } .highlight .gd { color: #911; } </style> <meta property="og:type" content="website" /> <meta property="og:image" content="https://pre-commit.ci/img/logo.png" /> <meta property="og:image:type" content="image/png" /> <meta property="og:image:width" content="2000" /> <meta property="og:image:height" content="2000" /> <meta property="og:title" content="pre-commit.ci" /> <meta property="og:description" content="Developers spend a fair chunk of time during their development flow on fixing relatively trivial problems in their code. pre-commit.ci both enforces that these issues are discovered (which is opt-in for each developer's workflow via pre-commit) but also fixes the issues automatically, letting developers focus their time on more valuable problems." /> </head> <body class="bg-secondary"> <div class="pc-top-shelf bg-dark text-light pt-5 pb-3"> <div class="container"> <h1><img src="img/logo.svg" class="pc-logo" width="50" height="50"> pre-commit ci</h1> <h3> a continuous integration service for the <a href="https://pre-commit.com">pre-commit</a> framework </h3> </div> </div> <div class="container bg-light text-dark py-4"> <div class="alert alert-secondary"> Developers spend a fair chunk of time during their development flow on fixing relatively trivial problems in their code. <a class="alert-link" href="https://pre-commit.ci">pre-commit.ci</a> both enforces that these issues are discovered (which is opt-in for each developer's workflow via <a class="alert-link" href="https://pre-commit.com">pre-commit</a>) but also fixes the issues automatically, letting developers focus their time on more valuable problems. </div> <a class="btn btn-outline-dark btn-large m-3 py-3 px-4 fw-bold d-inline-flex justify-content-center text-decoration-none" href="https://results.pre-commit.ci/login/github"> <svg class="me-2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="24" height="24" fill="currentColor"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"></path></svg> Sign In With GitHub </a> <h2 id="features"> features <small><a href="#features" class="text-secondary">露</a></small></h2><hr class="my-3"><p><strong>supported hosting platforms:</strong> currently only <a href="https://github.com">GitHub</a> is supported, more to come in the future!</p> <p><strong>configuration:</strong> zero configuration setup -- nothing is needed beyond the <code>.pre-commit-config.yaml</code> file you already have!</p> <p><strong>auto fixing pull requests:</strong> if tools make changes to files during a pull request, pre-commit.ci will automatically fix the pull request.</p> <p>pre-commit.ci will run on all pull request commits, but will not push for commits made by bots.</p> <p><img src="img/autofix.png" alt="pre-commit.ci auto fixing a pull request" class="img-fluid img-thumbnail"></p> <p><strong>speed:</strong> much faster than comparable, free CI systems</p> <p><a href="https://github.com/pre-commit-ci-demo/demo#results"><img src="https://raw.githubusercontent.com/pre-commit-ci-demo/demo/main/img/2020-12-15_noop.svg" alt="chart comparing CI speeds" class="img-fluid img-thumbnail"></a></p> <p><strong>caching:</strong> tool caching is baked in and shared across all users. this means that the more users there are of pre-commit.ci, the more likely you will get faster builds!</p> <p><img src="img/build.png" alt="pre-commit.ci build output" class="img-fluid img-thumbnail"></p> <p><strong>automatic updates:</strong> pre-commit.ci will periodically <a href="https://pre-commit.com/#pre-commit-autoupdate">autoupdate</a> your configuration ensuring that your hook versions are kept up to date. this autoupdate is currently scheduled weekly at approximately 16:00 UTC Monday.</p> <p>here is <a href="https://github.com/asottile/pyupgrade/pull/365">an example autoupdate pull request</a>.</p> <p><img src="img/autoupdate.png" alt="pre-commit.ci auto updating a repository" class="img-fluid img-thumbnail"></p> <p><strong>re-running a pull request</strong>: you can trigger a re-run on a pull request by commenting <code>pre-commit.ci run</code> (must appear on a line by itself). alternatively, one can attach a <code>pre-commit.ci run</code> label to the pull request.</p> <p><strong>skipping push runs</strong>: skip a run by putting <code>[skip ci]</code>, <code>[ci skip]</code>, <code>[skip pre-commit.ci]</code>, or <code>[pre-commit.ci skip]</code> in the commit message.</p> <h3 id="configuration"> configuration <small><a href="#configuration" class="text-secondary">露</a></small></h3><p>pre-commit.ci is configured in <code>.pre-commit-config.yaml</code> in the <code>ci:</code> section.</p> <p><strong>note</strong>: <code>ci:</code> configuration is entirely optional and will assume the defaults below.</p> <table class="table table-bordered"><tbody><tr><td><p><a id="configuration-autofix_commit_msg" href="#configuration-autofix_commit_msg"><code>autofix_commit_msg</code></a></p> </td><td><p>(optional, default: <code>'[pre-commit.ci] auto fixes [...]'</code>) custom commit message for PR autofixes.</p> </td></tr><tr><td><p><a id="configuration-autofix_prs" href="#configuration-autofix_prs"><code>autofix_prs</code></a></p> </td><td><p>(optional, default: <code>true</code>) whether to autofix pull requests. when disabled, comment / label &quot;pre-commit.ci autofix&quot; to a pull request to manually trigger auto-fixing.</p> </td></tr><tr><td><p><a id="configuration-autoupdate_branch" href="#configuration-autoupdate_branch"><code>autoupdate_branch</code></a></p> </td><td><p>(optional: default <code>''</code>) branch to send autoupdate PRs to.</p> <p>by default, pre-commit.ci will update the default branch of the repository.</p> <p>this configuration option and other autoupdate settings will be read from the <code>.pre-commit-config.yaml</code> in the default branch of the repository.</p> </td></tr><tr><td><p><a id="configuration-autoupdate_commit_msg" href="#configuration-autoupdate_commit_msg"><code>autoupdate_commit_msg</code></a></p> </td><td><p>(optional, default: <code>'[pre-commit.ci] pre-commit autoupdate'</code>) custom commit message for autoupdate PRs.</p> </td></tr><tr><td><p><a id="configuration-autoupdate_schedule" href="#configuration-autoupdate_schedule"><code>autoupdate_schedule</code></a></p> </td><td><p>(optional, default: <code>'weekly'</code>) control when the autoupdate runs, possible values: <code>'weekly'</code>, <code>'monthly'</code>, <code>'quarterly'</code>.</p> </td></tr><tr><td><p><a id="configuration-skip" href="#configuration-skip"><code>skip</code></a></p> </td><td><p>(optional, default: <code>[]</code>) a list of hook ids to skip only in pre-commit.ci</p> <p>for example:</p> <div class="highlight yaml"><pre><span></span><span class="nt">ci</span><span class="p">:</span> <span class="w"> </span><span class="nt">skip</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">[</span><span class="nv">pylint</span><span class="p p-Indicator">]</span> <span class="nt">repos</span><span class="p">:</span> <span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">repo</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">local</span> <span class="w"> </span><span class="nt">hooks</span><span class="p">:</span> <span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">id</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">pylint</span> <span class="w"> </span><span class="c1"># ...</span> </pre></div> <p>this is equivalent to running <a href="https://pre-commit.com/#temporarily-disabling-hooks"><code>SKIP=pylint pre-commit ...</code></a></p> </td></tr><tr><td><p><a id="configuration-submodules" href="#configuration-submodules"><code>submodules</code></a></p> </td><td><p>(optional, default: <code>false</code>) whether to recursively check out submodules</p> </td></tr></tbody></table><p>a full config with all the defaults:</p> <div class="highlight yaml"><pre><span></span><span class="nt">ci</span><span class="p">:</span> <span class="w"> </span><span class="nt">autofix_commit_msg</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">|</span> <span class="w"> </span><span class="no">[pre-commit.ci] auto fixes from pre-commit.com hooks</span> <span class="w"> </span><span class="no">for more information, see https://pre-commit.ci</span> <span class="w"> </span><span class="nt">autofix_prs</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span> <span class="w"> </span><span class="nt">autoupdate_branch</span><span class="p">:</span><span class="w"> </span><span class="s">&#39;&#39;</span> <span class="w"> </span><span class="nt">autoupdate_commit_msg</span><span class="p">:</span><span class="w"> </span><span class="s">&#39;[pre-commit.ci]</span><span class="nv"> </span><span class="s">pre-commit</span><span class="nv"> </span><span class="s">autoupdate&#39;</span> <span class="w"> </span><span class="nt">autoupdate_schedule</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">weekly</span> <span class="w"> </span><span class="nt">skip</span><span class="p">:</span><span class="w"> </span><span class="p p-Indicator">[]</span> <span class="w"> </span><span class="nt">submodules</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">false</span> </pre></div> <h2 id="alternative-using-github-actions"> alternative using github actions <small><a href="#alternative-using-github-actions" class="text-secondary">露</a></small></h2><hr class="my-3"><p>pre-commit.ci also provides a <a href="./lite.html">lite version</a> which adds auto fixing to GitHub actions.</p> <h2 id="pricing"> pricing <small><a href="#pricing" class="text-secondary">露</a></small></h2><hr class="my-3"><p>pre-commit.ci will always be <strong>free for open source repositories</strong>.</p> <p>all paid plans also include <a href="https://pre-commit.ci/lite">pre-commit.ci lite</a> pro at no additional cost.</p> <p>for private and organization repository support see the <a href="https://github.com/marketplace/pre-commit-ci">GitHub Marketplace</a>.</p> <p>for single-tenant or larger installations, contact <a href="/cdn-cgi/l/email-protection#264f484049665654430b45494b4b4f5208454f"><span class="__cf_email__" data-cfemail="5930373f3619292b3c743a363434302d773a30">[email&#160;protected]</span></a>.</p> <h2 id="following-the-development"> following the development <small><a href="#following-the-development" class="text-secondary">露</a></small></h2><hr class="my-3"><ul> <li>development is streamed on <a href="https://twitch.tv/anthonywritescode">twitch</a></li> <li>follow the <a href="https://groups.google.com/g/pre-commit-ci">mailing list</a> for high level updates</li> </ul> <h2 id="sponsoring"> sponsoring <small><a href="#sponsoring" class="text-secondary">露</a></small></h2><hr class="my-3"><p>if you'd like to support the development there are two ways to sponsor:</p> <ul> <li><a href="https://github.com/sponsors/asottile">github sponsors</a></li> <li><a href="https://opencollective.com/pre-commit">open collective</a></li> </ul> </div> <footer class="container text-light text-center p-2"> &copy; pre-commit.ci &nbsp;&middot;&nbsp; <a class="text-light" href="/cdn-cgi/l/email-protection#caa3a4aca58abab8afe7a9a5a7a7a3bee4a9a3">contact</a> &nbsp;&middot;&nbsp; <a class="text-light" href="/cdn-cgi/l/email-protection#d7a4b2b4a2a5bea3ae97a7a5b2fab4b8bababea3f9b4be">security</a> &nbsp;&middot;&nbsp; <a class="text-light" href="https://pre-commit.ci/privacy_policy.html">privacy policy</a> &nbsp;&middot;&nbsp; <a class="text-light" href="https://pre-commit.ci/cookie_notice.html">cookie notice</a> &nbsp;&middot;&nbsp; <a class="text-light" href="https://github.com/pre-commit-ci/issues">issues</a> </footer> <script data-cfasync="false" src="/cdn-cgi/scripts/5c5dd728/cloudflare-static/email-decode.min.js"></script></body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10