Ousret/Picross-L3S6

View on GitHub
class/registre.class.rb

Summary

Maintainability
A
0 mins
Test Coverage

Method has too many lines. [17/10]
Open

    def addParam(uneCle, uneValeur)
        if getValue(uneCle) != nil
            return updateParam(uneCle, uneValeur)
        end

Severity: Minor
Found in class/registre.class.rb by rubocop

This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

Method has too many lines. [17/10]
Open

    def updateParam(uneCle, uneValeur)
        if getValue(uneCle) == nil
            return addParam uneCle, uneValeur
        end
        connect
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

Method has too many lines. [14/10]
Open

    def deleteParam(uneCle)
        return false if getValue(uneCle) == nil
        connect

        #Procédure suceptible de lever une exception
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

Method has too many lines. [12/10]
Open

    def getValue(uneCle)
        connect
        stm = @db.prepare "SELECT value FROM REGISTRE WHERE key = ?"
        stm.bind_param 1, uneCle

Severity: Minor
Found in class/registre.class.rb by rubocop

This cop checks if the length of a method exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable.

Missing space after #.
Open

    #Méthode de création d'instance de la classe Basedonnee.
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop checks whether comments have a leading space after the # denoting the start of the comment. The leading space is not required for some RDoc special syntax, like #++, #--, #:nodoc, =begin- and =end comments, "shebang" directives, or rackup options.

Example:

# bad
#Some comment

# good
# Some comment

Missing space after #.
Open

    #Méthode de mise à jour d'un paramètre dans le registre
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop checks whether comments have a leading space after the # denoting the start of the comment. The leading space is not required for some RDoc special syntax, like #++, #--, #:nodoc, =begin- and =end comments, "shebang" directives, or rackup options.

Example:

# bad
#Some comment

# good
# Some comment

Tab detected.
Open

    #Indique la valeur de la cle de criptage
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

    # Décode un buffer YAML
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

    #Méthode d'ajout de couple parametre valeur dans une base de donnee
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

    def addParam(uneCle, uneValeur)
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

        end
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

        ensure
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

        end
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

    # * *Returns* :
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

        # Si aucun résultat n'existe
Severity: Minor
Found in class/registre.class.rb by rubocop

Use snake_case for method names.
Open

    def updateParam(uneCle, uneValeur)
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop makes sure that all methods use the configured style, snake_case or camelCase, for their names.

Example: EnforcedStyle: snake_case (default)

# bad
def fooBar; end

# good
def foo_bar; end

Example: EnforcedStyle: camelCase

# bad
def foo_bar; end

# good
def fooBar; end

Use snake_case for variable names.
Open

    def initialize(unNom) # :nodoc:
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop makes sure that all variables use the configured style, snake_case or camelCase, for their names.

Example: EnforcedStyle: snake_case (default)

# bad
fooBar = 1

# good
foo_bar = 1

Example: EnforcedStyle: camelCase

# bad
foo_bar = 1

# good
fooBar = 1

Use only ascii symbols in comments.
Open

    # - +uneCle+ -> Nom du paramètre cible
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop checks for non-ascii (non-English) characters in comments. You could set an array of allowed non-ascii chars in AllowedChars attribute (empty by default).

Example:

# bad
# Translates from English to 日本語。

# good
# Translates from English to Japanese

Use only ascii symbols in comments.
Open

    #Méthode de mise à jour d'un paramètre dans le registre
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop checks for non-ascii (non-English) characters in comments. You could set an array of allowed non-ascii chars in AllowedChars attribute (empty by default).

Example:

# bad
# Translates from English to 日本語。

# good
# Translates from English to Japanese

Use self.creer instead of Registre.creer.
Open

    def Registre.creer(unNom)
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop checks for uses of the class/module name instead of self, when defining class/module methods.

Example:

# bad
class SomeClass
  def SomeClass.class_method
    # ...
  end
end

# good
class SomeClass
  def self.class_method
    # ...
  end
end

Redundant return detected.
Open

        return decode(res)
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop checks for redundant return expressions.

Example:

def test
  return something
end

def test
  one
  two
  three
  return something
end

It should be extended to handle methods whose body is if/else or a case expression with a default branch.

Prefer single-quoted strings when you don't need string interpolation or special symbols.
Open

        @db.execute "CREATE TABLE IF NOT EXISTS REGISTRE(id_registre INTEGER PRIMARY KEY, key TEXT, value BLOB)"
Severity: Minor
Found in class/registre.class.rb by rubocop

Checks if uses of quotes match the configured preference.

Example: EnforcedStyle: single_quotes (default)

# bad
"No special symbols"
"No string interpolation"
"Just text"

# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"

Example: EnforcedStyle: double_quotes

# bad
'Just some text'
'No special chars or interpolation'

# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"

Prefer single-quoted strings when you don't need string interpolation or special symbols.
Open

            stm = @db.prepare "UPDATE REGISTRE SET value =  ? WHERE key = ?"
Severity: Minor
Found in class/registre.class.rb by rubocop

Checks if uses of quotes match the configured preference.

Example: EnforcedStyle: single_quotes (default)

# bad
"No special symbols"
"No string interpolation"
"Just text"

# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"

Example: EnforcedStyle: double_quotes

# bad
'Just some text'
'No special chars or interpolation'

# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"

Extra empty line detected at class body beginning.
Open


    #Indique la valeur de la base de donnee
Severity: Minor
Found in class/registre.class.rb by rubocop

This cops checks if empty lines around the bodies of classes match the configuration.

Example: EnforcedStyle: empty_lines

# good

class Foo

  def bar
    # ...
  end

end

Example: EnforcedStyle: emptylinesexcept_namespace

# good

class Foo
  class Bar

    # ...

  end
end

Example: EnforcedStyle: emptylinesspecial

# good
class Foo

  def bar; end

end

Example: EnforcedStyle: noemptylines (default)

# good

class Foo
  def bar
    # ...
  end
end

Use 2 (not 1) spaces for indentation.
Open

    private_class_method :new
Severity: Minor
Found in class/registre.class.rb by rubocop

This cops checks for indentation that doesn't use the specified number of spaces.

See also the IndentationConsistency cop which is the companion to this one.

Example:

# bad
class A
 def test
  puts 'hello'
 end
end

# good
class A
  def test
    puts 'hello'
  end
end

Example: IgnoredPatterns: ['^\s*module']

# bad
module A
class B
  def test
  puts 'hello'
  end
end
end

# good
module A
class B
  def test
    puts 'hello'
  end
end
end

Use 2 (not 1) spaces for indentation.
Open

            stm = @db.prepare "UPDATE REGISTRE SET value =  ? WHERE key = ?"
Severity: Minor
Found in class/registre.class.rb by rubocop

This cops checks for indentation that doesn't use the specified number of spaces.

See also the IndentationConsistency cop which is the companion to this one.

Example:

# bad
class A
 def test
  puts 'hello'
 end
end

# good
class A
  def test
    puts 'hello'
  end
end

Example: IgnoredPatterns: ['^\s*module']

# bad
module A
class B
  def test
  puts 'hello'
  end
end
end

# good
module A
class B
  def test
    puts 'hello'
  end
end
end

Tab detected.
Open

    # * *Returns* :
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

    def initialize(unNom) # :nodoc:
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

    end
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

        end
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

            stm = @db.prepare "UPDATE REGISTRE SET value =  ? WHERE key = ?"
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

            puts "<SQLite> #{e}"
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

        return false if getValue(uneCle) == nil
Severity: Minor
Found in class/registre.class.rb by rubocop

Use only ascii symbols in comments.
Open

    #Méthode d'ajout de couple parametre valeur dans une base de donnee
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop checks for non-ascii (non-English) characters in comments. You could set an array of allowed non-ascii chars in AllowedChars attribute (empty by default).

Example:

# bad
# Translates from English to 日本語。

# good
# Translates from English to Japanese

Favor modifier if usage when having a single-line body. Another good alternative is the usage of control flow &&/||.
Open

        if getValue(uneCle) != nil
Severity: Minor
Found in class/registre.class.rb by rubocop

Checks for if and unless statements that would fit on one line if written as a modifier if/unless. The maximum line length is configured in the Metrics/LineLength cop.

Example:

# bad
if condition
  do_stuff(bar)
end

unless qux.empty?
  Foo.do_something
end

# good
do_stuff(bar) if condition
Foo.do_something unless qux.empty?

Favor modifier if usage when having a single-line body. Another good alternative is the usage of control flow &&/||.
Open

        if getValue(uneCle) == nil
Severity: Minor
Found in class/registre.class.rb by rubocop

Checks for if and unless statements that would fit on one line if written as a modifier if/unless. The maximum line length is configured in the Metrics/LineLength cop.

Example:

# bad
if condition
  do_stuff(bar)
end

unless qux.empty?
  Foo.do_something
end

# good
do_stuff(bar) if condition
Foo.do_something unless qux.empty?

Prefer !expression.nil? over expression != nil.
Open

            release if @db != nil
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop checks for non-nil checks, which are usually redundant.

Example:

# bad
if x != nil
end

# good (when not allowing semantic changes)
# bad (when allowing semantic changes)
if !x.nil?
end

# good (when allowing semantic changes)
if x
end

Non-nil checks are allowed if they are the final nodes of predicate.

# good
def signed_in?
  !current_user.nil?
end

Prefer !expression.nil? over expression != nil.
Open

            release if @db != nil
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop checks for non-nil checks, which are usually redundant.

Example:

# bad
if x != nil
end

# good (when not allowing semantic changes)
# bad (when allowing semantic changes)
if !x.nil?
end

# good (when allowing semantic changes)
if x
end

Non-nil checks are allowed if they are the final nodes of predicate.

# good
def signed_in?
  !current_user.nil?
end

Use 2 (not 1) spaces for indentation.
Open

        return false if getValue(uneCle) == nil
Severity: Minor
Found in class/registre.class.rb by rubocop

This cops checks for indentation that doesn't use the specified number of spaces.

See also the IndentationConsistency cop which is the companion to this one.

Example:

# bad
class A
 def test
  puts 'hello'
 end
end

# good
class A
  def test
    puts 'hello'
  end
end

Example: IgnoredPatterns: ['^\s*module']

# bad
module A
class B
  def test
  puts 'hello'
  end
end
end

# good
module A
class B
  def test
    puts 'hello'
  end
end
end

Missing space after #.
Open

    #Indique la valeur de la base de donnee
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop checks whether comments have a leading space after the # denoting the start of the comment. The leading space is not required for some RDoc special syntax, like #++, #--, #:nodoc, =begin- and =end comments, "shebang" directives, or rackup options.

Example:

# bad
#Some comment

# good
# Some comment

Tab detected.
Open

    #Indique la valeur de la base de donnee
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

    end
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

    # Ferme l'instance SQLite3 si déjà ouvert
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

        @db.execute "CREATE TABLE IF NOT EXISTS REGISTRE(id_registre INTEGER PRIMARY KEY, key TEXT, value BLOB)"
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

        release
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

    end
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

            stm.bind_param 2, encode(uneValeur)
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

    # - +uneCle+ -> Nom du paramètre cible
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

        end
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

        rescue SQLite3::Exception => e
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

    #Méthode de supression de paramètre dans le registre
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

    # * *Arguments* :
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

    # * *Arguments* :
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

        stm = @db.prepare "SELECT value FROM REGISTRE WHERE key = ?"
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

        stm.bind_param 1, uneCle
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

        rs = row.next
Severity: Minor
Found in class/registre.class.rb by rubocop

Use snake_case for variable names.
Open

    def deleteParam(uneCle)
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop makes sure that all variables use the configured style, snake_case or camelCase, for their names.

Example: EnforcedStyle: snake_case (default)

# bad
fooBar = 1

# good
foo_bar = 1

Example: EnforcedStyle: camelCase

# bad
foo_bar = 1

# good
fooBar = 1

Use only ascii symbols in comments.
Open

    # Ferme l'instance SQLite3 si déjà ouvert
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop checks for non-ascii (non-English) characters in comments. You could set an array of allowed non-ascii chars in AllowedChars attribute (empty by default).

Example:

# bad
# Translates from English to 日本語。

# good
# Translates from English to Japanese

Use only ascii symbols in comments.
Open

    #Méthode de lecture d'un paramètre dans le registre
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop checks for non-ascii (non-English) characters in comments. You could set an array of allowed non-ascii chars in AllowedChars attribute (empty by default).

Example:

# bad
# Translates from English to 日本語。

# good
# Translates from English to Japanese

Prefer the use of the nil? predicate.
Open

        if rs == nil
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop checks for comparison of something with nil using ==.

Example:

# bad
if x == nil
end

# good
if x.nil?
end

Use 2 (not 1) spaces for indentation.
Open

        @myCrypt, @db, @fileName = Gibberish::AES::CBC.new('p4ssw0rd'), nil, unNom
Severity: Minor
Found in class/registre.class.rb by rubocop

This cops checks for indentation that doesn't use the specified number of spaces.

See also the IndentationConsistency cop which is the companion to this one.

Example:

# bad
class A
 def test
  puts 'hello'
 end
end

# good
class A
  def test
    puts 'hello'
  end
end

Example: IgnoredPatterns: ['^\s*module']

# bad
module A
class B
  def test
  puts 'hello'
  end
end
end

# good
module A
class B
  def test
    puts 'hello'
  end
end
end

Prefer !expression.nil? over expression != nil.
Open

            release if @db != nil
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop checks for non-nil checks, which are usually redundant.

Example:

# bad
if x != nil
end

# good (when not allowing semantic changes)
# bad (when allowing semantic changes)
if !x.nil?
end

# good (when allowing semantic changes)
if x
end

Non-nil checks are allowed if they are the final nodes of predicate.

# good
def signed_in?
  !current_user.nil?
end

Use 2 (not 1) spaces for indentation.
Open

        connect
Severity: Minor
Found in class/registre.class.rb by rubocop

This cops checks for indentation that doesn't use the specified number of spaces.

See also the IndentationConsistency cop which is the companion to this one.

Example:

# bad
class A
 def test
  puts 'hello'
 end
end

# good
class A
  def test
    puts 'hello'
  end
end

Example: IgnoredPatterns: ['^\s*module']

# bad
module A
class B
  def test
  puts 'hello'
  end
end
end

# good
module A
class B
  def test
    puts 'hello'
  end
end
end

Redundant return detected.
Open

        return true
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop checks for redundant return expressions.

Example:

def test
  return something
end

def test
  one
  two
  three
  return something
end

It should be extended to handle methods whose body is if/else or a case expression with a default branch.

Use 2 (not 1) spaces for indentation.
Open

            puts "<SQLite3> #{e}"
Severity: Minor
Found in class/registre.class.rb by rubocop

This cops checks for indentation that doesn't use the specified number of spaces.

See also the IndentationConsistency cop which is the companion to this one.

Example:

# bad
class A
 def test
  puts 'hello'
 end
end

# good
class A
  def test
    puts 'hello'
  end
end

Example: IgnoredPatterns: ['^\s*module']

# bad
module A
class B
  def test
  puts 'hello'
  end
end
end

# good
module A
class B
  def test
    puts 'hello'
  end
end
end

Tab detected.
Open

    # Méthode de connexion SQLite3, créer une instance SQLite3.
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

    # * *Returns* :
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

        if getValue(uneCle) != nil
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

            return false
Severity: Minor
Found in class/registre.class.rb by rubocop

Script file registre.class.rb doesn't have execute permission.
Open

#!/usr/bin/ruby
Severity: Minor
Found in class/registre.class.rb by rubocop

Use snake_case for variable names.
Open

        @myCrypt, @db, @fileName = Gibberish::AES::CBC.new('p4ssw0rd'), nil, unNom
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop makes sure that all variables use the configured style, snake_case or camelCase, for their names.

Example: EnforcedStyle: snake_case (default)

# bad
fooBar = 1

# good
foo_bar = 1

Example: EnforcedStyle: camelCase

# bad
foo_bar = 1

# good
fooBar = 1

Use only ascii symbols in comments.
Open

    # Vérifie que la table de registre est déjà créer, sinon créer une nouvelle table
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop checks for non-ascii (non-English) characters in comments. You could set an array of allowed non-ascii chars in AllowedChars attribute (empty by default).

Example:

# bad
# Translates from English to 日本語。

# good
# Translates from English to Japanese

Use only ascii symbols in comments.
Open

    # Décode un buffer YAML
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop checks for non-ascii (non-English) characters in comments. You could set an array of allowed non-ascii chars in AllowedChars attribute (empty by default).

Example:

# bad
# Translates from English to 日本語。

# good
# Translates from English to Japanese

Use only ascii symbols in comments.
Open

        # Si aucun résultat n'existe
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop checks for non-ascii (non-English) characters in comments. You could set an array of allowed non-ascii chars in AllowedChars attribute (empty by default).

Example:

# bad
# Translates from English to 日本語。

# good
# Translates from English to Japanese

Use 2 (not 1) spaces for indentation.
Open

        @db.close if @db != nil
Severity: Minor
Found in class/registre.class.rb by rubocop

This cops checks for indentation that doesn't use the specified number of spaces.

See also the IndentationConsistency cop which is the companion to this one.

Example:

# bad
class A
 def test
  puts 'hello'
 end
end

# good
class A
  def test
    puts 'hello'
  end
end

Example: IgnoredPatterns: ['^\s*module']

# bad
module A
class B
  def test
  puts 'hello'
  end
end
end

# good
module A
class B
  def test
    puts 'hello'
  end
end
end

Use 2 (not 1) spaces for indentation.
Open

        @myCrypt.decrypt(unBuffer)
Severity: Minor
Found in class/registre.class.rb by rubocop

This cops checks for indentation that doesn't use the specified number of spaces.

See also the IndentationConsistency cop which is the companion to this one.

Example:

# bad
class A
 def test
  puts 'hello'
 end
end

# good
class A
  def test
    puts 'hello'
  end
end

Example: IgnoredPatterns: ['^\s*module']

# bad
module A
class B
  def test
  puts 'hello'
  end
end
end

# good
module A
class B
  def test
    puts 'hello'
  end
end
end

Use 2 (not 1) spaces for indentation.
Open

            return addParam uneCle, uneValeur
Severity: Minor
Found in class/registre.class.rb by rubocop

This cops checks for indentation that doesn't use the specified number of spaces.

See also the IndentationConsistency cop which is the companion to this one.

Example:

# bad
class A
 def test
  puts 'hello'
 end
end

# good
class A
  def test
    puts 'hello'
  end
end

Example: IgnoredPatterns: ['^\s*module']

# bad
module A
class B
  def test
  puts 'hello'
  end
end
end

# good
module A
class B
  def test
    puts 'hello'
  end
end
end

Use 2 (not 1) spaces for indentation.
Open

        connect
Severity: Minor
Found in class/registre.class.rb by rubocop

This cops checks for indentation that doesn't use the specified number of spaces.

See also the IndentationConsistency cop which is the companion to this one.

Example:

# bad
class A
 def test
  puts 'hello'
 end
end

# good
class A
  def test
    puts 'hello'
  end
end

Example: IgnoredPatterns: ['^\s*module']

# bad
module A
class B
  def test
  puts 'hello'
  end
end
end

# good
module A
class B
  def test
    puts 'hello'
  end
end
end

Missing space after #.
Open

    #@myCrypt
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop checks whether comments have a leading space after the # denoting the start of the comment. The leading space is not required for some RDoc special syntax, like #++, #--, #:nodoc, =begin- and =end comments, "shebang" directives, or rackup options.

Example:

# bad
#Some comment

# good
# Some comment

Missing space after #.
Open

    #Empêche l'utilisation de la méthode new
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop checks whether comments have a leading space after the # denoting the start of the comment. The leading space is not required for some RDoc special syntax, like #++, #--, #:nodoc, =begin- and =end comments, "shebang" directives, or rackup options.

Example:

# bad
#Some comment

# good
# Some comment

Tab detected.
Open

    def release
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

    def encode(uneValeur)
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

        @myCrypt.decrypt(unBuffer)
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

    # * *Arguments* :
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

        begin
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

            return false
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

            stm.close if stm
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

    end
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

    #Méthode de mise à jour d'un paramètre dans le registre
Severity: Minor
Found in class/registre.class.rb by rubocop

Use 2 (not 1) spaces for indentation.
Open

            stm = @db.prepare "INSERT INTO REGISTRE (id_registre, key, value) VALUES (NULL, ?, ?)"
Severity: Minor
Found in class/registre.class.rb by rubocop

This cops checks for indentation that doesn't use the specified number of spaces.

See also the IndentationConsistency cop which is the companion to this one.

Example:

# bad
class A
 def test
  puts 'hello'
 end
end

# good
class A
  def test
    puts 'hello'
  end
end

Example: IgnoredPatterns: ['^\s*module']

# bad
module A
class B
  def test
  puts 'hello'
  end
end
end

# good
module A
class B
  def test
    puts 'hello'
  end
end
end

Tab detected.
Open

            release if @db != nil
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

        end
Severity: Minor
Found in class/registre.class.rb by rubocop

Use 2 (not 1) spaces for indentation.
Open

        if getValue(uneCle) == nil
Severity: Minor
Found in class/registre.class.rb by rubocop

This cops checks for indentation that doesn't use the specified number of spaces.

See also the IndentationConsistency cop which is the companion to this one.

Example:

# bad
class A
 def test
  puts 'hello'
 end
end

# good
class A
  def test
    puts 'hello'
  end
end

Example: IgnoredPatterns: ['^\s*module']

# bad
module A
class B
  def test
  puts 'hello'
  end
end
end

# good
module A
class B
  def test
    puts 'hello'
  end
end
end

Tab detected.
Open

    #
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

    # * *Arguments* :
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

    def getValue(uneCle)
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

        end
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

    # - Une nouvelle instance de la classe Basedonnee.
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

        res = rs[0]
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

        @myCrypt, @db, @fileName = Gibberish::AES::CBC.new('p4ssw0rd'), nil, unNom
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

        return decode(res)
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

        ensure
Severity: Minor
Found in class/registre.class.rb by rubocop

Use snake_case for variable names.
Open

    def encode(uneValeur)
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop makes sure that all variables use the configured style, snake_case or camelCase, for their names.

Example: EnforcedStyle: snake_case (default)

# bad
fooBar = 1

# good
foo_bar = 1

Example: EnforcedStyle: camelCase

# bad
foo_bar = 1

# good
fooBar = 1

Tab detected.
Open

    # * *Returns* :
Severity: Minor
Found in class/registre.class.rb by rubocop

Use snake_case for variable names.
Open

    def addParam(uneCle, uneValeur)
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop makes sure that all variables use the configured style, snake_case or camelCase, for their names.

Example: EnforcedStyle: snake_case (default)

# bad
fooBar = 1

# good
foo_bar = 1

Example: EnforcedStyle: camelCase

# bad
foo_bar = 1

# good
fooBar = 1

Tab detected.
Open

    # * *Returns* :
Severity: Minor
Found in class/registre.class.rb by rubocop

Use only ascii symbols in comments.
Open

#* Les données sont cryptées à l'aide d'OpenSSL (uniquement valeur de paramètre)
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop checks for non-ascii (non-English) characters in comments. You could set an array of allowed non-ascii chars in AllowedChars attribute (empty by default).

Example:

# bad
# Translates from English to 日本語。

# good
# Translates from English to Japanese

Tab detected.
Open

    def deleteParam(uneCle)
Severity: Minor
Found in class/registre.class.rb by rubocop

Use only ascii symbols in comments.
Open

    #Empêche l'utilisation de la méthode new
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop checks for non-ascii (non-English) characters in comments. You could set an array of allowed non-ascii chars in AllowedChars attribute (empty by default).

Example:

# bad
# Translates from English to 日本語。

# good
# Translates from English to Japanese

Tab detected.
Open

        return true
Severity: Minor
Found in class/registre.class.rb by rubocop

Use only ascii symbols in comments.
Open

    # - +uneCle+ -> Nom du paramètre cible
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop checks for non-ascii (non-English) characters in comments. You could set an array of allowed non-ascii chars in AllowedChars attribute (empty by default).

Example:

# bad
# Translates from English to 日本語。

# good
# Translates from English to Japanese

Tab detected.
Open

    # - +uneCle+ -> Nom du paramètre cible
Severity: Minor
Found in class/registre.class.rb by rubocop

Prefer single-quoted strings when you don't need string interpolation or special symbols.
Open

            stm = @db.prepare "DELETE FROM REGISTRE WHERE key = ?"
Severity: Minor
Found in class/registre.class.rb by rubocop

Checks if uses of quotes match the configured preference.

Example: EnforcedStyle: single_quotes (default)

# bad
"No special symbols"
"No string interpolation"
"Just text"

# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"

Example: EnforcedStyle: double_quotes

# bad
'Just some text'
'No special chars or interpolation'

# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"

Tab detected.
Open

        if rs == nil
Severity: Minor
Found in class/registre.class.rb by rubocop

Use only ascii symbols in comments.
Open

        # On renvoie le résultat
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop checks for non-ascii (non-English) characters in comments. You could set an array of allowed non-ascii chars in AllowedChars attribute (empty by default).

Example:

# bad
# Translates from English to 日本語。

# good
# Translates from English to Japanese

Use 2 (not 1) spaces for indentation.
Open

            stm.close if stm
Severity: Minor
Found in class/registre.class.rb by rubocop

This cops checks for indentation that doesn't use the specified number of spaces.

See also the IndentationConsistency cop which is the companion to this one.

Example:

# bad
class A
 def test
  puts 'hello'
 end
end

# good
class A
  def test
    puts 'hello'
  end
end

Example: IgnoredPatterns: ['^\s*module']

# bad
module A
class B
  def test
  puts 'hello'
  end
end
end

# good
module A
class B
  def test
    puts 'hello'
  end
end
end

Tab detected.
Open

        @myCrypt.encrypt(uneValeur)
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

    #
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

            return addParam uneCle, uneValeur
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

        connect
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

        stm.close
Severity: Minor
Found in class/registre.class.rb by rubocop

Use snake_case for variable names.
Open

    def Registre.creer(unNom)
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop makes sure that all variables use the configured style, snake_case or camelCase, for their names.

Example: EnforcedStyle: snake_case (default)

# bad
fooBar = 1

# good
foo_bar = 1

Example: EnforcedStyle: camelCase

# bad
foo_bar = 1

# good
fooBar = 1

Use snake_case for variable names.
Open

    def getValue(uneCle)
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop makes sure that all variables use the configured style, snake_case or camelCase, for their names.

Example: EnforcedStyle: snake_case (default)

# bad
fooBar = 1

# good
foo_bar = 1

Example: EnforcedStyle: camelCase

# bad
foo_bar = 1

# good
fooBar = 1

Use only ascii symbols in comments.
Open

    # - +uneCle+ -> Nom du paramètre cible
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop checks for non-ascii (non-English) characters in comments. You could set an array of allowed non-ascii chars in AllowedChars attribute (empty by default).

Example:

# bad
# Translates from English to 日本語。

# good
# Translates from English to Japanese

Use only ascii symbols in comments.
Open

        #Procédure suceptible de lever une exception
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop checks for non-ascii (non-English) characters in comments. You could set an array of allowed non-ascii chars in AllowedChars attribute (empty by default).

Example:

# bad
# Translates from English to 日本語。

# good
# Translates from English to Japanese

Use 2 (not 1) spaces for indentation.
Open

            stm = @db.prepare "DELETE FROM REGISTRE WHERE key = ?"
Severity: Minor
Found in class/registre.class.rb by rubocop

This cops checks for indentation that doesn't use the specified number of spaces.

See also the IndentationConsistency cop which is the companion to this one.

Example:

# bad
class A
 def test
  puts 'hello'
 end
end

# good
class A
  def test
    puts 'hello'
  end
end

Example: IgnoredPatterns: ['^\s*module']

# bad
module A
class B
  def test
  puts 'hello'
  end
end
end

# good
module A
class B
  def test
    puts 'hello'
  end
end
end

Missing space after #.
Open

#* Les données sont cryptées à l'aide d'OpenSSL (uniquement valeur de paramètre)
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop checks whether comments have a leading space after the # denoting the start of the comment. The leading space is not required for some RDoc special syntax, like #++, #--, #:nodoc, =begin- and =end comments, "shebang" directives, or rackup options.

Example:

# bad
#Some comment

# good
# Some comment

Missing space after #.
Open

    #@db
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop checks whether comments have a leading space after the # denoting the start of the comment. The leading space is not required for some RDoc special syntax, like #++, #--, #:nodoc, =begin- and =end comments, "shebang" directives, or rackup options.

Example:

# bad
#Some comment

# good
# Some comment

Tab detected.
Open

    end
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

    def connect
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

    #
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

    # - +uneValeur+ -> Contenu
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

    # - bool
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

            stm.execute
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

    # - bool
Severity: Minor
Found in class/registre.class.rb by rubocop

Use snake_case for variable names.
Open

    def addParam(uneCle, uneValeur)
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop makes sure that all variables use the configured style, snake_case or camelCase, for their names.

Example: EnforcedStyle: snake_case (default)

# bad
fooBar = 1

# good
foo_bar = 1

Example: EnforcedStyle: camelCase

# bad
foo_bar = 1

# good
fooBar = 1

Prefer the use of the nil? predicate.
Open

        return false if getValue(uneCle) == nil
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop checks for comparison of something with nil using ==.

Example:

# bad
if x == nil
end

# good
if x.nil?
end

Use 2 (not 1) spaces for indentation.
Open

        if getValue(uneCle) != nil
Severity: Minor
Found in class/registre.class.rb by rubocop

This cops checks for indentation that doesn't use the specified number of spaces.

See also the IndentationConsistency cop which is the companion to this one.

Example:

# bad
class A
 def test
  puts 'hello'
 end
end

# good
class A
  def test
    puts 'hello'
  end
end

Example: IgnoredPatterns: ['^\s*module']

# bad
module A
class B
  def test
  puts 'hello'
  end
end
end

# good
module A
class B
  def test
    puts 'hello'
  end
end
end

Use 2 (not 1) spaces for indentation.
Open

            stm.close if stm
Severity: Minor
Found in class/registre.class.rb by rubocop

This cops checks for indentation that doesn't use the specified number of spaces.

See also the IndentationConsistency cop which is the companion to this one.

Example:

# bad
class A
 def test
  puts 'hello'
 end
end

# good
class A
  def test
    puts 'hello'
  end
end

Example: IgnoredPatterns: ['^\s*module']

# bad
module A
class B
  def test
  puts 'hello'
  end
end
end

# good
module A
class B
  def test
    puts 'hello'
  end
end
end

Tab detected.
Open

    #@db
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

    #@myCrypt
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

        new(unNom)
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

    # - bool
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

            stm.bind_param 2, uneCle
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

    # - +uneCle+ -> Nom du paramètre cible
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

            puts "<SQLite3> #{e}"
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

        # On recupère la première colonne
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

    private :verify, :release, :connect, :encode, :decode
Severity: Minor
Found in class/registre.class.rb by rubocop

Use only ascii symbols in comments.
Open

    #Méthode de supression de paramètre dans le registre
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop checks for non-ascii (non-English) characters in comments. You could set an array of allowed non-ascii chars in AllowedChars attribute (empty by default).

Example:

# bad
# Translates from English to 日本語。

# good
# Translates from English to Japanese

Use only ascii symbols in comments.
Open

    # - +uneCle+ -> Nom du paramètre cible
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop checks for non-ascii (non-English) characters in comments. You could set an array of allowed non-ascii chars in AllowedChars attribute (empty by default).

Example:

# bad
# Translates from English to 日本語。

# good
# Translates from English to Japanese

Tab detected.
Open

    end
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

        connect
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

            return updateParam(uneCle, uneValeur)
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

            stm = @db.prepare "INSERT INTO REGISTRE (id_registre, key, value) VALUES (NULL, ?, ?)"
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

            puts "Fatal: #{e.to_s}"
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

            release if @db != nil
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

        return true
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

        ensure
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

            release if @db != nil
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

        release
Severity: Minor
Found in class/registre.class.rb by rubocop

Use 2 (not 1) spaces for indentation.
Open

            puts "Fatal: #{e.to_s}"
Severity: Minor
Found in class/registre.class.rb by rubocop

This cops checks for indentation that doesn't use the specified number of spaces.

See also the IndentationConsistency cop which is the companion to this one.

Example:

# bad
class A
 def test
  puts 'hello'
 end
end

# good
class A
  def test
    puts 'hello'
  end
end

Example: IgnoredPatterns: ['^\s*module']

# bad
module A
class B
  def test
  puts 'hello'
  end
end
end

# good
module A
class B
  def test
    puts 'hello'
  end
end
end

Redundant use of Object#to_s in interpolation.
Open

            puts "Fatal: #{e.to_s}"
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop checks for string conversion in string interpolation, which is redundant.

Example:

# bad

"result is #{something.to_s}"

Example:

# good

"result is #{something}"

Extra empty line detected before the rescue.
Open


        rescue SQLite3::Exception => e
Severity: Minor
Found in class/registre.class.rb by rubocop

This cops checks if empty lines exist around the bodies of begin sections. This cop doesn't check empty lines at begin body beginning/end and around method definition body. Style/EmptyLinesAroundBeginBody or Style/EmptyLinesAroundMethodBody can be used for this purpose.

Example:

# good

begin
  do_something
rescue
  do_something2
else
  do_something3
ensure
  do_something4
end

# good

def foo
  do_something
rescue
  do_something2
end

# bad

begin
  do_something

rescue

  do_something2

else

  do_something3

ensure

  do_something4
end

# bad

def foo
  do_something

rescue

  do_something2
end

Missing space after #.
Open

    #Indique la valeur de la cle de criptage
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop checks whether comments have a leading space after the # denoting the start of the comment. The leading space is not required for some RDoc special syntax, like #++, #--, #:nodoc, =begin- and =end comments, "shebang" directives, or rackup options.

Example:

# bad
#Some comment

# good
# Some comment

Line is too long. [82/80]
Open

    # Vérifie que la table de registre est déjà créer, sinon créer une nouvelle table
Severity: Minor
Found in class/registre.class.rb by rubocop

Missing space after #.
Open

    #Méthode d'ajout de couple parametre valeur dans une base de donnee
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop checks whether comments have a leading space after the # denoting the start of the comment. The leading space is not required for some RDoc special syntax, like #++, #--, #:nodoc, =begin- and =end comments, "shebang" directives, or rackup options.

Example:

# bad
#Some comment

# good
# Some comment

Tab detected.
Open

        connect
Severity: Minor
Found in class/registre.class.rb by rubocop

Use snake_case for method names.
Open

    def getValue(uneCle)
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop makes sure that all methods use the configured style, snake_case or camelCase, for their names.

Example: EnforcedStyle: snake_case (default)

# bad
def fooBar; end

# good
def foo_bar; end

Example: EnforcedStyle: camelCase

# bad
def foo_bar; end

# good
def fooBar; end

Missing space after #.
Open

    #Méthode de supression de paramètre dans le registre
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop checks whether comments have a leading space after the # denoting the start of the comment. The leading space is not required for some RDoc special syntax, like #++, #--, #:nodoc, =begin- and =end comments, "shebang" directives, or rackup options.

Example:

# bad
#Some comment

# good
# Some comment

Use snake_case for variable names.
Open

    def updateParam(uneCle, uneValeur)
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop makes sure that all variables use the configured style, snake_case or camelCase, for their names.

Example: EnforcedStyle: snake_case (default)

# bad
fooBar = 1

# good
foo_bar = 1

Example: EnforcedStyle: camelCase

# bad
foo_bar = 1

# good
fooBar = 1

Tab detected.
Open

    private_class_method :new
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

        #Procédure suceptible de lever une exception
Severity: Minor
Found in class/registre.class.rb by rubocop

Prefer !expression.nil? over expression != nil.
Open

        if getValue(uneCle) != nil
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop checks for non-nil checks, which are usually redundant.

Example:

# bad
if x != nil
end

# good (when not allowing semantic changes)
# bad (when allowing semantic changes)
if !x.nil?
end

# good (when allowing semantic changes)
if x
end

Non-nil checks are allowed if they are the final nodes of predicate.

# good
def signed_in?
  !current_user.nil?
end

Tab detected.
Open

    # Vérifie que la table de registre est déjà créer, sinon créer une nouvelle table
Severity: Minor
Found in class/registre.class.rb by rubocop

Prefer single-quoted strings when you don't need string interpolation or special symbols.
Open

            stm = @db.prepare "INSERT INTO REGISTRE (id_registre, key, value) VALUES (NULL, ?, ?)"
Severity: Minor
Found in class/registre.class.rb by rubocop

Checks if uses of quotes match the configured preference.

Example: EnforcedStyle: single_quotes (default)

# bad
"No special symbols"
"No string interpolation"
"Just text"

# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"

Example: EnforcedStyle: double_quotes

# bad
'Just some text'
'No special chars or interpolation'

# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"

Tab detected.
Open

        begin
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

    end
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

    def decode(unBuffer)
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

            stm.bind_param 1, uneCle
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

    # - +uneCle+ -> Nom du paramètre cible
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

            return false
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

            stm.bind_param 1, uneCle
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

    #
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

    def updateParam(uneCle, uneValeur)
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

    # - +uneValeur+ -> Contenu
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

        if getValue(uneCle) == nil
Severity: Minor
Found in class/registre.class.rb by rubocop

Use only ascii symbols in comments.
Open

        # On ferme l'instance stm pour débloquer la base
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop checks for non-ascii (non-English) characters in comments. You could set an array of allowed non-ascii chars in AllowedChars attribute (empty by default).

Example:

# bad
# Translates from English to 日本語。

# good
# Translates from English to Japanese

Tab detected.
Open

    end
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

            stm.close if stm
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

    end
Severity: Minor
Found in class/registre.class.rb by rubocop

Use snake_case for method names.
Open

    def addParam(uneCle, uneValeur)
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop makes sure that all methods use the configured style, snake_case or camelCase, for their names.

Example: EnforcedStyle: snake_case (default)

# bad
def fooBar; end

# good
def foo_bar; end

Example: EnforcedStyle: camelCase

# bad
def foo_bar; end

# good
def fooBar; end

Use snake_case for variable names.
Open

        @myCrypt, @db, @fileName = Gibberish::AES::CBC.new('p4ssw0rd'), nil, unNom
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop makes sure that all variables use the configured style, snake_case or camelCase, for their names.

Example: EnforcedStyle: snake_case (default)

# bad
fooBar = 1

# good
foo_bar = 1

Example: EnforcedStyle: camelCase

# bad
foo_bar = 1

# good
fooBar = 1

Use snake_case for variable names.
Open

    def updateParam(uneCle, uneValeur)
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop makes sure that all variables use the configured style, snake_case or camelCase, for their names.

Example: EnforcedStyle: snake_case (default)

# bad
fooBar = 1

# good
foo_bar = 1

Example: EnforcedStyle: camelCase

# bad
foo_bar = 1

# good
fooBar = 1

Prefer !expression.nil? over expression != nil.
Open

        @db.close if @db != nil
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop checks for non-nil checks, which are usually redundant.

Example:

# bad
if x != nil
end

# good (when not allowing semantic changes)
# bad (when allowing semantic changes)
if !x.nil?
end

# good (when allowing semantic changes)
if x
end

Non-nil checks are allowed if they are the final nodes of predicate.

# good
def signed_in?
  !current_user.nil?
end

Use 2 (not 1) spaces for indentation.
Open

            stm.close if stm
Severity: Minor
Found in class/registre.class.rb by rubocop

This cops checks for indentation that doesn't use the specified number of spaces.

See also the IndentationConsistency cop which is the companion to this one.

Example:

# bad
class A
 def test
  puts 'hello'
 end
end

# good
class A
  def test
    puts 'hello'
  end
end

Example: IgnoredPatterns: ['^\s*module']

# bad
module A
class B
  def test
  puts 'hello'
  end
end
end

# good
module A
class B
  def test
    puts 'hello'
  end
end
end

Use 2 (not 1) spaces for indentation.
Open

            return nil
Severity: Minor
Found in class/registre.class.rb by rubocop

This cops checks for indentation that doesn't use the specified number of spaces.

See also the IndentationConsistency cop which is the companion to this one.

Example:

# bad
class A
 def test
  puts 'hello'
 end
end

# good
class A
  def test
    puts 'hello'
  end
end

Example: IgnoredPatterns: ['^\s*module']

# bad
module A
class B
  def test
  puts 'hello'
  end
end
end

# good
module A
class B
  def test
    puts 'hello'
  end
end
end

Missing space after #.
Open

        #Procédure suceptible de lever une exception
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop checks whether comments have a leading space after the # denoting the start of the comment. The leading space is not required for some RDoc special syntax, like #++, #--, #:nodoc, =begin- and =end comments, "shebang" directives, or rackup options.

Example:

# bad
#Some comment

# good
# Some comment

Tab detected.
Open

    #
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

    # - +unNom+ -> Nom du fichier dans lequel la base de donnee est initialiser
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

        @db = SQLite3::Database.open @fileName
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

        connect
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

        rescue SQLite3::Exception => e
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

            stm.close if stm
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

    #Méthode de lecture d'un paramètre dans le registre
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

        row = stm.execute
Severity: Minor
Found in class/registre.class.rb by rubocop

Use snake_case for method names.
Open

    def deleteParam(uneCle)
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop makes sure that all methods use the configured style, snake_case or camelCase, for their names.

Example: EnforcedStyle: snake_case (default)

# bad
def fooBar; end

# good
def foo_bar; end

Example: EnforcedStyle: camelCase

# bad
def foo_bar; end

# good
def fooBar; end

Use only ascii symbols in comments.
Open

    # Méthode de connexion SQLite3, créer une instance SQLite3.
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop checks for non-ascii (non-English) characters in comments. You could set an array of allowed non-ascii chars in AllowedChars attribute (empty by default).

Example:

# bad
# Translates from English to 日本語。

# good
# Translates from English to Japanese

Prefer the use of the nil? predicate.
Open

        if getValue(uneCle) == nil
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop checks for comparison of something with nil using ==.

Example:

# bad
if x == nil
end

# good
if x.nil?
end

Do not use parallel assignment.
Open

        @myCrypt, @db, @fileName = Gibberish::AES::CBC.new('p4ssw0rd'), nil, unNom
Severity: Minor
Found in class/registre.class.rb by rubocop

Checks for simple usages of parallel assignment. This will only complain when the number of variables being assigned matched the number of assigning variables.

Example:

# bad
a, b, c = 1, 2, 3
a, b, c = [1, 2, 3]

# good
one, two = *foo
a, b = foo()
a, b = b, a

a = 1
b = 2
c = 3

Redundant return detected.
Open

        return true
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop checks for redundant return expressions.

Example:

def test
  return something
end

def test
  one
  two
  three
  return something
end

It should be extended to handle methods whose body is if/else or a case expression with a default branch.

Redundant return detected.
Open

        return true
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop checks for redundant return expressions.

Example:

def test
  return something
end

def test
  one
  two
  three
  return something
end

It should be extended to handle methods whose body is if/else or a case expression with a default branch.

Prefer single-quoted strings when you don't need string interpolation or special symbols.
Open

        stm = @db.prepare "SELECT value FROM REGISTRE WHERE key = ?"
Severity: Minor
Found in class/registre.class.rb by rubocop

Checks if uses of quotes match the configured preference.

Example: EnforcedStyle: single_quotes (default)

# bad
"No special symbols"
"No string interpolation"
"Just text"

# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"

Example: EnforcedStyle: double_quotes

# bad
'Just some text'
'No special chars or interpolation'

# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"

Extra empty line detected at class body end.
Open


end
Severity: Minor
Found in class/registre.class.rb by rubocop

This cops checks if empty lines around the bodies of classes match the configuration.

Example: EnforcedStyle: empty_lines

# good

class Foo

  def bar
    # ...
  end

end

Example: EnforcedStyle: emptylinesexcept_namespace

# good

class Foo
  class Bar

    # ...

  end
end

Example: EnforcedStyle: emptylinesspecial

# good
class Foo

  def bar; end

end

Example: EnforcedStyle: noemptylines (default)

# good

class Foo
  def bar
    # ...
  end
end

Use 2 (not 1) spaces for indentation.
Open

        new(unNom)
Severity: Minor
Found in class/registre.class.rb by rubocop

This cops checks for indentation that doesn't use the specified number of spaces.

See also the IndentationConsistency cop which is the companion to this one.

Example:

# bad
class A
 def test
  puts 'hello'
 end
end

# good
class A
  def test
    puts 'hello'
  end
end

Example: IgnoredPatterns: ['^\s*module']

# bad
module A
class B
  def test
  puts 'hello'
  end
end
end

# good
module A
class B
  def test
    puts 'hello'
  end
end
end

Use 2 (not 1) spaces for indentation.
Open

            return updateParam(uneCle, uneValeur)
Severity: Minor
Found in class/registre.class.rb by rubocop

This cops checks for indentation that doesn't use the specified number of spaces.

See also the IndentationConsistency cop which is the companion to this one.

Example:

# bad
class A
 def test
  puts 'hello'
 end
end

# good
class A
  def test
    puts 'hello'
  end
end

Example: IgnoredPatterns: ['^\s*module']

# bad
module A
class B
  def test
  puts 'hello'
  end
end
end

# good
module A
class B
  def test
    puts 'hello'
  end
end
end

Missing space after #.
Open

    #Méthode de lecture d'un paramètre dans le registre
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop checks whether comments have a leading space after the # denoting the start of the comment. The leading space is not required for some RDoc special syntax, like #++, #--, #:nodoc, =begin- and =end comments, "shebang" directives, or rackup options.

Example:

# bad
#Some comment

# good
# Some comment

Tab detected.
Open

        @db.close if @db != nil
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

    # Encode une valeur dans le format YAML
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

    # - bool
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

        begin
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

        rescue SQLite3::Exception => e
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

            return nil
Severity: Minor
Found in class/registre.class.rb by rubocop

Line is too long. [106/80]
Open

        @db.execute "CREATE TABLE IF NOT EXISTS REGISTRE(id_registre INTEGER PRIMARY KEY, key TEXT, value BLOB)"
Severity: Minor
Found in class/registre.class.rb by rubocop

Use only ascii symbols in comments.
Open

    #Méthode de création d'instance de la classe Basedonnee.
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop checks for non-ascii (non-English) characters in comments. You could set an array of allowed non-ascii chars in AllowedChars attribute (empty by default).

Example:

# bad
# Translates from English to 日本語。

# good
# Translates from English to Japanese

Use 2 (not 1) spaces for indentation.
Open

        @db = SQLite3::Database.open @fileName
Severity: Minor
Found in class/registre.class.rb by rubocop

This cops checks for indentation that doesn't use the specified number of spaces.

See also the IndentationConsistency cop which is the companion to this one.

Example:

# bad
class A
 def test
  puts 'hello'
 end
end

# good
class A
  def test
    puts 'hello'
  end
end

Example: IgnoredPatterns: ['^\s*module']

# bad
module A
class B
  def test
  puts 'hello'
  end
end
end

# good
module A
class B
  def test
    puts 'hello'
  end
end
end

Use 2 (not 1) spaces for indentation.
Open

        @myCrypt.encrypt(uneValeur)
Severity: Minor
Found in class/registre.class.rb by rubocop

This cops checks for indentation that doesn't use the specified number of spaces.

See also the IndentationConsistency cop which is the companion to this one.

Example:

# bad
class A
 def test
  puts 'hello'
 end
end

# good
class A
  def test
    puts 'hello'
  end
end

Example: IgnoredPatterns: ['^\s*module']

# bad
module A
class B
  def test
  puts 'hello'
  end
end
end

# good
module A
class B
  def test
    puts 'hello'
  end
end
end

Missing space after #.
Open

#* Maintient un registre avec le module SQLite 3
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop checks whether comments have a leading space after the # denoting the start of the comment. The leading space is not required for some RDoc special syntax, like #++, #--, #:nodoc, =begin- and =end comments, "shebang" directives, or rackup options.

Example:

# bad
#Some comment

# good
# Some comment

Tab detected.
Open

    #Empêche l'utilisation de la méthode new
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

    def Registre.creer(unNom)
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

    def verify
Severity: Minor
Found in class/registre.class.rb by rubocop

Extra empty line detected at begin body beginning.
Open


            stm = @db.prepare "INSERT INTO REGISTRE (id_registre, key, value) VALUES (NULL, ?, ?)"
Severity: Minor
Found in class/registre.class.rb by rubocop

This cops checks if empty lines exist around the bodies of begin-end blocks.

Example:

# good

begin
  # ...
end

# bad

begin

  # ...

end

Tab detected.
Open

    # - +uneValeur+ -> Contenu
Severity: Minor
Found in class/registre.class.rb by rubocop

Use 2 (not 1) spaces for indentation.
Open

            puts "<SQLite> #{e}"
Severity: Minor
Found in class/registre.class.rb by rubocop

This cops checks for indentation that doesn't use the specified number of spaces.

See also the IndentationConsistency cop which is the companion to this one.

Example:

# bad
class A
 def test
  puts 'hello'
 end
end

# good
class A
  def test
    puts 'hello'
  end
end

Example: IgnoredPatterns: ['^\s*module']

# bad
module A
class B
  def test
  puts 'hello'
  end
end
end

# good
module A
class B
  def test
    puts 'hello'
  end
end
end

Tab detected.
Open

            stm.execute
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

    #Méthode de création d'instance de la classe Basedonnee.
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

    # * *Arguments* :
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

        verify
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

    end
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

            stm.execute
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

            stm.bind_param 1, encode(uneValeur)
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

    end
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

        return true
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

        # On renvoie le résultat
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

            stm = @db.prepare "DELETE FROM REGISTRE WHERE key = ?"
Severity: Minor
Found in class/registre.class.rb by rubocop

Line is too long. [89/80]
Open

            stm = @db.prepare "INSERT INTO REGISTRE (id_registre, key, value) VALUES (NULL, ?, ?)"
Severity: Minor
Found in class/registre.class.rb by rubocop

Tab detected.
Open

        connect
Severity: Minor
Found in class/registre.class.rb by rubocop

Use snake_case for variable names.
Open

    def decode(unBuffer)
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop makes sure that all variables use the configured style, snake_case or camelCase, for their names.

Example: EnforcedStyle: snake_case (default)

# bad
fooBar = 1

# good
foo_bar = 1

Example: EnforcedStyle: camelCase

# bad
foo_bar = 1

# good
fooBar = 1

Tab detected.
Open

        # On ferme l'instance stm pour débloquer la base
Severity: Minor
Found in class/registre.class.rb by rubocop

Use only ascii symbols in comments.
Open

        # On recupère la première colonne
Severity: Minor
Found in class/registre.class.rb by rubocop

This cop checks for non-ascii (non-English) characters in comments. You could set an array of allowed non-ascii chars in AllowedChars attribute (empty by default).

Example:

# bad
# Translates from English to 日本語。

# good
# Translates from English to Japanese

Favor modifier if usage when having a single-line body. Another good alternative is the usage of control flow &&/||.
Open

        if rs == nil
Severity: Minor
Found in class/registre.class.rb by rubocop

Checks for if and unless statements that would fit on one line if written as a modifier if/unless. The maximum line length is configured in the Metrics/LineLength cop.

Example:

# bad
if condition
  do_stuff(bar)
end

unless qux.empty?
  Foo.do_something
end

# good
do_stuff(bar) if condition
Foo.do_something unless qux.empty?

There are no issues that match your filters.

Category
Status