Bitbucket is a code hosting site with unlimited public and private repositories. We're also free for small teams!

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:

    hgcodesmell = path/to/

There 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 files

You can add more of them by editing'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.

Recent activity

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.