-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[doc] Move the additional command section to user guide
- Loading branch information
1 parent
863e114
commit 2d3853f
Showing
4 changed files
with
52 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
.. _symilar: | ||
|
||
Symilar | ||
------- | ||
|
||
The console script ``symilar`` finds copy pasted blocks in a set of files. It provides a command line interface to the ``Similar`` class, which includes the logic for | ||
Pylint's ``duplicate-code`` message. | ||
It can be invoked with:: | ||
|
||
symilar [-d|--duplicates min_duplicated_lines] [-i|--ignore-comments] [--ignore-docstrings] [--ignore-imports] [--ignore-signatures] file1... | ||
|
||
All files that shall be checked have to be passed in explicitly, e.g.:: | ||
|
||
symilar foo.py, bar.py, subpackage/spam.py, subpackage/eggs.py | ||
|
||
``symilar`` produces output like the following:: | ||
|
||
17 similar lines in 2 files | ||
==tests/data/clientmodule_test.py:3 | ||
==tests/data/suppliermodule_test.py:12 | ||
class Ancestor: | ||
""" Ancestor method """ | ||
__implements__ = (Interface,) | ||
cls_member = DoNothing() | ||
|
||
def __init__(self, value): | ||
local_variable = 0 | ||
self.attr = 'this method shouldn\'t have a docstring' | ||
self.__value = value | ||
|
||
def get_value(self): | ||
""" nice docstring ;-) """ | ||
return self.__value | ||
|
||
def set_value(self, value): | ||
self.__value = value | ||
return 'this method shouldn\'t have a docstring' | ||
TOTAL lines=58 duplicates=17 percent=29.31 |