NaxsiRuleSets   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 100 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 14
loc 14
ccs 12
cts 12
cp 1
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __init__() 4 4 1

How to fix   Duplicated Code   

Duplicated Code

Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.

Common duplication problems, and corresponding solutions are:

1 1
from spike.model import db
2
3
4 1 View Code Duplication
class NaxsiRuleSets(db.Model):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.
Loading history...
5 1
    __bind_key__ = 'rules'
6 1
    __tablename__ = 'naxsi_rulesets'
7
8 1
    id = db.Column(db.Integer, primary_key=True)
9 1
    name = db.Column(db.String(1024), nullable=False, unique=True)
10 1
    remarks = db.Column(db.Text, nullable=False)
11 1
    timestamp = db.Column(db.Integer, nullable=False)
12 1
    db.UniqueConstraint('name')
13
14 1
    def __init__(self, name, remarks, timestamp):
15 1
        self.name = name
16 1
        self.remarks = remarks
17
        self.timestamp = timestamp
18