diff --git a/docs/arguments.rst b/docs/arguments.rst index be0ee88..72c66b7 100644 --- a/docs/arguments.rst +++ b/docs/arguments.rst @@ -14,12 +14,19 @@ Scan the workspace [default] **-s, --staging** Scan the staging area (useful for pre-commit). -**-c , --config**= Path to config file +**-c , --config=** + Path to config file +**-t, --bylinter** + Group reports by linter first as they appear in the config file [default] +**-f, --byfile** + Group reports by file first, linter second **-d, --dryrun** Report what git-lint would do, but don't actually do anything. **-q, --quiet** - Produce a short report of files that failed to pass. + Produce a short report of file that failed to pass. **-h, --help** Print a short help message +**-V, --verbose** + Print a slightly more verbose long report **-v, --version** Print version information diff --git a/docs/installation.rst b/docs/installation.rst index ad3dfdc..cfb390b 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -12,7 +12,7 @@ To install Git Lint, run this command in your terminal: .. code-block:: console - $ pip install git_lint + $ pip install git_linter If you don't have `pip`_ installed, this `Python installation guide`_ can guide you through the process. @@ -30,13 +30,13 @@ You can either clone the public repository: .. code-block:: console - $ git clone git://github.com/elfsternberg/git_lint + $ git clone git://github.com/elfsternberg/git_linter Or download the `tarball`_: .. code-block:: console - $ curl -OL https://github.com/elfsternberg/git_lint/tarball/master + $ curl -OL https://github.com/elfsternberg/git_linter/tarball/master Once you have a copy of the source, you can install it with: @@ -44,10 +44,9 @@ Once you have a copy of the source, you can install it with: $ python setup.py install -.. _Github repo: https://github.com/elfsternberg/git_lint -.. _tarball: https://github.com/elfsternberg/git_lint/tarball/master +.. _Github repo: https://github.com/elfsternberg/git_linter +.. _tarball: https://github.com/elfsternberg/git_linter/tarball/master -Once installed, you may run the 'git lint --make-config' command, which -will generate a simple configuration file. You may install this either -in your home directory as ``.git-lint.conf`` or in your project's git -directory as ``.git/lint/git-lint.conf`` +Once installed, please copy the '.git-lint' example file. You may install this either in +your home directory as ``.git-lint`` or in your project's git directory as +``.git/lint/git-lint`` diff --git a/docs/usage.rst b/docs/usage.rst index ae5ce1b..ea360d7 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -32,4 +32,5 @@ the file's executable flag to ``true``: Please see the :ref:`api` for more details on options taken by the ``run_precommit()`` and ``run_gitlint`` commands. - + +There is an example ``pre-commit`` script shipped with ``git lint``. diff --git a/git_lint/options.py b/git_lint/options.py index 3946942..2428ef9 100644 --- a/git_lint/options.py +++ b/git_lint/options.py @@ -18,10 +18,10 @@ OPTIONS = [ _('Scan the workspace'), ['staging']), ('s', 'staging', False, _('Scan the staging area (useful for pre-commit).'), []), - ('g', 'changes', False, - _("Report lint failures only for diff'd sections"), ['complete']), - ('p', 'complete', False, - _('Report lint failures for all files'), []), + # ('g', 'changes', False, + # _("Report lint failures only for diff'd sections"), ['complete']), + # ('p', 'complete', False, + # _('Report lint failures for all files'), []), ('t', 'bylinter', False, _('Group the reports by linter first as they appear in the config file [default]'), []), ('f', 'byfile', False, diff --git a/git_lint/reporters.py b/git_lint/reporters.py index 9db3daa..6f7c6ac 100644 --- a/git_lint/reporters.py +++ b/git_lint/reporters.py @@ -46,17 +46,17 @@ def print_report(results, unlintable_filenames, cant_lint_filenames, if len(broken_linter_names) and (len(cant_lint_filenames) or ('verbose' in options)): print(_('These linters could not be run:'), ','.join(broken_linter_names)) if len(cant_lint_filenames): - print(_('As a result, these files were not linted:')) + print(_('Files not linted:')) print('\n'.join([' {}'.format(f) for f in cant_lint_filenames])) print('') if len(unlintable_filenames) and ('verbose' in options): - print(_('The following files had no recognizeable linters:')) + print(_('No recognizeable linters for:')) print('\n'.join([' {}'.format(f) for f in unlintable_filenames])) print('') if len(unfindable_filenames): - print(_('The following files could not be found:')) + print(_('Files not be found:')) print('\n'.join([' {}'.format(f) for f in unfindable_filenames])) print('') diff --git a/setup.py b/setup.py index d3cb139..690d079 100644 --- a/setup.py +++ b/setup.py @@ -6,6 +6,8 @@ import os.path def get_data_files(prefix): + if prefix.startswith('/System/Library/Frameworks'): + return [] return [(os.path.join(prefix, 'share/man/man1'), ['docs/_build/man/git-lint.1'])]