<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git-hook-pre-commit-python-javascript-syntax-linter, branch master</title>
<subtitle>Before committing run `flake8` and `jshint` on staged files</subtitle>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/git-hook-pre-commit-python-javascript-syntax-linter/'/>
<entry>
<title>pre-commit: Remove unnecessary commented lines</title>
<updated>2015-09-27T18:49:46+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2015-09-27T18:49:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/git-hook-pre-commit-python-javascript-syntax-linter/commit/?id=7a5b8b3e0df6c236e96deb6a1fa1a82b93425f61'/>
<id>7a5b8b3e0df6c236e96deb6a1fa1a82b93425f61</id>
<content type='text'>
Remove leftovers from the git sample pre-commit hook that we don't
really need in this script.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove leftovers from the git sample pre-commit hook that we don't
really need in this script.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add README</title>
<updated>2015-09-27T18:48:18+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2015-09-27T18:45:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/git-hook-pre-commit-python-javascript-syntax-linter/commit/?id=4941dce09c968e17d3355e035d85960646855f7f'/>
<id>4941dce09c968e17d3355e035d85960646855f7f</id>
<content type='text'>
Includes a short description, requirements, installation instructions,
testing information, and license information.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Includes a short description, requirements, installation instructions,
testing information, and license information.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add LICENSE (MIT)</title>
<updated>2015-09-27T18:44:03+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2015-09-27T18:44:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/git-hook-pre-commit-python-javascript-syntax-linter/commit/?id=8ed316c725f9c53c093a5d85a1f1655c0dba3616'/>
<id>8ed316c725f9c53c093a5d85a1f1655c0dba3616</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Makefile: Simplify `test` target</title>
<updated>2015-09-27T17:44:20+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2015-09-27T17:44:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/git-hook-pre-commit-python-javascript-syntax-linter/commit/?id=86f333eb61480bf8f3baca4f713d4e8f488f28f5'/>
<id>86f333eb61480bf8f3baca4f713d4e8f488f28f5</id>
<content type='text'>
Remove all the conditions and code copied from Vcsh and only do the bare
minimum necessary to run tests. This will bork in more unexpected ways
if `git` or `prove` aren't present, but it allows us to get rid of the
only GPL-licensed code in the codebase, freeing me up to license the
project in any way I want.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove all the conditions and code copied from Vcsh and only do the bare
minimum necessary to run tests. This will bork in more unexpected ways
if `git` or `prove` aren't present, but it allows us to get rid of the
only GPL-licensed code in the codebase, freeing me up to license the
project in any way I want.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add JavaScript linting and tests</title>
<updated>2015-09-27T17:20:55+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2015-09-27T17:20:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/git-hook-pre-commit-python-javascript-syntax-linter/commit/?id=2a88fb92f4c1fbb3533e589d5c9f4b5c17595d3f'/>
<id>2a88fb92f4c1fbb3533e589d5c9f4b5c17595d3f</id>
<content type='text'>
* Add sample malformed JavaScript files to lint on
* In our tests, copy the `node_modules` directory to make `jshint`
  available, then validate that we're correctly linting the staged JS
  file
* In our pre-commit hook, lint the staged JavaScript files. If either of
  our linting commands fail then exit 1 to abort the commit.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Add sample malformed JavaScript files to lint on
* In our tests, copy the `node_modules` directory to make `jshint`
  available, then validate that we're correctly linting the staged JS
  file
* In our pre-commit hook, lint the staged JavaScript files. If either of
  our linting commands fail then exit 1 to abort the commit.
</pre>
</div>
</content>
</entry>
<entry>
<title>t/100-python.t: Perform a `git reset` at test's end</title>
<updated>2015-09-27T17:19:01+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2015-09-27T17:19:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/git-hook-pre-commit-python-javascript-syntax-linter/commit/?id=50631f85e73eda9d6738f5993ff5cf26198f8697'/>
<id>50631f85e73eda9d6738f5993ff5cf26198f8697</id>
<content type='text'>
Ensure we reset the staging area as a teardow/cleanup operation.
Otherwise, our JavaScript test (which runs after this one by default)
will be working with a dirty staging area and its test will by
consequence not pass.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Ensure we reset the staging area as a teardow/cleanup operation.
Otherwise, our JavaScript test (which runs after this one by default)
will be working with a dirty staging area and its test will by
consequence not pass.
</pre>
</div>
</content>
</entry>
<entry>
<title>t/100-python.t: Restrict file check to Python files</title>
<updated>2015-09-27T17:16:22+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2015-09-27T17:16:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/git-hook-pre-commit-python-javascript-syntax-linter/commit/?id=7096e275b8d2d78ecfbb8d53f22086fd0e8d0605'/>
<id>7096e275b8d2d78ecfbb8d53f22086fd0e8d0605</id>
<content type='text'>
One of our tests confirms that our 2 Python files are in the repo
directory. Since we're also adding JavaScript files to this directory,
we need to restrict the test to Python files in order to match them
correctly. In this case since we're only testing Python files we don't
really need to worry about the JS files' existence.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
One of our tests confirms that our 2 Python files are in the repo
directory. Since we're also adding JavaScript files to this directory,
we need to restrict the test to Python files in order to match them
correctly. In this case since we're only testing Python files we don't
really need to worry about the JS files' existence.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add 'jshint'</title>
<updated>2015-09-25T06:10:25+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2015-09-25T06:10:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/git-hook-pre-commit-python-javascript-syntax-linter/commit/?id=a0541f78062430b8f0f48e020e7cea586e8b2f58'/>
<id>a0541f78062430b8f0f48e020e7cea586e8b2f58</id>
<content type='text'>
* Create a package.json with 'jshint' as a dev dependency
* .gitignore: Ignore node_modules because why not, and it only has dev
  dependencies in it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Create a package.json with 'jshint' as a dev dependency
* .gitignore: Ignore node_modules because why not, and it only has dev
  dependencies in it.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add requirements.txt</title>
<updated>2015-09-25T05:41:43+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2015-09-25T05:41:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/git-hook-pre-commit-python-javascript-syntax-linter/commit/?id=83dd3b1f7dd4087724847ecd93da65ada301a273'/>
<id>83dd3b1f7dd4087724847ecd93da65ada301a273</id>
<content type='text'>
Make it explicit that we depend on `flake8`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make it explicit that we depend on `flake8`.
</pre>
</div>
</content>
</entry>
<entry>
<title>Makefile: Ensure virtualenv is sourced before running tests</title>
<updated>2015-09-25T05:39:44+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2015-09-25T05:39:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/git-hook-pre-commit-python-javascript-syntax-linter/commit/?id=936ddb9eb1e0d46f2ccbba7cf0f40c5b634b5c92'/>
<id>936ddb9eb1e0d46f2ccbba7cf0f40c5b634b5c92</id>
<content type='text'>
Otherwise they'll fail since `flake8` won't be available.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Otherwise they'll fail since `flake8` won't be available.
</pre>
</div>
</content>
</entry>
</feed>
