2016-10-03 20:28:07 +00:00
< !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
< html xmlns = "http://www.w3.org/1999/xhtml" >
< head >
< meta http-equiv = "Content-Type" content = "text/html; charset=utf-8" / >
2016-10-04 00:31:52 +00:00
< title > Strategies — Git Lint 0.0.4 documentation< / title >
2016-10-03 20:28:07 +00:00
2016-10-04 00:31:52 +00:00
< link rel = "stylesheet" href = "static/default.css" type = "text/css" / >
2016-10-03 20:31:59 +00:00
< link rel = "stylesheet" href = "static/pygments.css" type = "text/css" / >
2016-10-03 20:28:07 +00:00
< script type = "text/javascript" >
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '0.0.4',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
< / script >
2016-10-03 20:31:59 +00:00
< script type = "text/javascript" src = "static/jquery.js" > < / script >
< script type = "text/javascript" src = "static/underscore.js" > < / script >
< script type = "text/javascript" src = "static/doctools.js" > < / script >
2016-10-03 20:28:07 +00:00
< link rel = "top" title = "Git Lint 0.0.4 documentation" href = "index.html" / >
< / head >
2016-10-04 00:31:52 +00:00
< body >
< div class = "related" >
2016-10-03 20:28:07 +00:00
< h3 > Navigation< / h3 >
< ul >
< li class = "right" style = "margin-right: 10px" >
< a href = "genindex.html" title = "General Index"
accesskey="I">index< / a > < / li >
< li class = "right" >
< a href = "py-modindex.html" title = "Python Module Index"
>modules< / a > |< / li >
2016-10-04 00:31:52 +00:00
< li > < a href = "index.html" > Git Lint 0.0.4 documentation< / a > » < / li >
2016-10-03 20:28:07 +00:00
< / ul >
< / div >
< div class = "document" >
< div class = "documentwrapper" >
< div class = "bodywrapper" >
2016-10-04 00:31:52 +00:00
< div class = "body" >
2016-10-03 20:28:07 +00:00
< div class = "section" id = "strategies" >
< h1 > Strategies< a class = "headerlink" href = "#strategies" title = "Permalink to this headline" > ¶< / a > < / h1 >
< p > git-lint has a couple of phases in which it develops its strategy for what to run:< / p >
< ol class = "arabic" >
< li > < p class = "first" > Load the configuration file.
a. On the command line?
b. In the base directory as .git-lint?
c. In the base directory as .git-lint/config?
d. In the user’ s home directory as .git-lint?
e. In the user’ s home directroy as .git-lint/config?< / p >
< / li >
2016-10-04 00:31:52 +00:00
< li > < p class = "first" > Prune configuration with < tt class = "docutils literal" > < span class = "pre" > -o< / span > < / tt > or < tt class = "docutils literal" > < span class = "pre" > -e< / span > < / tt > options< / p >
2016-10-03 20:28:07 +00:00
< / li >
< li > < p class = "first" > Determine which files to lint.
a. Workspace or staging?< / p >
< blockquote >
< div > < ol class = "lowerroman simple" >
< li > If staging, record all stashed timestamps for restoration< / li >
< / ol >
< / div > < / blockquote >
< ol class = "loweralpha" start = "2" >
< li > < dl class = "first docutils" >
< dt > From this list:< / dt >
< dd > < ol class = "first last lowerroman simple" >
2016-10-04 00:31:52 +00:00
< li > All changed files < tt class = "docutils literal" > < span class = "pre" > -b< / span > < / tt > < / li >
2016-10-03 20:28:07 +00:00
< li > All changed files in the current directory and down (default)< / li >
2016-10-04 00:31:52 +00:00
< li > All files in the current directory and down. < tt class = "docutils literal" > < span class = "pre" > -a< / span > < / tt > < / li >
< li > All files in the repository < tt class = "docutils literal" > < span class = "pre" > -a< / span > < span class = "pre" > -b< / span > < / tt > < / li >
2016-10-03 20:28:07 +00:00
< / ol >
< / dd >
< / dl >
< / li >
< li > < p class = "first" > Add files from command line, if any.< / p >
< / li >
< li > < p class = "first" > Filter based on match criteria in configuration file.< / p >
< / li >
< / ol >
< / li >
< li > < p class = "first" > For each file, run the appropriate linter.
2016-10-04 00:31:52 +00:00
a. If in delta mode < tt class = "docutils literal" > < span class = "pre" > -d< / span > < / tt > , only show differences that correspond to user changes.
2016-10-03 20:28:07 +00:00
b. Capture failure output and failure status.< / p >
< / li >
< li > < p class = "first" > Reduce failure status to pass/fail< / p >
< / li >
< li > < p class = "first" > Print resulting messages and exit with failure status (for pre-commit).< / p >
< / li >
< li > < p class = "first" > If staging, unstage and touch-up files to restore timestamps.< / p >
< / li >
< / ol >
< / div >
< / div >
< / div >
< / div >
2016-10-04 00:31:52 +00:00
< div class = "sphinxsidebar" >
2016-10-03 20:28:07 +00:00
< div class = "sphinxsidebarwrapper" >
2016-10-04 00:31:52 +00:00
< h3 > This Page< / h3 >
< ul class = "this-page-menu" >
< li > < a href = "sources/strategies.txt"
rel="nofollow">Show Source< / a > < / li >
< / ul >
< div id = "searchbox" style = "display: none" >
2016-10-03 20:28:07 +00:00
< h3 > Quick search< / h3 >
< form class = "search" action = "search.html" method = "get" >
2016-10-04 00:31:52 +00:00
< input type = "text" name = "q" / >
< input type = "submit" value = "Go" / >
2016-10-03 20:28:07 +00:00
< input type = "hidden" name = "check_keywords" value = "yes" / >
< input type = "hidden" name = "area" value = "default" / >
< / form >
2016-10-04 00:31:52 +00:00
< p class = "searchtip" style = "font-size: 90%" >
Enter search terms or a module, class or function name.
< / p >
2016-10-03 20:28:07 +00:00
< / div >
< script type = "text/javascript" > $ ( '#searchbox' ) . show ( 0 ) ; < / script >
< / div >
< / div >
< div class = "clearer" > < / div >
< / div >
2016-10-04 00:31:52 +00:00
< div class = "related" >
2016-10-03 20:28:07 +00:00
< h3 > Navigation< / h3 >
< ul >
< li class = "right" style = "margin-right: 10px" >
< a href = "genindex.html" title = "General Index"
>index< / a > < / li >
< li class = "right" >
< a href = "py-modindex.html" title = "Python Module Index"
>modules< / a > |< / li >
2016-10-04 00:31:52 +00:00
< li > < a href = "index.html" > Git Lint 0.0.4 documentation< / a > » < / li >
2016-10-03 20:28:07 +00:00
< / ul >
< / div >
2016-10-04 00:31:52 +00:00
< div class = "footer" >
© Copyright 2016, Kenneth M. " Elf" Sternberg.
Created using < a href = "http://sphinx-doc.org/" > Sphinx< / a > 1.2.2.
2016-10-03 20:28:07 +00:00
< / div >
< / body >
< / html >