Changeset 170
- Timestamp:
- 02/04/07 07:41:23 (2 years ago)
- Files:
-
- trunk/cheesecake/cheesecake_index.py (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/cheesecake/cheesecake_index.py
r169 r170 1169 1169 return self.value 1170 1170 1171 def decide_before_download(self, cheesecake): 1172 return cheesecake.with_pep8 1173 1171 1174 class IndexCodeKwalitee(Index): 1172 1175 name = "CODE KWALITEE" … … 1255 1258 def __init__(self, name="", url="", path="", sandbox=None, 1256 1259 logfile=None, verbose=False, quiet=False, static_only=False, 1257 lite=False, keep_log=False ):1260 lite=False, keep_log=False, with_pep8=False): 1258 1261 """Initialize critical variables, download and unpack package, 1259 1262 walk package tree. … … 1282 1285 self.lite = lite 1283 1286 self.keep_log = keep_log 1287 self.with_pep8 = with_pep8 1284 1288 1285 1289 self.sandbox_pkg_file = "" … … 1743 1747 """ 1744 1748 parser = OptionParser() 1745 parser.add_option("--keep-log", action="store_true", dest="keep_log", 1746 default=False, help="don't remove log file even if run was successful") 1747 parser.add_option("--lite", action="store_true", dest="lite", 1748 default=False, help="don't run time-consuming tests (default=False)") 1749 parser.add_option("-l", "--logfile", dest="logfile", 1750 default=None, 1751 help="file to log all cheesecake messages") 1749 1750 # Options for package retrieval. 1752 1751 parser.add_option("-n", "--name", dest="name", 1753 1752 default="", help="package name (will be retrieved via setuptools utilities, if present)") 1754 1753 parser.add_option("-p", "--path", dest="path", 1755 1754 default="", help="path of tar.gz/zip package on local file system") 1755 parser.add_option("-u", "--url", dest="url", 1756 default="", help="package URL") 1757 1758 # Output formatting options. 1756 1759 parser.add_option("-q", "--quiet", action="store_true", dest="quiet", 1757 1760 default=False, help="only print Cheesecake index value (default=False)") 1761 parser.add_option("-v", "--verbose", action="store_true", dest="verbose", 1762 default=False, help="verbose output (default=False)") 1763 1764 # Index choice options. 1765 parser.add_option("--lite", action="store_true", dest="lite", 1766 default=False, help="don't run time-consuming tests (default=False)") 1767 parser.add_option("-t", "--static", action="store_true", dest="static", 1768 default=False, help="don't run any code from the package being tested (default=False)") 1769 parser.add_option("--with-pep8", action="store_true", dest="with_pep8", 1770 default=False, help="check pep8 conformance") 1771 1772 # Other options. 1773 parser.add_option("-l", "--logfile", dest="logfile", 1774 default=None, 1775 help="file to log all cheesecake messages") 1758 1776 parser.add_option("-s", "--sandbox", dest="sandbox", 1759 1777 default=None, 1760 1778 help="directory where package will be unpacked "\ 1761 1779 "(default is to use random directory inside %s)" % tempfile.gettempdir()) 1762 parser.add_option("-t", "--static", action="store_true", dest="static", 1763 default=False, help="don't run any code from the package being tested (default=False)") 1764 parser.add_option("-u", "--url", dest="url", 1765 default="", help="package URL") 1766 parser.add_option("-v", "--verbose", action="store_true", dest="verbose", 1767 default=False, help="verbose output (default=False)") 1780 parser.add_option("--keep-log", action="store_true", dest="keep_log", 1781 default=False, help="don't remove log file even if run was successful") 1782 1768 1783 parser.add_option("-V", "--version", action="store_true", dest="version", 1769 1784 default=False, help="Output cheesecake version and exit") … … 1787 1802 verbose = options.verbose 1788 1803 version = options.version 1804 with_pep8 = options.with_pep8 1789 1805 1790 1806 if version: … … 1800 1816 logfile=logfile, verbose=verbose, 1801 1817 quiet=quiet, static_only=static_only, lite=lite, 1802 keep_log=keep_log )1818 keep_log=keep_log, with_pep8=with_pep8) 1803 1819 c.compute_cheesecake_index() 1804 1820 c.cleanup()
