Metadata-Version: 2.1
Name: multimetric
Version: 1.3.0
Summary: Calculate code metrics in various languages
Home-page: https://github.com/priv-kweihmann/multimetric
Author: Konrad Weihmann
Author-email: kweihmann@outlook.com
License: UNKNOWN
Description: multimetric
        ===========
        
        |Build status| |PyPI version| |Python version| |Downloads| |Language
        grade: Python|
        
        Calculate code metrics in various languages
        
        Purpose
        -------
        
        This tool tries to calculate the following metrics for many, many
        programming languages
        
        -  Comment to Code percentage
        -  Cyclomatic complexity according to McCabe
        -  Difficulty according to Halstead
        -  Effort according to Halstead
        -  Fan-Out
        -  Lines of code
        -  Maintainability index
        -  Metric according to pylint
        -  Metric according to TIOBE
        -  Number of delivered bugs according to Halstead
        -  Time required to program according to Halstead
        -  Volume according to Halstead
        
        This tool was heavily inspired by
        `metrics <https://github.com/markfink/metrics>`__
        
        Requirements
        ------------
        
        -  python3
        -  `chardet <https://pypi.org/project/chardet/>`__
        -  `Pygments <http://pygments.org/>`__
        
        Installation
        ------------
        
        PyPi
        ~~~~
        
        simply run
        
        .. code:: sh
        
           pip3 install multimetric
        
        From source
        ~~~~~~~~~~~
        
        -  git clone this repository
        -  cd to <clone folder>
        -  Install the needed requirements by running
           ``pip3 install -r requirements.txt``
        -  run ``python3 setup.py build``
        
        Usage
        -----
        
        .. code:: shell
        
           usage: multimetric [-h] [--warn_compiler WARN_COMPILER]
                              [--warn_duplication WARN_DUPLICATION]
                              [--warn_functional WARN_FUNCTIONAL]
                              [--warn_standard WARN_STANDARD]
                              [--warn_security WARN_SECURITY] [--coverage COVERAGE]
                              [--bugpredict {old,new}]
                              [--maintindex {sei,classic,microsoft}]
                              files [files ...]
        
           Calculate code metrics in various languages
        
           positional arguments:
             files                 Files to parse
        
           optional arguments:
             -h, --help            show this help message and exit
             --warn_compiler WARN_COMPILER
                                   File(s) holding information about compiler warnings
             --warn_duplication WARN_DUPLICATION
                                   File(s) holding information about code duplications
             --warn_functional WARN_FUNCTIONAL
                                   File(s) holding information about static code analysis findings
             --warn_standard WARN_STANDARD
                                   File(s) holding information about language standard violations
             --warn_security WARN_SECURITY
                                   File(s) File(s) holding information about found security issue
             --coverage COVERAGE   File(s) with compiler warningsFile(s) holding information about testing coverage
             --bugpredict {old,new}
                                   Method how to calculate the bug prediction
             --maintindex {sei,classic,microsoft}
                                   Method how to calculate the maintainability index
        
           Currently you could import files of the following types for --warn_* or --coverage
        
           Following information can be read
        
               <file> = full path to file
               <content> = either a string
               <severity> = optional severity
        
               Note: you could also add a single line, then <content>
                   has to be a number reflecting to total number of findings
        
           File formats
        
           csv: CSV file of following line format
                <file>,<content>,<severity>
        
           json: JSON file
                <file>: {
                    "content": <content>,
                    "severity": <severity>
                }
        
        By default tool guesses the content type by the filename, if that
        doesn’t work for you please see below
        
        Output
        ------
        
        Output will be written to stdout as json.
        
        Output structure
        ~~~~~~~~~~~~~~~~
        
        -  ``files`` contains a list of each file passed by CLI
        -  ``overall`` contains the calculated values for all passed files
        -  ``stats`` contains the statistically calculated values over all files
           passed `see Statistical additions <#statistics>`__
        
        Item structure
        ^^^^^^^^^^^^^^
        
        +---------------+------------------------------------+-----+----------+
        | item          | description                        | ran | recommen |
        |               |                                    | ge  | dation   |
        +===============+====================================+=====+==========+
        | comment_ratio | Comment to Code percentage         | 0.. | > 30.0   |
        |               |                                    | 100 |          |
        +---------------+------------------------------------+-----+----------+
        | cyclomatic_co | Cyclomatic complexity according to | 0.. | < 10     |
        | mplexity      | McCabe                             | (in |          |
        |               |                                    | f)  |          |
        +---------------+------------------------------------+-----+----------+
        | fanout_extern | Number imports from out of tree    | 0.. |          |
        | al            | modules                            | (in |          |
        |               |                                    | f)  |          |
        +---------------+------------------------------------+-----+----------+
        | fanout_intern | Number imports from same source    | 0.. |          |
        | al            | tree modules                       | (in |          |
        |               |                                    | f)  |          |
        +---------------+------------------------------------+-----+----------+
        | halstead_bugp | Number of delivered bugs according | 0.. | < 0.05   |
        | rop           | to Halstead                        | (in |          |
        |               |                                    | f)  |          |
        +---------------+------------------------------------+-----+----------+
        | halstead_diff | Difficulty according to Halstead   | 0.. |          |
        | iculty        |                                    | (in |          |
        |               |                                    | f)  |          |
        +---------------+------------------------------------+-----+----------+
        | halstead_effo | Effort according to Halstead       | 0.. |          |
        | rt            |                                    | (in |          |
        |               |                                    | f)  |          |
        +---------------+------------------------------------+-----+----------+
        | halstead_time | Time required to program according | 0.. |          |
        | required      | to Halstead                        | (in |          |
        |               |                                    | f)  |          |
        +---------------+------------------------------------+-----+----------+
        | halstead_volu | Volume according to Halstead       | 0.. |          |
        | me            |                                    | (in |          |
        |               |                                    | f)  |          |
        +---------------+------------------------------------+-----+----------+
        | lang          | list of identified programming     | lis |          |
        |               | languages                          | t   |          |
        +---------------+------------------------------------+-----+----------+
        | loc           | Lines of code                      | 1.. |          |
        |               |                                    | (in |          |
        |               |                                    | f)  |          |
        +---------------+------------------------------------+-----+----------+
        | maintainabili | Maintainability index              | 0.. | > 80.0   |
        | ty_index      |                                    | 100 |          |
        +---------------+------------------------------------+-----+----------+
        | operands_sum  | Number of used operands            | 1.. |          |
        |               |                                    | (in |          |
        |               |                                    | f)  |          |
        +---------------+------------------------------------+-----+----------+
        | operands_uniq | Number of unique used operands     | 1.. |          |
        |               |                                    | (in |          |
        |               |                                    | f)  |          |
        +---------------+------------------------------------+-----+----------+
        | operators_sum | Number of used operators           | 1.. |          |
        |               |                                    | (in |          |
        |               |                                    | f)  |          |
        +---------------+------------------------------------+-----+----------+
        | operators_uni | Number of unique used operators    | 1.. |          |
        | q             |                                    | (in |          |
        |               |                                    | f)  |          |
        +---------------+------------------------------------+-----+----------+
        | pylint        | General quality score according to | 0.. | > 80.0   |
        |               | pylint                             | 100 |          |
        +---------------+------------------------------------+-----+----------+
        | tiobe_compile | Compiler warnings score according  | 0.. | > 90.0   |
        | r             | to TIOBE                           | 100 |          |
        +---------------+------------------------------------+-----+----------+
        | tiobe_complex | Complexity according to TIOBE      | 0.. | > 80.0   |
        | ity           |                                    | 100 |          |
        +---------------+------------------------------------+-----+----------+
        | tiobe_coverag | Coverage according to TIOBE        | 0.. | > 80.0   |
        | e             |                                    | 100 |          |
        +---------------+------------------------------------+-----+----------+
        | tiobe_duplica | Code duplications score according  | 0.. | > 80.0   |
        | tion          | to TIOBE                           | 100 |          |
        +---------------+------------------------------------+-----+----------+
        | tiobe_fanout  | Fan-Out score according to TIOBE   | 0.. | > 80.0   |
        |               |                                    | 100 |          |
        +---------------+------------------------------------+-----+----------+
        | tiobe_functio | Functional defect score according  | 0.. | > 90.0   |
        | nal           | to TIOBE                           | 100 |          |
        +---------------+------------------------------------+-----+----------+
        | tiobe_securit | Security score according to TIOBE  | 0.. | > 90.0   |
        | y             |                                    | 100 |          |
        +---------------+------------------------------------+-----+----------+
        | tiobe_standar | Language standard score according  | 0.. | > 80.0   |
        | d             | to TIOBE                           | 100 |          |
        +---------------+------------------------------------+-----+----------+
        | tiobe         | General quality score according to | 0.. | > 80.0   |
        |               | TIOBE                              | 100 |          |
        +---------------+------------------------------------+-----+----------+
        
        Statistics
        ^^^^^^^^^^
        
        The item ``stats`` contains in addition to the above mentioned the
        following items, which by themselves contain all the items mentioned at
        `Item structure <#item-structure>`__
        
        -  ``max`` = the maximum value of all items of the metric
        -  ``mean`` = statistical mean over all items of the metric
        -  ``median`` = statistical median over all items of the metric
        -  ``min`` = the minimum value of all items of the metric
        -  ``sd`` = standard deviation over all items of the metric
        
        Further reading
        ---------------
        
        -  `Pygments <http://pygments.org/>`__
        
        Bugs & Contribution
        -------------------
        
        Feel free to create issues or pull requests
        
        .. |Build status| image:: https://github.com/priv-kweihmann/multimetric/workflows/Build/badge.svg
        .. |PyPI version| image:: https://badge.fury.io/py/multimetric.svg
           :target: https://badge.fury.io/py/multimetric
        .. |Python version| image:: https://img.shields.io/pypi/pyversions/multimetric
           :target: https://img.shields.io/pypi/pyversions/multimetric
        .. |Downloads| image:: https://img.shields.io/pypi/dm/multimetric
           :target: https://img.shields.io/pypi/dm/multimetric
        .. |Language grade: Python| image:: https://img.shields.io/lgtm/grade/python/g/priv-kweihmann/multimetric.svg?logo=lgtm&logoWidth=18
           :target: https://lgtm.com/projects/g/priv-kweihmann/multimetric/context:python
        
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Natural Language :: English
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development :: Quality Assurance
Description-Content-Type: text/x-rst
