{ "info": { "author": "Robin Jarry", "author_email": "robin.jarry@external.thalesgroup.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Topic :: Documentation", "Topic :: Text Processing", "Topic :: Utilities" ], "description": ".. -*- restructuredtext -*-\r\n \r\n ======================================\r\n Sonar Quality Analysis Rules Extractor\r\n ======================================\r\n \r\n What is the Sonar Rules Extractor?\r\n ==================================\r\n \r\n The extractor is a tool that extracts the violation rules from analysis tools like Cppcheck,\r\n C++Test, Klocwork, etc. and converts them into Sonar rules.\r\n \r\n Why converting those rules into Sonar rules?\r\n ============================================\r\n \r\n When we are doing a conformity analysis of coding rules, the output of this analysis gives us\r\n a link between the line of the source file where the rule has been violated and the ``ID`` of\r\n this violated rule. An association between a rule ``ID`` and its description has to be given to\r\n Sonar.\r\n \r\n To take into account all the custom rules developed in the quality analysis tools, it is\r\n necessary to have a utility which exports those tools' rules. **The Sonar Rules Extractor is there \r\n for that.**\r\n \r\n .. note:: Sonar has by default five kinds of rule severity: ``Blocker``, ``Critical``, ``Major``,\r\n ``Minor``, ``Info``. But it is not the case for all the analysis tools. For example, in Klocwork,\r\n the severities are represented by numbers : 1 (Critical) to 10 (Info).\r\n \r\n The *Sonar Rules Extractor* will have a mapping of those levels so they mean something to Sonar.\r\n \r\n How to install it?\r\n ==================\r\n \r\n If you have Python **setuptools** already installed and have a direct internet connection, you just need\r\n to run the following command: ::\r\n \r\n root@localhost:~# easy_install -O2 sonar-rules-extractor\r\n \r\n If Python **setuptools** is not installed, please install it first.\r\n \r\n If you don't have a direct connection to the internet, download a package suitable to your distribution\r\n and install it. ::\r\n \r\n root@localhost:~# tar zxvf sonar-rules-extractor*.tar.gz\r\n ...\r\n root@localhost:~# cd sonar-rules-extractor*\r\n root@localhost:~# python setup.py install -O2\r\n ...\r\n root@localhost:~#\r\n \r\n For windows users who don't want to run the command line installer, there is a native ``.exe`` package.\r\n \r\n How to extract rules from code analysis tools?\r\n ==============================================\r\n \r\n The **Sonar Rules Extractor** comes with a command line tool ``sonar-rules-extractor``. You can run it\r\n with the ``--help`` option to get info. ::\r\n \r\n root@localhost:~# sonar-rules-extractor --help\r\n Usage: sonar-rules-extractor [options] tool \r\n \r\n depend on the tool. Generally, if no args are provided,\r\n standard input is read.\r\n \r\n Options:\r\n --version show program's version number and exit\r\n -h, --help show this help message and exit\r\n -p MODULE, --plugin=MODULE\r\n Before extraction, import the specified module and\r\n look for classes that inherit \"Extractor\" which can be\r\n used in addtion to the built-in ones. This option can\r\n be used multiple times.\r\n -f, --format-xml Pretty format XML output.\r\n -l, --list-tools List all available tools.\r\n \r\n You can get the list of available supported tools with this command: ::\r\n \r\n root@localhost:~# sonar-rules-extractor --list-tools \r\n pylint, klocwork, cpptest, gnatcheck, qac, qacpp, cppcheck, logiscope\r\n \r\n Here is an example extraction for PyLint: ::\r\n \r\n root@localhost:~# pylint --list-msgs | sonar-rules-extractor pylint --format-xml > pylint-sonar-rules.xml\r\n root@localhost:~# cat pylint-sonar-rules.xml\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n .......\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n ", "description_content_type": null, "docs_url": null, "download_url": null, "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://pypi.python.org/pypi/sonar-rules-extractor", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "sonar-rules-extractor", "package_url": "https://pypi.org/project/sonar-rules-extractor/", "platform": "any", "project_url": "https://pypi.org/project/sonar-rules-extractor/", "project_urls": { "Homepage": "http://pypi.python.org/pypi/sonar-rules-extractor" }, "release_url": "https://pypi.org/project/sonar-rules-extractor/1.1/", "requires_dist": null, "requires_python": null, "summary": "Coding rules extractor into the Sonar format.", "version": "1.1" }, "last_serial": 799827, "releases": { "1.1": [ { "comment_text": "", "digests": { "md5": "ed6894d0a530b82f33403fef5e6c8bf5", "sha256": "2e96b056cd3deba2d8506efac2f3f8144a5df856c847028328fbbd012084ca13" }, "downloads": -1, "filename": "sonar-rules-extractor-1.1.tar.gz", "has_sig": false, "md5_digest": "ed6894d0a530b82f33403fef5e6c8bf5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13269, "upload_time": "2012-05-04T18:04:10", "url": "https://files.pythonhosted.org/packages/48/cd/b0b70894344f17acea86105d35ba12cadce6c5aae4c44292ca883d273b21/sonar-rules-extractor-1.1.tar.gz" }, { "comment_text": "", "digests": { "md5": "ac103e744600eae0a9265791f9e5b632", "sha256": "38a56e78a632f6500949361343e0512afa38a258758afdcf634b82ea0b7cd4da" }, "downloads": -1, "filename": "sonar-rules-extractor-1.1.win32.exe", "has_sig": false, "md5_digest": "ac103e744600eae0a9265791f9e5b632", "packagetype": "bdist_wininst", "python_version": "any", "requires_python": null, "size": 221719, "upload_time": "2012-05-04T18:04:29", "url": "https://files.pythonhosted.org/packages/5f/1e/3179900623d429fc0ea340d68470c6ab990f8c8cbff8c74558e171bb07d4/sonar-rules-extractor-1.1.win32.exe" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ed6894d0a530b82f33403fef5e6c8bf5", "sha256": "2e96b056cd3deba2d8506efac2f3f8144a5df856c847028328fbbd012084ca13" }, "downloads": -1, "filename": "sonar-rules-extractor-1.1.tar.gz", "has_sig": false, "md5_digest": "ed6894d0a530b82f33403fef5e6c8bf5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13269, "upload_time": "2012-05-04T18:04:10", "url": "https://files.pythonhosted.org/packages/48/cd/b0b70894344f17acea86105d35ba12cadce6c5aae4c44292ca883d273b21/sonar-rules-extractor-1.1.tar.gz" }, { "comment_text": "", "digests": { "md5": "ac103e744600eae0a9265791f9e5b632", "sha256": "38a56e78a632f6500949361343e0512afa38a258758afdcf634b82ea0b7cd4da" }, "downloads": -1, "filename": "sonar-rules-extractor-1.1.win32.exe", "has_sig": false, "md5_digest": "ac103e744600eae0a9265791f9e5b632", "packagetype": "bdist_wininst", "python_version": "any", "requires_python": null, "size": 221719, "upload_time": "2012-05-04T18:04:29", "url": "https://files.pythonhosted.org/packages/5f/1e/3179900623d429fc0ea340d68470c6ab990f8c8cbff8c74558e171bb07d4/sonar-rules-extractor-1.1.win32.exe" } ] }