cre-ne-jp/log-archiver

View on GitHub
lib/log_archiver/irc_text_attribute.rb

Summary

Maintainability
B
4 hrs
Test Coverage

Showing 4 of 4 total issues

Class IrcTextAttribute has 22 methods (exceeds 20 allowed). Consider refactoring.
Open

class IrcTextAttribute
# @return [Boolean] ε€ͺ字にするか
attr_reader :bold
# @return [Boolean] δΈ‹η·šγ‚’εΌ•γγ‹
attr_reader :underline
Severity: Minor
Found in lib/log_archiver/irc_text_attribute.rb - About 2 hrs to fix

    Method span_tag has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
    Open

    def span_tag(text)
    classes = [
    @bold ? 'mirc-bold' : nil,
    @italic ? 'mirc-italic' : nil,
    @underline ? 'mirc-underline' : nil,
    Severity: Minor
    Found in lib/log_archiver/irc_text_attribute.rb - About 2 hrs to fix

    Cyclomatic complexity for == is too high. [10/6]
    Open

    def ==(other)
    other.bold == @bold &&
    other.underline == @underline &&
    other.italic == @italic &&
    other.strikethrough == @strikethrough &&

    Cyclomatic complexity for span_tag is too high. [10/6]
    Open

    def span_tag(text)
    classes = [
    @bold ? 'mirc-bold' : nil,
    @italic ? 'mirc-italic' : nil,
    @underline ? 'mirc-underline' : nil,
    Category
    Status