"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "README.rst" between
codespell-1.17.1.tar.gz and codespell-2.0.0.tar.gz

About: codespell checks source code and other text files for common misspellings.

README.rst  (codespell-1.17.1):README.rst  (codespell-2.0.0)
skipping to change at line 22 skipping to change at line 22
* Mailing list: <codespell@googlegroups.com> with web archives/interface * Mailing list: <codespell@googlegroups.com> with web archives/interface
`here <https://groups.google.com/forum/?fromgroups#!forum/codespell>`_ `here <https://groups.google.com/forum/?fromgroups#!forum/codespell>`_
* `Repository <https://github.com/codespell-project/codespell>`_ * `Repository <https://github.com/codespell-project/codespell>`_
* `Releases <https://github.com/codespell-project/codespell/releases>`_ * `Releases <https://github.com/codespell-project/codespell/releases>`_
Requirements Requirements
------------ ------------
Python 2.7 or above. Python 3.5 or above.
Installation Installation
------------ ------------
You can use ``pip`` to install codespell with e.g.:: You can use ``pip`` to install codespell with e.g.::
pip install codespell pip install codespell
Usage Usage
----- -----
skipping to change at line 44 skipping to change at line 44
For more in depth info please check usage with ``codespell -h``. For more in depth info please check usage with ``codespell -h``.
Some noteworthy flags:: Some noteworthy flags::
codespell -w, --write-changes codespell -w, --write-changes
The ``-w`` flag will actually implement the changes recommended by codespell. No t running with ``-w`` flag is the same as with doing a dry run. It is recommende d to run this with the ``-i`` or ``--interactive`` flag.:: The ``-w`` flag will actually implement the changes recommended by codespell. No t running with ``-w`` flag is the same as with doing a dry run. It is recommende d to run this with the ``-i`` or ``--interactive`` flag.::
codespell -I FILE, --ignore-words=FILE codespell -I FILE, --ignore-words=FILE
The ``-I`` flag can be used to whitelist certain words that are in the ``codespe ll_lib/data/dictionary.txt``. The format of the whitelist file is one word per l ine. Invoke using: ``codespell -I path/to/file.txt`` to execute codespell refere ncing said whitelist. **Important note:** The whitelist passed to ``-I`` is case -sensitive based on how it is listed in ``dictionary.txt``. :: The ``-I`` flag can be used for a list of certain words to allow that are in the codespell dictionaries. The format of the file is one word per line. Invoke usi ng: ``codespell -I path/to/file.txt`` to execute codespell referencing said list of allowed words. **Important note:** The list passed to ``-I`` is case-sensiti ve based on how it is listed in the codespell dictionaries. ::
codespell -L word1,word2,word3,word4 codespell -L word1,word2,word3,word4
The ``-L`` flag can be used to whitelist certain words that are comma-separated placed immediately after it. :: The ``-L`` flag can be used to allow certain words that are comma-separated plac ed immediately after it. **Important note:** The list passed to ``-L`` is case- sensitive based on how it is listed in the codespell dictionaries. ::
codespell -S, --skip= codespell -S, --skip=
Comma-separated list of files to skip. It accepts globs as well. Examples: Comma-separated list of files to skip. It accepts globs as well. Examples:
* to skip .eps & .txt files, invoke ``codespell --skip="*.eps,*.txt"`` * to skip .eps & .txt files, invoke ``codespell --skip="*.eps,*.txt"``
* to skip directories, invoke ``codespell --skip="./src/3rd-Party,./src/Test"`` * to skip directories, invoke ``codespell --skip="./src/3rd-Party,./src/Test"``
Useful commands:: Useful commands::
codespell -d -q 3 --skip="*.po,*.ts,./src/3rdParty,./src/Test" codespell -d -q 3 --skip="*.po,*.ts,./src/3rdParty,./src/Test"
List all typos found except translation files and some directories. List all typos found except translation files and some directories.
Display them without terminal colors and with a quiet level of 3. :: Display them without terminal colors and with a quiet level of 3. ::
codespell -i 3 -w codespell -i 3 -w
Run interactive mode level 3 and write changes to file. Run interactive mode level 3 and write changes to file.
We ship a dictionary that is an improved version of the one available We ship a collection of dictionaries that are an improved version of the one ava ilable
`on Wikipedia <https://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspelli ngs/For_machines>`_ `on Wikipedia <https://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspelli ngs/For_machines>`_
after applying them in projects like Linux Kernel, EFL, oFono among others. after applying them in projects like Linux Kernel, EFL, oFono among others.
You can provide your own version of the dictionary, but patches for You can provide your own version of the dictionary, but patches for
new/different entries are very welcome. new/different entries are very welcome.
Want to know if a word you're proposing exists in codespell already? It is possi ble to test a word against the current dictionary that exists in ``codespell_lib /data/dictionary.txt`` via:: Want to know if a word you're proposing exists in codespell already? It is possi ble to test a word against the current set dictionaries that exist in ``codespel l_lib/data/dictionary*.txt`` via::
echo "word" | codespell - echo "word" | codespell -
echo "1stword,2ndword" | codespell - echo "1stword,2ndword" | codespell -
You can select the optional dictionaries with the ``--builtin`` option.
Using a config file
-------------------
Command line options can also be specified in a config file.
When running ``codespell``, it will check in the current directory for a file
named ``setup.cfg`` or ``.codespellrc`` (or a file specified via ``--config``),
containing an entry named ``[codespell]``. Each command line argument can
be specified in this file (without the preceding dashes), for example::
[codespell]
skip = *.po,*.ts,./src/3rdParty,./src/Test
count =
quiet-level = 3
This is equivalent to running::
codespell --quiet-level 3 --count --skip "*.po,*.ts,./src/3rdParty,./src/Tes
t"
Any options specified in the command line will *override* options from the
config file.
Dictionary format Dictionary format
----------------- -----------------
The format of the dictionary was influenced by the one it originally came from, The format of the dictionaries was influenced by the one they originally came fr
i.e. from Wikipedia. The difference is how multiple options are treated and om,
that the last argument is the reason why a certain entry could not be applied i.e. from Wikipedia. The difference is how multiple options are treated. E.g.:
directly, but instead be manually inspected. E.g.:
1. Simple entry: one wrong word / one suggestion:: 1. Simple entry: one wrong word / one suggestion::
calulated->calculated calulated->calculated
2. Entry with more than one suggested fix:: 2. Entry with more than one suggested fix::
fiel->feel, field, file, phial, fiel->feel, field, file, phial,
Note the last comma! You need to use it, otherwise the last suggestion Note the last comma! You need to use it, otherwise the last suggestion
will be discarded (see below for why). When there is more than one will be discarded (see below for why). When there is more than one
suggestion, an automatic fix is not possible and the best we can do is suggestion, an automatic fix is not possible and the best we can do is
to give the user the file and line where the error occurred as well as to give the user the file and line where the error occurred as well as
the suggestions. the suggestions.
3. Entry with one word, but with automatically fix disabled:: 3. Entry with one word, but with automatic fix disabled::
clas->class, disabled because of name clash in c++ clas->class, disabled because of name clash in c++
Note that there isn't a comma in the end of the line. The last argument is Note that there isn't a comma at the end of the line. The last argument is
treated as the reason why a suggestion cannot be automatically applied. treated as the reason why a suggestion cannot be automatically applied.
There can also be multiple suggestions but any automatic fix will again be
disabled::
clas->class, clash, disabled because of name clash in c++
Development Setup
-----------------
You can install required dependencies for development by running the following w
ithin a checkout of the codespell source::
pip install -e ".[dev]"
To run tests against the codebase run::
make check
Sending Pull Requests Sending Pull Requests
--------------------- ---------------------
If you have a suggested typo that you'd like to see merged please follow these s teps: If you have a suggested typo that you'd like to see merged please follow these s teps:
1. Make sure you read the instructions mentioned in the ``Dictionary format`` se ction above to submit correctly formatted entries. 1. Make sure you read the instructions mentioned in the ``Dictionary format`` se ction above to submit correctly formatted entries.
2. Sort the dictionary. This is done by invoking (in the top level directory of 2. Choose the correct dictionary file to add your typo too. See `codespell --hel
``codespell/``):: p` for explanations of the different dictionaries.
3. Sort the dictionaries. This is done by invoking (in the top level directory o
f ``codespell/``)::
make check-dictionaries make check-dictionaries
If the make script finds that you need to sort the dictionary, please then ru n:: If the make script finds that you need to sort a dictionary, please then run: :
make sort-dictionaries make sort-dictionaries
3. Only after this process is complete do we recommend you submit the PR. 4. Only after this process is complete do we recommend you submit the PR.
**Important Notes:** **Important Notes:**
* If the dictionary is submitted without being pre-sorted the PR will fail via T ravisCI. * If the dictionaries are submitted without being pre-sorted the PR will fail vi a our various CI tools.
* Not all PRs will be merged. This is pending on the discretion of the devs, mai ntainers, and the community. * Not all PRs will be merged. This is pending on the discretion of the devs, mai ntainers, and the community.
Updating Updating
-------- --------
To stay current with codespell developments it is possible to build codespell fr om GitHub via:: To stay current with codespell developments it is possible to build codespell fr om GitHub via::
pip install --upgrade git+https://github.com/codespell-project/codespell.git pip install --upgrade git+https://github.com/codespell-project/codespell.git
**Important Notes:** **Important Notes:**
* Sometimes installing via ``pip`` will complain about permissions. If this is t he case then run with :: * Sometimes installing via ``pip`` will complain about permissions. If this is t he case then run with ::
pip install --user --upgrade git+https://github.com/codespell-project/codesp ell.git pip install --user --upgrade git+https://github.com/codespell-project/codesp ell.git
* It has been reported that after installing from ``pip``, codespell can't be lo cated. Please check the $PATH variable to see if ``~/.local/bin`` is present. If it isn't then add it to your path. * It has been reported that after installing from ``pip``, codespell can't be lo cated. Please check the $PATH variable to see if ``~/.local/bin`` is present. If it isn't then add it to your path.
* If you decide to install via ``pip`` then be sure to remove any previously ins talled versions of codespell (via your platform's preferred app manager). * If you decide to install via ``pip`` then be sure to remove any previously ins talled versions of codespell (via your platform's preferred app manager).
Updating the dictionary Updating the dictionaries
-------------------------
In the scenario where the user prefers not to follow the development version of codespell yet still opts to benefit from the frequently updated `dictionary.txt` file, we recommend running a simple set of commands to achieve this :: In the scenario where the user prefers not to follow the development version of codespell yet still opts to benefit from the frequently updated dictionary files , we recommend running a simple set of commands to achieve this ::
wget https://raw.githubusercontent.com/codespell-project/codespell/master/co despell_lib/data/dictionary.txt wget https://raw.githubusercontent.com/codespell-project/codespell/master/co despell_lib/data/dictionary.txt
codespell -D dictionary.txt codespell -D dictionary.txt
The above simply downloads the latest ``dictionary.txt`` file and then by utiliz ing the ``-D`` flag allows the user to specify the freshly downloaded ``dictiona ry.txt`` as the custom dictionary instead of the default one. The above simply downloads the latest ``dictionary.txt`` file and then by utiliz ing the ``-D`` flag allows the user to specify the freshly downloaded ``dictiona ry.txt`` as the custom dictionary instead of the default one.
You can also do the same thing for the other dictionaries listed here:
https://github.com/codespell-project/codespell/tree/master/codespell_lib/dat
a
License License
------- -------
The Python script ``codespell`` with its library ``codespell_lib`` is available The Python script ``codespell`` with its library ``codespell_lib`` is available
with the following terms: with the following terms:
(*tl;dr*: `GPL v2`_) (*tl;dr*: `GPL v2`_)
Copyright (C) 2010-2011 Lucas De Marchi <lucas.de.marchi@gmail.com> Copyright (C) 2010-2011 Lucas De Marchi <lucas.de.marchi@gmail.com>
Copyright (C) 2011 ProFUSION embedded systems Copyright (C) 2011 ProFUSION embedded systems
skipping to change at line 183 skipping to change at line 226
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, see along with this program; if not, see
<http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>. <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>.
.. _GPL v2: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html .. _GPL v2: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
dictionary.txt is a derived work of English Wikipedia and is released under the ``dictionary.txt`` and the other ``dictionary_*.txt`` files are a derived work o
Creative Commons Attribution-Share-Alike License 3.0 f
English Wikipedia and are released under the Creative Commons
Attribution-Share-Alike License 3.0
http://creativecommons.org/licenses/by-sa/3.0/ http://creativecommons.org/licenses/by-sa/3.0/
 End of changes. 18 change blocks. 
20 lines changed or deleted 71 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)