diff options
Diffstat (limited to '0.19.x/rules/user_defined_rules/index.html')
-rw-r--r-- | 0.19.x/rules/user_defined_rules/index.html | 1308 |
1 files changed, 0 insertions, 1308 deletions
diff --git a/0.19.x/rules/user_defined_rules/index.html b/0.19.x/rules/user_defined_rules/index.html deleted file mode 100644 index b377f8e..0000000 --- a/0.19.x/rules/user_defined_rules/index.html +++ /dev/null @@ -1,1308 +0,0 @@ - -<!doctype html> -<html lang="en" class="no-js"> - <head> - - <meta charset="utf-8"> - <meta name="viewport" content="width=device-width,initial-scale=1"> - - <meta name="description" content="Linting for your git commit messages"> - - - - <link rel="canonical" href="https://jorisroovers.github.io/gitlint/0.19.x/rules/user_defined_rules/"> - - - <link rel="prev" href="../named_rules/"> - - - <link rel="next" href="line_and_commit_rules/"> - - <link rel="icon" href="../../assets/images/favicon.png"> - <meta name="generator" content="mkdocs-1.4.3, mkdocs-material-9.1.9"> - - - - <title>User Defined Rules - Gitlint</title> - - - - <link rel="stylesheet" href="../../assets/stylesheets/main.85bb2934.min.css"> - - - <link rel="stylesheet" href="../../assets/stylesheets/palette.a6bdf11c.min.css"> - - - - - - - - - - <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> - <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,700,700i%7CRoboto+Mono:400,400i,700,700i&display=fallback"> - <style>:root{--md-text-font:"Roboto";--md-code-font:"Roboto Mono"}</style> - - - - <link rel="stylesheet" href="../../stylesheets/termynal.css"> - - <link rel="stylesheet" href="../../stylesheets/extra.css"> - - <script>__md_scope=new URL("../..",location),__md_hash=e=>[...e].reduce((e,_)=>(e<<5)-e+_.charCodeAt(0),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script> - - - - - - - </head> - - - - - - - - - - <body dir="ltr" data-md-color-scheme="default" data-md-color-primary="indigo" data-md-color-accent="indigo"> - - - - <script>var palette=__md_get("__palette");if(palette&&"object"==typeof palette.color)for(var key of Object.keys(palette.color))document.body.setAttribute("data-md-color-"+key,palette.color[key])</script> - - <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> - <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off"> - <label class="md-overlay" for="__drawer"></label> - <div data-md-component="skip"> - - - <a href="#user-defined-rules" class="md-skip"> - Skip to content - </a> - - </div> - <div data-md-component="announce"> - - </div> - - <div data-md-color-scheme="default" data-md-component="outdated" hidden> - - </div> - - - - - - -<header class="md-header md-header--shadow md-header--lifted" data-md-component="header"> - <nav class="md-header__inner md-grid" aria-label="Header"> - <a href="../.." title="Gitlint" class="md-header__button md-logo" aria-label="Gitlint" data-md-component="logo"> - - - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54Z"/></svg> - - </a> - <label class="md-header__button md-icon" for="__drawer"> - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2Z"/></svg> - </label> - <div class="md-header__title" data-md-component="header-title"> - <div class="md-header__ellipsis"> - <div class="md-header__topic"> - <span class="md-ellipsis"> - Gitlint - </span> - </div> - <div class="md-header__topic" data-md-component="header-topic"> - <span class="md-ellipsis"> - - User Defined Rules - - </span> - </div> - </div> - </div> - - - <form class="md-header__option" data-md-component="palette"> - - - - - <input class="md-option" data-md-color-media="(prefers-color-scheme: light)" data-md-color-scheme="default" data-md-color-primary="indigo" data-md-color-accent="indigo" aria-label="Switch to dark mode" type="radio" name="__palette" id="__palette_1"> - - <label class="md-header__button md-icon" title="Switch to dark mode" for="__palette_2" hidden> - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a4 4 0 0 0-4 4 4 4 0 0 0 4 4 4 4 0 0 0 4-4 4 4 0 0 0-4-4m0 10a6 6 0 0 1-6-6 6 6 0 0 1 6-6 6 6 0 0 1 6 6 6 6 0 0 1-6 6m8-9.31V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12 20 8.69Z"/></svg> - </label> - - - - - - <input class="md-option" data-md-color-media="(prefers-color-scheme: dark)" data-md-color-scheme="slate" data-md-color-primary="indigo" data-md-color-accent="indigo" aria-label="Switch to light mode" type="radio" name="__palette" id="__palette_2"> - - <label class="md-header__button md-icon" title="Switch to light mode" for="__palette_1" hidden> - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 18c-.89 0-1.74-.2-2.5-.55C11.56 16.5 13 14.42 13 12c0-2.42-1.44-4.5-3.5-5.45C10.26 6.2 11.11 6 12 6a6 6 0 0 1 6 6 6 6 0 0 1-6 6m8-9.31V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12 20 8.69Z"/></svg> - </label> - - - </form> - - - - - - <div class="md-header__source"> - <a href="https://github.com/jorisroovers/gitlint" title="Go to repository" class="md-source" data-md-component="source"> - <div class="md-source__icon md-icon"> - - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><!--! Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2023 Fonticons, Inc.--><path d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"/></svg> - </div> - <div class="md-source__repository"> - jorisroovers/gitlint - </div> -</a> - </div> - - </nav> - - - -<nav class="md-tabs" aria-label="Tabs" data-md-component="tabs"> - <div class="md-grid"> - <ul class="md-tabs__list"> - - - - - - - - - - <li class="md-tabs__item"> - <a href="../.." class="md-tabs__link"> - Home - </a> - </li> - - - - - - - - - - - - <li class="md-tabs__item"> - <a href="../../configuration/" class="md-tabs__link"> - Configuration - </a> - </li> - - - - - - - - - - - - - - <li class="md-tabs__item"> - <a href="../" class="md-tabs__link md-tabs__link--active"> - Rules - </a> - </li> - - - - - - - - - - - - <li class="md-tabs__item"> - <a href="../../contributing/" class="md-tabs__link"> - Contributing - </a> - </li> - - - - - - - - - <li class="md-tabs__item"> - <a href="https://github.com/jorisroovers/gitlint/blob/main/CHANGELOG.md" class="md-tabs__link"> - Changelog - </a> - </li> - - - </ul> - </div> -</nav> - - -</header> - - <div class="md-container" data-md-component="container"> - - - - - <main class="md-main" data-md-component="main"> - <div class="md-main__inner md-grid"> - - - - <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" > - <div class="md-sidebar__scrollwrap"> - <div class="md-sidebar__inner"> - - - - - -<nav class="md-nav md-nav--primary md-nav--lifted" aria-label="Navigation" data-md-level="0"> - <label class="md-nav__title" for="__drawer"> - <a href="../.." title="Gitlint" class="md-nav__button md-logo" aria-label="Gitlint" data-md-component="logo"> - - - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54Z"/></svg> - - </a> - Gitlint - </label> - - <div class="md-nav__source"> - <a href="https://github.com/jorisroovers/gitlint" title="Go to repository" class="md-source" data-md-component="source"> - <div class="md-source__icon md-icon"> - - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><!--! Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2023 Fonticons, Inc.--><path d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"/></svg> - </div> - <div class="md-source__repository"> - jorisroovers/gitlint - </div> -</a> - </div> - - <ul class="md-nav__list" data-md-scrollfix> - - - - - - - - - - <li class="md-nav__item md-nav__item--nested"> - - - - - <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_1" > - - - - <label class="md-nav__link" for="__nav_1" id="__nav_1_label" tabindex="0"> - Home - <span class="md-nav__icon md-icon"></span> - </label> - - <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_1_label" aria-expanded="false"> - <label class="md-nav__title" for="__nav_1"> - <span class="md-nav__icon md-icon"></span> - Home - </label> - <ul class="md-nav__list" data-md-scrollfix> - - - - - - - <li class="md-nav__item"> - <a href="../.." class="md-nav__link"> - Introduction - </a> - </li> - - - - - - - - - - - - - <li class="md-nav__item md-nav__item--section md-nav__item--nested"> - - - - - <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_1_2" > - - - - <label class="md-nav__link" for="__nav_1_2" id="__nav_1_2_label" tabindex="0"> - Getting Started - <span class="md-nav__icon md-icon"></span> - </label> - - <nav class="md-nav" data-md-level="2" aria-labelledby="__nav_1_2_label" aria-expanded="false"> - <label class="md-nav__title" for="__nav_1_2"> - <span class="md-nav__icon md-icon"></span> - Getting Started - </label> - <ul class="md-nav__list" data-md-scrollfix> - - - - - - - <li class="md-nav__item"> - <a href="../../getting_started/" class="md-nav__link"> - Quickstart - </a> - </li> - - - - - - - - - - <li class="md-nav__item"> - <a href="../../installation/" class="md-nav__link"> - Installation - </a> - </li> - - - - - </ul> - </nav> - </li> - - - - - - - - - - - - - <li class="md-nav__item md-nav__item--section md-nav__item--nested"> - - - - - <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_1_3" > - - - - <label class="md-nav__link" for="__nav_1_3" id="__nav_1_3_label" tabindex="0"> - Using Gitlint - <span class="md-nav__icon md-icon"></span> - </label> - - <nav class="md-nav" data-md-level="2" aria-labelledby="__nav_1_3_label" aria-expanded="false"> - <label class="md-nav__title" for="__nav_1_3"> - <span class="md-nav__icon md-icon"></span> - Using Gitlint - </label> - <ul class="md-nav__list" data-md-scrollfix> - - - - - - - <li class="md-nav__item"> - <a href="../../commit_hooks/" class="md-nav__link"> - Commit hook Setup - </a> - </li> - - - - - - - - - - <li class="md-nav__item"> - <a href="../../ci/" class="md-nav__link"> - CI Setup - </a> - </li> - - - - - - - - - - <li class="md-nav__item"> - <a href="../../linting_specific_commits/" class="md-nav__link"> - Linting specific commits - </a> - </li> - - - - - - - - - - <li class="md-nav__item"> - <a href="../../ignoring_commits/" class="md-nav__link"> - Ignoring commits - </a> - </li> - - - - - - - - - - <li class="md-nav__item"> - <a href="../../exit_codes/" class="md-nav__link"> - Exit Codes - </a> - </li> - - - - - </ul> - </nav> - </li> - - - - - - - - - - <li class="md-nav__item"> - <a href="../../alternatives/" class="md-nav__link"> - Alternatives - </a> - </li> - - - - - </ul> - </nav> - </li> - - - - - - - - - - - - <li class="md-nav__item md-nav__item--nested"> - - - - - <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_2" > - - - - <label class="md-nav__link" for="__nav_2" id="__nav_2_label" tabindex="0"> - Configuration - <span class="md-nav__icon md-icon"></span> - </label> - - <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_2_label" aria-expanded="false"> - <label class="md-nav__title" for="__nav_2"> - <span class="md-nav__icon md-icon"></span> - Configuration - </label> - <ul class="md-nav__list" data-md-scrollfix> - - - - - - - <li class="md-nav__item"> - <a href="../../configuration/" class="md-nav__link"> - Overview - </a> - </li> - - - - - - - - - - <li class="md-nav__item"> - <a href="../../configuration/gitlint_file/" class="md-nav__link"> - .gitlint file - </a> - </li> - - - - - - - - - - <li class="md-nav__item"> - <a href="../../configuration/cli/" class="md-nav__link"> - Commandline config - </a> - </li> - - - - - - - - - - <li class="md-nav__item"> - <a href="../../configuration/commit_config/" class="md-nav__link"> - Commit specific config - </a> - </li> - - - - - - - - - - <li class="md-nav__item"> - <a href="../../configuration/general_options/" class="md-nav__link"> - General Options - </a> - </li> - - - - - </ul> - </nav> - </li> - - - - - - - - - - - - - - <li class="md-nav__item md-nav__item--active md-nav__item--nested"> - - - - - <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_3" checked> - - - - <label class="md-nav__link" for="__nav_3" id="__nav_3_label" tabindex="0"> - Rules - <span class="md-nav__icon md-icon"></span> - </label> - - <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_3_label" aria-expanded="true"> - <label class="md-nav__title" for="__nav_3"> - <span class="md-nav__icon md-icon"></span> - Rules - </label> - <ul class="md-nav__list" data-md-scrollfix> - - - - - - - <li class="md-nav__item"> - <a href="../" class="md-nav__link"> - Overview - </a> - </li> - - - - - - - - - - <li class="md-nav__item"> - <a href="../builtin_rules/" class="md-nav__link"> - Built-in Rules - </a> - </li> - - - - - - - - - - <li class="md-nav__item"> - <a href="../contrib_rules/" class="md-nav__link"> - Contrib Rules - </a> - </li> - - - - - - - - - - <li class="md-nav__item"> - <a href="../named_rules/" class="md-nav__link"> - Named Rules - </a> - </li> - - - - - - - - - - - - - - - <li class="md-nav__item md-nav__item--active md-nav__item--section md-nav__item--nested"> - - - - - <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_3_5" checked> - - - - <label class="md-nav__link" for="__nav_3_5" id="__nav_3_5_label" tabindex="0"> - User Defined Rules - <span class="md-nav__icon md-icon"></span> - </label> - - <nav class="md-nav" data-md-level="2" aria-labelledby="__nav_3_5_label" aria-expanded="true"> - <label class="md-nav__title" for="__nav_3_5"> - <span class="md-nav__icon md-icon"></span> - User Defined Rules - </label> - <ul class="md-nav__list" data-md-scrollfix> - - - - - - - - - <li class="md-nav__item md-nav__item--active"> - - <input class="md-nav__toggle md-toggle" type="checkbox" id="__toc"> - - - - - - <a href="./" class="md-nav__link md-nav__link--active"> - Getting Started - </a> - - </li> - - - - - - - - - - <li class="md-nav__item"> - <a href="line_and_commit_rules/" class="md-nav__link"> - Line and Commit Rules - </a> - </li> - - - - - - - - - - <li class="md-nav__item"> - <a href="configuration_rules/" class="md-nav__link"> - Configuration Rules - </a> - </li> - - - - - - - - - - <li class="md-nav__item"> - <a href="violations/" class="md-nav__link"> - Rule Violations - </a> - </li> - - - - - - - - - - <li class="md-nav__item"> - <a href="options/" class="md-nav__link"> - Rule Options - </a> - </li> - - - - - - - - - - <li class="md-nav__item"> - <a href="rule_format_spec/" class="md-nav__link"> - Rule Specification - </a> - </li> - - - - - </ul> - </nav> - </li> - - - - - </ul> - </nav> - </li> - - - - - - - - - - - - <li class="md-nav__item md-nav__item--nested"> - - - - - <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_4" > - - - - <label class="md-nav__link" for="__nav_4" id="__nav_4_label" tabindex="0"> - Contributing - <span class="md-nav__icon md-icon"></span> - </label> - - <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_4_label" aria-expanded="false"> - <label class="md-nav__title" for="__nav_4"> - <span class="md-nav__icon md-icon"></span> - Contributing - </label> - <ul class="md-nav__list" data-md-scrollfix> - - - - - - - <li class="md-nav__item"> - <a href="../../contributing/" class="md-nav__link"> - Overview - </a> - </li> - - - - - - - - - - <li class="md-nav__item"> - <a href="../../contributing/environment_setup/" class="md-nav__link"> - Environment Setup - </a> - </li> - - - - - - - - - - <li class="md-nav__item"> - <a href="../../contributing/tests_formatting_docs/" class="md-nav__link"> - Tests, Formatting, Docs - </a> - </li> - - - - - - - - - - <li class="md-nav__item"> - <a href="../../contributing/packaging/" class="md-nav__link"> - Packaging - </a> - </li> - - - - - - - - - - <li class="md-nav__item"> - <a href="../../contributing/releases/" class="md-nav__link"> - Releases - </a> - </li> - - - - - - - - - - <li class="md-nav__item"> - <a href="../../contributing/contrib_rules/" class="md-nav__link"> - Contributing Contrib Rules - </a> - </li> - - - - - </ul> - </nav> - </li> - - - - - - - - - - - <li class="md-nav__item"> - <a href="https://github.com/jorisroovers/gitlint/blob/main/CHANGELOG.md" class="md-nav__link"> - Changelog - </a> - </li> - - - - </ul> -</nav> - </div> - </div> - </div> - - - - <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" > - <div class="md-sidebar__scrollwrap"> - <div class="md-sidebar__inner"> - - -<nav class="md-nav md-nav--secondary" aria-label="Table of contents"> - - - - - - -</nav> - </div> - </div> - </div> - - - - <div class="md-content" data-md-component="content"> - <article class="md-content__inner md-typeset"> - - - - - <a href="https://github.com/jorisroovers/gitlint/edit/main/docs/rules/user_defined_rules/index.md" title="Edit this page" class="md-content__button md-icon"> - - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M10 20H6V4h7v5h5v3.1l2-2V8l-6-6H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h4v-2m10.2-7c.1 0 .3.1.4.2l1.3 1.3c.2.2.2.6 0 .8l-1 1-2.1-2.1 1-1c.1-.1.2-.2.4-.2m0 3.9L14.1 23H12v-2.1l6.1-6.1 2.1 2.1Z"/></svg> - </a> - - - - - - <a href="https://github.com/jorisroovers/gitlint/raw/main/docs/rules/user_defined_rules/index.md" title="View source of this page" class="md-content__button md-icon"> - - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M17 18c.56 0 1 .44 1 1s-.44 1-1 1-1-.44-1-1 .44-1 1-1m0-3c-2.73 0-5.06 1.66-6 4 .94 2.34 3.27 4 6 4s5.06-1.66 6-4c-.94-2.34-3.27-4-6-4m0 6.5a2.5 2.5 0 0 1-2.5-2.5 2.5 2.5 0 0 1 2.5-2.5 2.5 2.5 0 0 1 2.5 2.5 2.5 2.5 0 0 1-2.5 2.5M9.27 20H6V4h7v5h5v4.07c.7.08 1.36.25 2 .49V8l-6-6H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h4.5a8.15 8.15 0 0 1-1.23-2Z"/></svg> - </a> - - - -<h1 id="user-defined-rules">User Defined Rules<a class="headerlink" href="#user-defined-rules" title="Permanent link">¶</a></h1> -<p><a href="https://github.com/jorisroovers/gitlint/releases/tag/v0.8.0"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7.75 6.5a1.25 1.25 0 1 0 0 2.5 1.25 1.25 0 0 0 0-2.5Z"/><path d="M2.5 1h8.44a1.5 1.5 0 0 1 1.06.44l10.25 10.25a1.5 1.5 0 0 1 0 2.12l-8.44 8.44a1.5 1.5 0 0 1-2.12 0L1.44 12A1.497 1.497 0 0 1 1 10.94V2.5A1.5 1.5 0 0 1 2.5 1Zm0 1.5v8.44l10.25 10.25 8.44-8.44L10.94 2.5Z"/></svg></span> v0.8.0</a> </p> -<p>Gitlint supports the concept of <strong>user-defined</strong> rules: the ability for users to write their own custom rules in python.</p> -<p>To use this, set the <code>extra-path</code> option to point to a directory where gitlint will search -for python files containing user-defined rule classes.</p> -<div class="tabbed-set tabbed-alternate" data-tabs="1:3"><input checked="checked" id="__tabbed_1_1" name="__tabbed_1" type="radio" /><input id="__tabbed_1_2" name="__tabbed_1" type="radio" /><input id="__tabbed_1_3" name="__tabbed_1" type="radio" /><div class="tabbed-labels"><label for="__tabbed_1_1"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M4 1.75C4 .784 4.784 0 5.75 0h5.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v8.586A1.75 1.75 0 0 1 14.25 15h-9a.75.75 0 0 1 0-1.5h9a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 10 4.25V1.5H5.75a.25.25 0 0 0-.25.25v2.5a.75.75 0 0 1-1.5 0Zm1.72 4.97a.75.75 0 0 1 1.06 0l2 2a.75.75 0 0 1 0 1.06l-2 2a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734l1.47-1.47-1.47-1.47a.75.75 0 0 1 0-1.06ZM3.28 7.78 1.81 9.25l1.47 1.47a.751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018l-2-2a.75.75 0 0 1 0-1.06l2-2a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042Zm8.22-6.218V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"/></svg></span> .gitlint</label><label for="__tabbed_1_2"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M0 2.75C0 1.784.784 1 1.75 1h12.5c.966 0 1.75.784 1.75 1.75v10.5A1.75 1.75 0 0 1 14.25 15H1.75A1.75 1.75 0 0 1 0 13.25Zm1.75-.25a.25.25 0 0 0-.25.25v10.5c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25V2.75a.25.25 0 0 0-.25-.25ZM7.25 8a.749.749 0 0 1-.22.53l-2.25 2.25a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734L5.44 8 3.72 6.28a.749.749 0 0 1 .326-1.275.749.749 0 0 1 .734.215l2.25 2.25c.141.14.22.331.22.53Zm1.5 1.5h3a.75.75 0 0 1 0 1.5h-3a.75.75 0 0 1 0-1.5Z"/></svg></span> CLI</label><label for="__tabbed_1_3"><span class="twemoji"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21 2H3c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m0 18H3V6h18v14M16.6 8c1.5 1.3 2.4 3.1 2.4 5s-.9 3.7-2.4 5l-1.6-.6c1.3-1 2-2.7 2-4.4s-.7-3.4-2-4.4l1.6-.6M7.4 8l1.6.6c-1.3 1-2 2.7-2 4.4s.7 3.4 2 4.4l-1.6.6C5.9 16.7 5 14.9 5 13s.9-3.7 2.4-5m4.7 4 1.4-2H15l-2.2 3 1.3 3h-1.3l-.8-2-1.4 2H9l2.3-3.1L10 10h1.3l.8 2Z"/></svg></span> Env var</label></div> -<div class="tabbed-content"> -<div class="tabbed-block"> -<div class="language-ini highlight"><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="k">[general]</span> -</span><span id="__span-0-2"><a id="__codelineno-0-2" name="__codelineno-0-2" href="#__codelineno-0-2"></a><span class="na">extra-path</span><span class="o">=</span><span class="s">tools/gitlint/myrules</span><span class="w"> </span><span class="c1"># (1)</span> -</span><span id="__span-0-3"><a id="__codelineno-0-3" name="__codelineno-0-3" href="#__codelineno-0-3"></a> -</span><span id="__span-0-4"><a id="__codelineno-0-4" name="__codelineno-0-4" href="#__codelineno-0-4"></a><span class="c1"># Alternatively, point to a specific file</span> -</span><span id="__span-0-5"><a id="__codelineno-0-5" name="__codelineno-0-5" href="#__codelineno-0-5"></a><span class="k">[general]</span> -</span><span id="__span-0-6"><a id="__codelineno-0-6" name="__codelineno-0-6" href="#__codelineno-0-6"></a><span class="na">extra-path</span><span class="o">=</span><span class="s">tools/gitlint/myrules/my_rules.py</span> -</span></code></pre></div> -<ol> -<li>This path is relative to the current working directory in which you're executing gitlint. - <div class="language-ini highlight"><pre><span></span><code><span id="__span-1-1"><a id="__codelineno-1-1" name="__codelineno-1-1" href="#__codelineno-1-1"></a><span class="c1"># You can also use absolute paths of course</span> -</span><span id="__span-1-2"><a id="__codelineno-1-2" name="__codelineno-1-2" href=" |