:mod:`lookout.style.format.benchmarks.generate_smoke` ===================================================== .. py:module:: lookout.style.format.benchmarks.generate_smoke .. autoapi-nested-parse:: A module for repositories generation with different styles in different branches. Module Contents --------------- .. py:exception:: _NoChangesException Bases::class:`Exception` Exception should be raised if no changes were made to initial code. .. data:: index_filename :annotation: = index.csv .. data:: js_operators :annotation: = ['+', '-', '*', '/', '%', '++', '--', '=', '+=', '-=', '/=', '%=', '==', '===', '!=', '!==', '>', '<', '>=', '<=', '&', '|', '~', '^', '>>', '<<', '>>>', '&&', '||', '!', '?', ':'] .. data:: js_operators_regex .. data:: js_format_rules .. function:: commit_style(repo:Repo, format_rule_name:str) Call bash script which commit all changes to `style_name` branch and checkout master back. :param repo: Repo instance to the repository for which style were applied. :param format_rule_name: Applied format rule name. :return: Two commit hashes: where style was applied and where style was disrupt. .. function:: generate_smoke_entry(inputpath:str, outputpath:str, force:bool=False) Generate repositories with different style in separate branches and its violations. :param inputpath: Path to the tar.gz archive containing initial repositories. :param outputpath: Path to the directory where the generated dataset should be stored. :param force: Override outputpath directory if exists. :return: Success status. 0 if Succeeded, 1 otherwise.