Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dockermentation #87

Merged
merged 1 commit into from
Jan 4, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add dockermentation
  • Loading branch information
Ben Picolo committed Jan 4, 2017
commit f81c8906d81cdc15b620e1066e80e1d38c58c58b
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
sha: f840ac610d8d9d76b666062416241f2156b3f388
hooks:
- id: scss-lint
language_version: 1.9.3-p547
language_version: 2.1.2
- repo: git@github.com:pre-commit/pre-commit-hooks
sha: 97b88d9610bcc03982ddac33caba98bb2b751f5f
hooks:
Expand Down
16 changes: 13 additions & 3 deletions index.mako
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@
</pre>
<h2 id="supported-languages">Supported languages</h2>
<ul>
<li><code>docker</code> - must have a Dockerfile (Installed via <code>docker build .</code>) Requires pre-commit >= 0.10.0.</li>
<li><code>node</code> - must have a package.json (Installed via <code>npm install .</code>)</li>
<li><code>python</code> - must have a setup.py (Installed via <code>pip install .</code>)</li>
<li><code>ruby</code> - must have a file matching *.gemspec (Installed via <code>gem build *.gemspec &amp;&amp; gem install *.gem</code>)</li>
Expand All @@ -226,6 +227,14 @@
<li><code>ruby</code> - provided by <code>executables</code> in your gemspec</li>
</ul>

Running Docker hooks required a running Docker engine on your host.
For configuring Docker hooks, your <code>entry</code> should correspond to an executable
inside the Docker container, and will be used to override the default container entrypoint.
Your Docker CMD will not run when pre-commit passes a file list as arguments to the run container
command. Docker allows you to use any language that's not supported by pre-commit as a builtin.
See <a href="https://github.com/pre-commit/pre-commit-docker-flake8">this repository</a> for an example Docker-based hook.


<h2 id="developing-hooks-interactively">Developing hooks interactively</h2>

<p>
Expand Down Expand Up @@ -261,7 +270,7 @@
<h2 id="pre-commit-during-merges">pre-commit during merges</h2>
<p>
The biggest gripe we&rsquo;ve had in the past with pre-commit
hooks was during merge conflict resolution.
hooks was during merge conflict resolution.
When working on very large projects a merge often results in
hundreds of committed files. I shouldn&rsquo;t need to run
hooks on all of these files that I didn&rsquo;t even touch!
Expand Down Expand Up @@ -365,8 +374,8 @@
pre-commit can also be used as a tool for continuous
integration. For instance, adding
<code>pre-commit run --all-files</code> as a CI step will
ensure everything stays in tip-top shape.
To check only files which have changed, which may be faster, use something like
ensure everything stays in tip-top shape.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

someone didnt run hooks D=

To check only files which have changed, which may be faster, use something like
<code>git diff-tree --no-commit-id --name-only -r $REVISION | xargs pre-commit run --files</code>.
</p>
</div>
Expand Down Expand Up @@ -397,6 +406,7 @@
<li><a href="https://github.com/barrysteyn">Barry Steyn</a></li>
<li><a href="https://github.com/blarghmatey">Tobias Macey</a></li>
<li><a href="https://github.com/laurentsigal">Laurent Sigal</a></li>
<li><a href="https://github.com/bpicolo">Ben Picolo</a></li>
</ul>
</div>
</div>
Expand Down