-
Notifications
You must be signed in to change notification settings - Fork 466
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
README: elaborate of some noteworthy usage flags #143
Conversation
Codecov Report
@@ Coverage Diff @@
## master #143 +/- ##
=======================================
Coverage 89.01% 89.01%
=======================================
Files 3 3
Lines 619 619
Branches 86 86
=======================================
Hits 551 551
Misses 53 53
Partials 15 15 Continue to review full report at Codecov.
|
You can use the GitHub interface to see the rendered version: https://github.com/luzpaz/codespell/blob/8b6b2406a269353ff6710011f0bfd861dc9ed2be/README.rst |
99d9d69
to
1e48e3a
Compare
Ok, i fixed the formatting issue AFAICT. .rst seems like a weird format at least to me. How does it read? Ok? |
README.rst
Outdated
|
||
codespell -w, --write-changes | ||
|
||
The -w flag will actually implement the changes recommended by codespell. Not running with ``-w`` flag is equated with doing a dry run. Recommended to run this with the ``-i`` or ``--ineractive`` flag.:: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is equated -> is the same as
Recommended to -> It is recommended to
--ineractive -> --interactive
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
README.rst
Outdated
|
||
codespell -S, --skip= | ||
|
||
Comma-separated list of files to skip. It accepts globs as well. Example: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Examples:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
README.rst
Outdated
|
||
Comma-separated list of files to skip. It accepts globs as well. Example: | ||
|
||
to skip .eps & .txt files, invoke ``codespell --skip="*.eps,*.txt"`` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* to skip ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
README.rst
Outdated
|
||
to skip .eps & .txt files, invoke ``codespell --skip="*.eps,*.txt"`` | ||
|
||
to skip directories, invoke ``codespell --skip="./src/3rd-Party,./src/Test"`` :: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* to skip ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
README.rst
Outdated
|
||
codespell -I FILE, --ignore-words=FILE | ||
|
||
This flag can be used to whitelist certain words that are in the ``codespell_lib/data/dictionary.txt``. Format of whitelist file is one word per line. Invoke ``codespell -I path/to/file.txt`` to execute codespell referencing said whitelist. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Format of whitelist -> The format of the whitelist
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
README.rst
Outdated
|
||
codespell -i 3 -w | ||
|
||
Will run interactive mode level 3 and write changes to file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will run -> Run
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
the whitelist passed to |
65e8611
to
d33a91a
Compare
I think you can just say that "The whitelist passed to -I is case-sensitive based on how it is listed in dictionary.txt.", and people in these corner cases will figure out the correct usage. |
d33a91a
to
a93d633
Compare
👍 |
I added a section on upgrading using pip. Please offer feedback as well. Thanks! |
README.rst
Outdated
-------- | ||
To stay current with codespell developments it is possible to build codespell from GitHub via:: | ||
|
||
pip3 install --upgrade git+https://github.com/lucasdemarchi/codespell.git |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should just say pip
and assume this links to the correct place (people who need to use pip3
instead of pip
hopefully already understand their environment)
README.rst
Outdated
|
||
pip3 install --user --upgrade git+https://github.com/lucasdemarchi/codespell.git | ||
|
||
* It has been reported that after installing from `pip`, codespell can't be located. Please check the $PATH variable to see if `~/.local/bin` is present. If it isn't then add it to your path. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
double-backticks on inline code in RST format (otherwise it's interpreted as a link)
README.rst
Outdated
pip3 install --user --upgrade git+https://github.com/lucasdemarchi/codespell.git | ||
|
||
* It has been reported that after installing from `pip`, codespell can't be located. 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 installed versions of codespell (via you OSs preferred app mananger). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
8f9c1ce
to
703ab37
Compare
@larsoner |
703ab37
to
ace6c0d
Compare
README.rst
Outdated
-------- | ||
To stay current with codespell developments it is possible to build codespell from GitHub via:: | ||
|
||
``pip install --upgrade git+https://github.com/lucasdemarchi/codespell.git`` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't use double-backticks in code blocks
README.rst
Outdated
``pip install --upgrade git+https://github.com/lucasdemarchi/codespell.git`` | ||
|
||
**Important Notes:** | ||
* Sometimes installing via `pip` will complain about permissions. If this is the case then run with :: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use double-backticks here for pip
(with inline code)
README.rst
Outdated
|
||
``pip install --user --upgrade git+https://github.com/lucasdemarchi/codespell.git`` | ||
|
||
* It has been reported that after installing from `pip`, codespell can't be located. Please check the $PATH variable to see if `~/.local/bin` is present. If it isn't then add it to your path. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and here, pip
and ~/local/bin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see how they don't render properly
https://github.com/luzpaz/codespell/blob/ace6c0d9b84c74fa9fff698bdab6763b90cd1ae8/README.rst
Also offer some examples. and added an Update section final
ace6c0d
to
70809c0
Compare
Ok, just not used to .RST |
Thanks @luzpaz |
Also offer some examples.
Devs, this PR needs feedback. I'm not familiar with .rst format so much. I am pretty sure tweaks are needed.