Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/birkenfeld/hgcodesmell
https://github.com/birkenfeld/hgcodesmell
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/birkenfeld/hgcodesmell
- Owner: birkenfeld
- Created: 2019-08-23T05:20:05.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-08-23T05:21:23.000Z (over 5 years ago)
- Last Synced: 2024-10-31T10:43:17.333Z (3 months ago)
- Language: Python
- Size: 14.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
README
Mercurial codesmell extension
=============================This extension hooks in before commit and checks added lines for common
"smelly" changes. If it finds any, it will show them and prompt whether
to continue committing.To enable, activate it in your hgrc file like this:
[extensions]
hgcodesmell = path/to/hgcodesmell.pyThere is currently no other configuration you can set.
Smelly patterns that are currently recognized are:
* pdb.set_trace(), in Python files
* 1/0, in Python files
* print statements, in Python files
(I know this is going to produce false positives, but print statements
are also the debugging tool #1 for Python)
* vim "quit" commands that leak into the file because of wrong mode
* Windows newlines (only on non-Windows platforms)
* debugger; statements inside of Javascript filesYou can add more of them by editing hgcodesmell.py's SMELLY_STUFF dictionary.
This extension is copyright 2009, 2010 by Georg Brandl, and can be
distributed under the GNU GPL version 2 or later.