<commit_before>from coalib.bearlib.abstractions.Lint import Lint
from coalib.bears.LocalBear import LocalBear


class GoReturnsBear(Lint, LocalBear):
    executable = 'goreturns'
    diff_message = "Imports or returns need to be added/removed."
    use_stdin = True
    gives_corrected = True
    LANGUAGES = "Go"

    def run(self, filename, file):
        """
        Proposes corrections of Go code using gofmt.
        """
        return self.lint(filename, file)<commit_msg>GoReturnsBear: Refactor to Linter v2 API<commit_after>from coalib.bearlib.abstractions.Linter import linter


@linter(executable='goreturns',
        use_stdin=True,
        output_format='corrected',
        diff_message='Imports or returns need to be added/removed.')
class GoReturnsBear:
    """
    Proposes corrections of Go code using ``goreturns``.
    """
    LANGUAGES = "Go"

    @staticmethod
    def create_arguments(filename, file, config_file):
        return ()
{'fraction_non_alphanumeric': 0.09319371727748692, 'fraction_numerical': 0.0010471204188481676, 'mean_word_length': 3.3454545454545452, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5798749', 'n_tokens_mistral': 307, 'n_tokens_neox': 293, 'n_words': 76}