-
Notifications
You must be signed in to change notification settings - Fork 6
Avoid trailing whitespaces #5
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
Comments
I think it's better if we remove any artwork found in the code. |
I'm also all for removing trailing whitespace on encounter. However, I'm not so sure about creating a new style rule especially for this.... |
I think that’s sensible (advising use of editors that note trailing whitespace). I don’t happen to use such a plugin, but On that note, large empty diffs are bad. We should decide to edit only when things are touched and/or kick off a big change only when a large proportion of branches are currently merged - maybe after releases?
|
I think your plug-in is helpful. I don't know we need to require that On Thu, Oct 27, 2016 at 3:52 PM, lukpueh notifications@github.com wrote:
|
Just found a neat hidden feature on GitHub secrets. |
Adding to the santiago at ~/tuf ✔ git diff --check HEAD^
src/tuf/tests/simple_server.py:4: trailing whitespace.
+
src/tuf/tests/simple_server.py:10: trailing whitespace.
+
src/tuf/tests/simple_server.py:15: trailing whitespace.
+ This is a basic server that was designed to be used in conjunction with
src/tuf/tests/simple_server.py:16: trailing whitespace.
+ test_download.py to test download.py module.
src/tuf/tests/test_download.py:19: trailing whitespace.
+Otherwise, module that launches simple server would not be found.
src/tuf/tests/test_download.py:75: trailing whitespace.
+ self.target_hash = {'md5':digest}
src/tuf/tests/test_download.py:103: trailing whitespace.
+ required_hashes=self.target_hash)
src/tuf/tests/test_download.py:110: trailing whitespace.
+ required_hashes=self.target_hash,
src/tuf/tests/test_download.py:117: trailing whitespace.
+ self.assertRaises(tuf.DownloadError,
src/tuf/tests/test_download.py:119: trailing whitespace.
+ required_hashes=self.target_hash,
src/tuf/tests/test_download.py:122: trailing whitespace.
+ self.assertRaises(tuf.DownloadError,
src/tuf/tests/test_download.py:124: trailing whitespace.
+ required_hashes=self.target_hash,
src/tuf/tests/test_download.py:128: trailing whitespace.
+ self.assertRaises(tuf.DownloadError,
src/tuf/tests/test_download.py:136: trailing whitespace.
+ required_hashes=self.target_hash,
src/tuf/tests/test_download.py:142: trailing whitespace.
+ required_hashes=self.target_hash,
src/tuf/tests/test_download.py:148: trailing whitespace.
+ required_hashes=self.target_hash,
src/tuf/tests/test_download.py:154: trailing whitespace.
+ required_hashes=self.target_hash,
src/tuf/tests/test_download.py:164: trailing whitespace.
+ required_hashes=self.target_hash,
src/tuf/tests/test_download.py:168: trailing whitespace.
+ end_real = time.time() (This looks better with colored output) |
The newly referenced Google style guide mentions avoiding trailing whitespace, and so does PEP 8. Moreover, linters will easily flag this. I suggest we close the issue with #21. |
I recently started using a text editor plugin that unveils trailing white spaces in a funky color. This makes all of our projects look like pieces of modern art.
We do say that our guidelines are based on
Pep 8
which mentions that one should avoid trailing white spaces for good reasons (other than distracting people with said plugins).Does anyone care for a tiny addition to the guidelines, encouraging using text editor plugins/options that show trailing whites paces, and or linters like
flake8
which warn about them? Or should I just stop using my plugin?The text was updated successfully, but these errors were encountered: