Use 2 (not 1) spaces for indentation. Open
new(unPassword,'AES-128-CBC')
- Read upRead up
- Exclude checks
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
#Methode qui encrypte une donnée en utilisant le type d'encryption précisé lors de la création d'instance,
- Read upRead up
- Exclude checks
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
#Incrémente la variable d'instance nbOfEncrypt, qui compte le nombre d'encryptions effectuées par l'encodeur/décodeur.
- Read upRead up
- Exclude checks
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
#@psw
- Exclude checks
Use 2 (not 1) spaces for indentation. Open
attr_reader :nbOfEncrypt
- Read upRead up
- Exclude checks
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
#*utilise le PKCS5 pour sécuriser le mot de passe.
- Read upRead up
- Exclude checks
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
#Est le mot de passe choisi et utilisé comme clé de cryptage, il est choisi lors de la création d'instance.
- Read upRead up
- Exclude checks
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
#@processedPsw
- Read upRead up
- Exclude checks
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
#Methode qui hash le mot de passe en utilisant un sel aléatoire et PBKDF2
- Read upRead up
- Exclude checks
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
#le hash du mot de passe précisé lors de la création d'instance,
- Read upRead up
- Exclude checks
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 2 (not 1) spaces for indentation. Open
new(unPassword,encryptionMethod)
- Read upRead up
- Exclude checks
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
#*en clé de cryptage.
- Read upRead up
- Exclude checks
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
#@cipherType
- Read upRead up
- Exclude checks
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
#Est uniquement appelée lors de l'initialisation d'une nouvelle instance.
- Read upRead up
- Exclude checks
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
#@iv
- Exclude checks
Missing space after #
. Open
#Type d'encryptage choisi, AES 128 bits GCM par défault : Attention, certains encryptages ne seront pas supportés
- Read upRead up
- Exclude checks
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
#Methode qui décrypte une donnée YAML encryptée en utilisant le type d'encryption précisé lors de la création d'instance,
- Read upRead up
- Exclude checks
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
#@nbOfEncrypt
- Exclude checks
Tab detected. Open
new(unPassword,encryptionMethod)
- Exclude checks
Tab detected. Open
#
- Exclude checks
Tab detected. Open
#
- Exclude checks
Tab detected. Open
@nbOfEncrypt=0
- Exclude checks
Tab detected. Open
def encrypt(dataToEncrypt)
- Exclude checks
Extra empty line detected at class body end. Open
end
- Read upRead up
- Exclude checks
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
Missing space after #
. Open
#@nbOfEncrypt
- Read upRead up
- Exclude checks
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
#Prévoir de rendre privé la méthode hashLeMotDePasse
- Read upRead up
- Exclude checks
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
#tag = cipher.auth_tag
- Read upRead up
- Exclude checks
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
Space missing after comma. Open
new(unPassword,encryptionMethod)
- Read upRead up
- Exclude checks
Checks for comma (,) not followed by some kind of space.
Example:
# bad
[1,2]
{ foo:bar,}
# good
[1, 2]
{ foo:bar, }
Space missing after comma. Open
def initialize(password,encryptionMethod)
- Read upRead up
- Exclude checks
Checks for comma (,) not followed by some kind of space.
Example:
# bad
[1,2]
{ foo:bar,}
# good
[1, 2]
{ foo:bar, }
Tab detected. Open
# * *Return value* :
- Exclude checks
Missing space after #
. Open
#*Créer une instance de cette classe, en donnant en paramètre un mot de passe déterminé par lutilisateur,
- Read upRead up
- Exclude checks
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
Surrounding space missing in default value assignment. Open
def Crypt.creer(unPassword,encryptionMethod='AES-128-CBC')
- Read upRead up
- Exclude checks
Checks that the equals signs in parameter default assignments have or don't have surrounding space depending on configuration.
Example:
# bad
def some_method(arg1=:default, arg2=nil, arg3=[])
# do something...
end
# good
def some_method(arg1 = :default, arg2 = nil, arg3 = [])
# do something...
end
Tab detected. Open
#Accesseurs
- Exclude checks
Tab detected. Open
# - +chosenIv+ -> Le vecteur d'initialisation à utiliser.
- Exclude checks
Tab detected. Open
# - myCipher = Crypt.creer("passwordThing",'aes-128-gcm',"myOwnIV")
- Exclude checks
Tab detected. Open
# * *Return value* :
- Exclude checks
Tab detected. Open
@nbOfDecrypt=0
- Exclude checks
Tab detected. Open
def hashLeMotDePasse
- Exclude checks
Tab detected. Open
iter = 64
- Exclude checks
Tab detected. Open
return encrypted
- Exclude checks
Tab detected. Open
end
- Exclude checks
Line is too long. [105/80] Open
#*Créer une instance de cette classe, en donnant en paramètre un mot de passe déterminé par lutilisateur,
- Exclude checks
Use snake_case for variable names. Open
def Crypt.creer(unPassword,encryptionMethod='AES-128-CBC')
- Read upRead up
- Exclude checks
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 2 (not 1) spaces for indentation. Open
salt = OpenSSL::Random.random_bytes(32)
- Read upRead up
- Exclude checks
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
#*Appeler une instance de cette classe avec les méthodes encrypt(data) et decrypt(data) cryptera ou décryptera
- Read upRead up
- Exclude checks
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
#Accesseurs
- Read upRead up
- Exclude checks
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
#Contient le hash du mot de passe
- Read upRead up
- Exclude checks
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
#Méthode de création d'instance de la classe Crypt.
- Exclude checks
Tab detected. Open
# - +unPassword+ -> le mot de passe utilisé comme clé
- Exclude checks
Tab detected. Open
#le hash du mot de passe précisé lors de la création d'instance,
- Exclude checks
Tab detected. Open
encrypted = cipher.update(yamlString) + cipher.final
- Exclude checks
Tab detected. Open
#tag = cipher.auth_tag
- Exclude checks
Extra empty line detected at class body beginning. Open
#@nbOfEncrypt
- Read upRead up
- Exclude checks
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
@psw = password
- Read upRead up
- Exclude checks
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
#@nbOfDecrypt
- Read upRead up
- Exclude checks
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 d'initialisation utilisée lors de la création d'instance.
- Read upRead up
- Exclude checks
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
#le hash du mot de passe précisé lors de la création d'instance,
- Read upRead up
- Exclude checks
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
#JSON.parse(string)
- Read upRead up
- Exclude checks
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
Space missing after comma. Open
def Crypt.creer(unPassword,encryptionMethod='AES-128-CBC')
- Read upRead up
- Exclude checks
Checks for comma (,) not followed by some kind of space.
Example:
# bad
[1,2]
{ foo:bar,}
# good
[1, 2]
{ foo:bar, }
Surrounding space missing for operator =
. Open
@nbOfEncrypt=@nbOfEncrypt+1
- Read upRead up
- Exclude checks
Checks that operators have space around them, except for ** which should not have surrounding space.
Example:
# bad
total = 3*4
"apple"+"juice"
my_number = 38/4
a ** b
# good
total = 3 * 4
"apple" + "juice"
my_number = 38 / 4
a**b
Tab detected. Open
# * *Arguments* :
- Exclude checks
Extra empty line detected at method body end. Open
end
- Read upRead up
- Exclude checks
This cops checks if empty lines exist around the bodies of methods.
Example:
# good
def foo
# ...
end
# bad
def bar
# ...
end
Missing space after #
. Open
#@iv
- Read upRead up
- Exclude checks
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 2 (not 1) spaces for indentation. Open
decipher = OpenSSL::Cipher.new(@cipherType)
- Read upRead up
- Exclude checks
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
def Crypt.creerAes256GCM(unPassword)
- Exclude checks
Missing space after #
. Open
#Indique le nombre de fois que la méthode encrypt a été utilisée
- Read upRead up
- Exclude checks
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
#Méthode d'initialisation utilisée lors de la création d'instance.
- Exclude checks
Space missing after comma. Open
new(unPassword,'AES-128-CBC')
- Read upRead up
- Exclude checks
Checks for comma (,) not followed by some kind of space.
Example:
# bad
[1,2]
{ foo:bar,}
# good
[1, 2]
{ foo:bar, }
Tab detected. Open
#
- Exclude checks
Tab detected. Open
#
- Exclude checks
Tab detected. Open
attr_reader :nbOfDecrypt
- Exclude checks
Tab detected. Open
# - myCryptInstance.encrypt(objectToBeEncrypted)
- Exclude checks
Tab detected. Open
end
- Exclude checks
Tab detected. Open
cipher.iv = cipher.random_iv
- Exclude checks
Tab detected. Open
end
- Exclude checks
Tab detected. Open
#Contient le hash du mot de passe
- Exclude checks
Line is too long. [115/80] Open
#Type d'encryptage choisi, AES 128 bits GCM par défault : Attention, certains encryptages ne seront pas supportés
- Exclude checks
Tab detected. Open
key = OpenSSL::PKCS5.pbkdf2_hmac_sha1(@psw, salt, iter, key_len)
- Exclude checks
Use snake_case for method names. Open
def Crypt.creerAes256GCM(unPassword)
- Read upRead up
- Exclude checks
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
Tab detected. Open
#JSON.parse(string)
- Exclude checks
Missing space after #
. Open
#*les données fournies en paramètre grace à de l AES 128bits GCM en se servant du mot de passe crypté par le PKCS5
- Read upRead up
- Exclude checks
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
@nbOfEncrypt=@nbOfEncrypt+1
- Exclude checks
Missing space after #
. Open
#Indique le nombre de fois que la méthode decrypt a été utilisée
- Read upRead up
- Exclude checks
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
decipher = OpenSSL::Cipher.new(@cipherType)
- Exclude checks
Surrounding space missing for operator +
. Open
@nbOfDecrypt=@nbOfDecrypt+1
- Read upRead up
- Exclude checks
Checks that operators have space around them, except for ** which should not have surrounding space.
Example:
# bad
total = 3*4
"apple"+"juice"
my_number = 38/4
a ** b
# good
total = 3 * 4
"apple" + "juice"
my_number = 38 / 4
a**b
Tab detected. Open
puts "Near end decrypt with #{plain}"
- Exclude checks
Tab detected. Open
# - Une nouvelle instance de la classe Crypt.
- Exclude checks
Tab detected. Open
# - myCipher = Crypt.creerAes256GCM("passwordThing")
- Exclude checks
Line is too long. [100/80] Open
#Le salt ajoute une composante aléatoire évitant de casser l'algo d'encryption par Rainbow Tables.
- Exclude checks
Tab detected. Open
end
- Exclude checks
Line is too long. [119/80] Open
#Incrémente la variable d'instance nbOfEncrypt, qui compte le nombre d'encryptions effectuées par l'encodeur/décodeur.
- Exclude checks
Tab detected. Open
# - Une nouvelle instance de la classe Crypt.
- Exclude checks
Use snake_case for variable names. Open
def initialize(password,encryptionMethod)
- Read upRead up
- Exclude checks
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
# * *Return value* :
- Exclude checks
Tab detected. Open
#
- Exclude checks
Tab detected. Open
def decrypt(dataToDecrypt)
- Exclude checks
Tab detected. Open
#@cipherType
- Exclude checks
Tab detected. Open
attr_reader :nbOfEncrypt
- Exclude checks
Tab detected. Open
# - +unPassword+ -> le mot de passe utilisé comme clé
- Exclude checks
Tab detected. Open
# * *Return value* :
- Exclude checks
Tab detected. Open
new(unPassword,'AES-128-CBC')
- Exclude checks
Tab detected. Open
def initialize(password,encryptionMethod)
- Exclude checks
Tab detected. Open
#Est le mot de passe choisi et utilisé comme clé de cryptage, il est choisi lors de la création d'instance.
- Exclude checks
Tab detected. Open
#Est uniquement appelée lors de l'initialisation d'une nouvelle instance.
- Exclude checks
Tab detected. Open
return key
- Exclude checks
Tab detected. Open
# - La chaîne encryptée
- Exclude checks
Line is too long. [88/80] Open
#Vecteur d'initialisation de l'algorithme de cryptage, contient une valeur par défaut.
- Exclude checks
Use only ascii symbols in comments. Open
#*Créer une instance de cette classe, en donnant en paramètre un mot de passe déterminé par lutilisateur,
- Read upRead up
- Exclude checks
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
# - +encryptionMethod+ -> La méthode d'encryption à utiliser, toutes ne sont pas supportées. ( cf https://docs.google.com/document/d/1Hdzg2B-U0fL_KFjIpdfWqLR6xUaBIzQuEXP7pZsM3V4/pub )
- Read upRead up
- Exclude checks
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
Extra blank line detected. Open
end
- Read upRead up
- Exclude checks
This cops checks for two or more consecutive blank lines.
Example:
# bad - It has two empty lines.
some_method
# one empty line
# two empty lines
some_method
# good
some_method
# one empty line
some_method
Use 2 (not 1) spaces for indentation. Open
yamlString=dataToEncrypt.to_yaml
- Read upRead up
- Exclude checks
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
#Le salt ajoute une composante aléatoire évitant de casser l'algo d'encryption par Rainbow Tables.
- Read upRead up
- Exclude checks
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
#le IV du mot de passe précisé lors de la création d'instance.
- Read upRead up
- Exclude checks
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
#Incrémente la variable d'instance nbOfDecrypt, qui compte le nombre de décryptions effectuées par l'encodeur/décodeur.
- Read upRead up
- Exclude checks
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
Surrounding space missing for operator +
. Open
@nbOfEncrypt=@nbOfEncrypt+1
- Read upRead up
- Exclude checks
Checks that operators have space around them, except for ** which should not have surrounding space.
Example:
# bad
total = 3*4
"apple"+"juice"
my_number = 38/4
a ** b
# good
total = 3 * 4
"apple" + "juice"
my_number = 38 / 4
a**b
Surrounding space missing for operator =
. Open
@nbOfDecrypt=@nbOfDecrypt+1
- Read upRead up
- Exclude checks
Checks that operators have space around them, except for ** which should not have surrounding space.
Example:
# bad
total = 3*4
"apple"+"juice"
my_number = 38/4
a ** b
# good
total = 3 * 4
"apple" + "juice"
my_number = 38 / 4
a**b
Tab detected. Open
#@processedPsw
- Exclude checks
Tab detected. Open
private_class_method :new
- Exclude checks
Tab detected. Open
#Indique le nombre de fois que la méthode decrypt a été utilisée
- Exclude checks
Use snake_case for variable names. Open
@processedPsw = hashLeMotDePasse()
- Read upRead up
- Exclude checks
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
# - La clé de cryptage calculée selon le mot de passe
- Read upRead up
- Exclude checks
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
Extra empty line detected at method body beginning. Open
#Est le mot de passe choisi et utilisé comme clé de cryptage, il est choisi lors de la création d'instance.
- Read upRead up
- Exclude checks
This cops checks if empty lines exist around the bodies of methods.
Example:
# good
def foo
# ...
end
# bad
def bar
# ...
end
Surrounding space missing for operator =
. Open
@nbOfDecrypt=0
- Read upRead up
- Exclude checks
Checks that operators have space around them, except for ** which should not have surrounding space.
Example:
# bad
total = 3*4
"apple"+"juice"
my_number = 38/4
a ** b
# good
total = 3 * 4
"apple" + "juice"
my_number = 38 / 4
a**b
Surrounding space missing for operator =
. Open
yamlString=dataToEncrypt.to_yaml
- Read upRead up
- Exclude checks
Checks that operators have space around them, except for ** which should not have surrounding space.
Example:
# bad
total = 3*4
"apple"+"juice"
my_number = 38/4
a ** b
# good
total = 3 * 4
"apple" + "juice"
my_number = 38 / 4
a**b
Tab detected. Open
#@nbOfDecrypt
- Exclude checks
Tab detected. Open
#Methode qui hash le mot de passe en utilisant un sel aléatoire et PBKDF2
- Exclude checks
Tab detected. Open
#Methode qui encrypte une donnée en utilisant le type d'encryption précisé lors de la création d'instance,
- Exclude checks
Tab detected. Open
#Incrémente la variable d'instance nbOfEncrypt, qui compte le nombre d'encryptions effectuées par l'encodeur/décodeur.
- Exclude checks
Tab detected. Open
decipher.decrypt
- Exclude checks
Tab detected. Open
plain = decipher.update(dataToDecrypt) + decipher.final
- Exclude checks
Line is too long. [122/80] Open
#Methode qui décrypte une donnée YAML encryptée en utilisant le type d'encryption précisé lors de la création d'instance,
- Exclude checks
Use only ascii symbols in comments. Open
#*Appeler une instance de cette classe avec les méthodes encrypt(data) et decrypt(data) cryptera ou décryptera
- Read upRead up
- Exclude checks
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 création d'instance de la classe Crypt.
- Read upRead up
- Exclude checks
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
Redundant return
detected. Open
return YAML.load(plain)
- Read upRead up
- Exclude checks
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.
Missing space after #
. Open
#@psw
- Read upRead up
- Exclude checks
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 pour payer nos hommages à monsieur Jacoboni
- Read upRead up
- Exclude checks
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 création d'instance de la classe Crypt.
- Read upRead up
- Exclude checks
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 création d'instance de la classe Crypt.
- Read upRead up
- Exclude checks
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
#Vecteur d'initialisation de l'algorithme de cryptage, contient une valeur par défaut.
- Read upRead up
- Exclude checks
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
#le IV du mot de passe précisé lors de la création d'instance.
- Read upRead up
- Exclude checks
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
#Prévoir de rendre privé la méthode hashLeMotDePasse
- Exclude checks
Tab detected. Open
#Méthode de création d'instance de la classe Crypt.
- Exclude checks
Tab detected. Open
# - +chosenIv+ -> Le vecteur d'initialisation à utiliser.
- Exclude checks
Tab detected. Open
@processedPsw = hashLeMotDePasse()
- Exclude checks
Tab detected. Open
#Vecteur d'initialisation de l'algorithme de cryptage, contient une valeur par défaut.
- Exclude checks
Tab detected. Open
# - +dataToDecrypt+ -> l'objet YAML encrypté à décrypter
- Exclude checks
Tab detected. Open
# * *Return value* :
- Exclude checks
Tab detected. Open
decipher.key = @processedPsw
- Exclude checks
Use snake_case for variable names. Open
@nbOfDecrypt=0
- Read upRead up
- Exclude checks
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
@nbOfEncrypt=@nbOfEncrypt+1
- Read upRead up
- Exclude checks
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
@nbOfDecrypt=@nbOfDecrypt+1
- Read upRead up
- Exclude checks
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
#*utilise le PKCS5 pour sécuriser le mot de passe.
- Read upRead up
- Exclude checks
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
#Empêche l'utilisation de la méthode new pour payer nos hommages à monsieur Jacoboni
- Read upRead up
- Exclude checks
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
# - +unPassword+ -> le mot de passe utilisé comme clé
- Read upRead up
- Exclude checks
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
# - +chosenIv+ -> Le vecteur d'initialisation à utiliser.
- Read upRead up
- Exclude checks
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
#Est le mot de passe choisi et utilisé comme clé de cryptage, il est choisi lors de la création d'instance.
- Read upRead up
- Exclude checks
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
#Type d'encryptage choisi, AES 128 bits GCM par défault : Attention, certains encryptages ne seront pas supportés
- Read upRead up
- Exclude checks
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
#Methode qui encrypte une donnée en utilisant le type d'encryption précisé lors de la création d'instance,
- Read upRead up
- Exclude checks
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
#le hash du mot de passe précisé lors de la création d'instance,
- Read upRead up
- Exclude checks
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
#
- Exclude checks
Tab detected. Open
#
- Exclude checks
Tab detected. Open
# - +unPassword+ -> le mot de passe utilisé comme clé
- Exclude checks
Tab detected. Open
# - +encryptionMethod+ -> La méthode d'encryption à utiliser, toutes ne sont pas supportées. ( cf https://docs.google.com/document/d/1Hdzg2B-U0fL_KFjIpdfWqLR6xUaBIzQuEXP7pZsM3V4/pub )
- Exclude checks
Tab detected. Open
@psw = password
- Exclude checks
Tab detected. Open
#Le salt ajoute une composante aléatoire évitant de casser l'algo d'encryption par Rainbow Tables.
- Exclude checks
Tab detected. Open
key_len = 256
- Exclude checks
Tab detected. Open
end
- Exclude checks
Tab detected. Open
# * *Usage* :
- Exclude checks
Line is too long. [114/80] Open
#*les données fournies en paramètre grace à de l AES 128bits GCM en se servant du mot de passe crypté par le PKCS5
- Exclude checks
Use only ascii symbols in comments. Open
#*en clé de cryptage.
- Read upRead up
- Exclude checks
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
#Methode qui hash le mot de passe en utilisant un sel aléatoire et PBKDF2
- Read upRead up
- Exclude checks
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
Surrounding space missing for operator =
. Open
@nbOfEncrypt=0
- Read upRead up
- Exclude checks
Checks that operators have space around them, except for ** which should not have surrounding space.
Example:
# bad
total = 3*4
"apple"+"juice"
my_number = 38/4
a ** b
# good
total = 3 * 4
"apple" + "juice"
my_number = 38 / 4
a**b
Tab detected. Open
#Empêche l'utilisation de la méthode new pour payer nos hommages à monsieur Jacoboni
- Exclude checks
Tab detected. Open
# - +encryptionMethod+ -> La méthode d'encryption à utiliser, toutes ne sont pas supportées. ( cf https://docs.google.com/document/d/1Hdzg2B-U0fL_KFjIpdfWqLR6xUaBIzQuEXP7pZsM3V4/pub )
- Exclude checks
Tab detected. Open
# - Une nouvelle instance de la classe Crypt.
- Exclude checks
Tab detected. Open
# * *Sample code* :
- Exclude checks
Tab detected. Open
# * *Arguments* :
- Exclude checks
Tab detected. Open
# * *Usage* :
- Exclude checks
Tab detected. Open
#
- Exclude checks
Tab detected. Open
#Methode qui décrypte une donnée YAML encryptée en utilisant le type d'encryption précisé lors de la création d'instance,
- Exclude checks
Tab detected. Open
#
- Exclude checks
Line is too long. [186/80] Open
# - +encryptionMethod+ -> La méthode d'encryption à utiliser, toutes ne sont pas supportées. ( cf https://docs.google.com/document/d/1Hdzg2B-U0fL_KFjIpdfWqLR6xUaBIzQuEXP7pZsM3V4/pub )
- Exclude checks
Use snake_case for variable names. Open
@nbOfEncrypt=0
- Read upRead up
- Exclude checks
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
#*les données fournies en paramètre grace à de l AES 128bits GCM en se servant du mot de passe crypté par le PKCS5
- Read upRead up
- Exclude checks
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 d'initialisation utilisée lors de la création d'instance.
- Read upRead up
- Exclude checks
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
#Vecteur d'initialisation de l'algorithme de cryptage, contient une valeur par défaut.
- Read upRead up
- Exclude checks
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
#le IV du mot de passe précisé lors de la création d'instance.
- Read upRead up
- Exclude checks
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
#Incrémente la variable d'instance nbOfEncrypt, qui compte le nombre d'encryptions effectuées par l'encodeur/décodeur.
- Read upRead up
- Exclude checks
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
# - La chaîne encryptée
- Read upRead up
- Exclude checks
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
# - myCipher = Crypt.creerAes256GCM("passwordThing","myOwnIV")
- Exclude checks
Tab detected. Open
decipher.iv = @iv
- Exclude checks
Tab detected. Open
@cipherType = encryptionMethod
- Exclude checks
Tab detected. Open
end
- Exclude checks
Line is too long. [110/80] Open
#*Appeler une instance de cette classe avec les méthodes encrypt(data) et decrypt(data) cryptera ou décryptera
- Exclude checks
Tab detected. Open
# * *Arguments* :
- Exclude checks
Line is too long. [186/80] Open
# - +encryptionMethod+ -> La méthode d'encryption à utiliser, toutes ne sont pas supportées. ( cf https://docs.google.com/document/d/1Hdzg2B-U0fL_KFjIpdfWqLR6xUaBIzQuEXP7pZsM3V4/pub )
- Exclude checks
Line is too long. [109/80] Open
#Est le mot de passe choisi et utilisé comme clé de cryptage, il est choisi lors de la création d'instance.
- Exclude checks
Tab detected. Open
@nbOfDecrypt=@nbOfDecrypt+1
- Exclude checks
Line is too long. [107/80] Open
#Methode qui encrypte une donnée en utilisant le type d'encryption précisé lors de la création d'instance,
- Exclude checks
Use snake_case for method names. Open
def hashLeMotDePasse
- Read upRead up
- Exclude checks
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
Tab detected. Open
return YAML.load(plain)
- Exclude checks
Use snake_case for variable names. Open
def Crypt.creer(unPassword,encryptionMethod='AES-128-CBC')
- Read upRead up
- Exclude checks
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
Line is too long. [85/80] Open
#Empêche l'utilisation de la méthode new pour payer nos hommages à monsieur Jacoboni
- Exclude checks
Use only ascii symbols in comments. Open
#le IV du mot de passe précisé lors de la création d'instance.
- Read upRead up
- Exclude checks
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
#Prévoir de rendre privé la méthode hashLeMotDePasse
- Read upRead up
- Exclude checks
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
# - +dataToDecrypt+ -> l'objet YAML encrypté à décrypter
- Read upRead up
- Exclude checks
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 création d'instance de la classe Crypt.
- Read upRead up
- Exclude checks
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 Crypt.creer
. Open
def Crypt.creer(unPassword,encryptionMethod='AES-128-CBC')
- Read upRead up
- Exclude checks
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
Use only ascii symbols in comments. Open
# - +chosenIv+ -> Le vecteur d'initialisation à utiliser.
- Read upRead up
- Exclude checks
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.creerAes256GCM
instead of Crypt.creerAes256GCM
. Open
def Crypt.creerAes256GCM(unPassword)
- Read upRead up
- Exclude checks
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
Use only ascii symbols in comments. Open
#le hash du mot de passe précisé lors de la création d'instance,
- Read upRead up
- Exclude checks
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
# - L'objet décrypté
- Read upRead up
- Exclude checks
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
Redundant return
detected. Open
return key
- Read upRead up
- Exclude checks
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.
Tab detected. Open
# - myCipher = Crypt.creer("passwordThing")
- Exclude checks
Tab detected. Open
def Crypt.creer(unPassword,encryptionMethod='AES-128-CBC')
- Exclude checks
Tab detected. Open
# * *Arguments* :
- Exclude checks
Tab detected. Open
#Type d'encryptage choisi, AES 128 bits GCM par défault : Attention, certains encryptages ne seront pas supportés
- Exclude checks
Tab detected. Open
salt = OpenSSL::Random.random_bytes(32)
- Exclude checks
Tab detected. Open
# * *Arguments* :
- Exclude checks
Tab detected. Open
#le hash du mot de passe précisé lors de la création d'instance,
- Exclude checks
Tab detected. Open
#Incrémente la variable d'instance nbOfDecrypt, qui compte le nombre de décryptions effectuées par l'encodeur/décodeur.
- Exclude checks
Tab detected. Open
# - L'objet décrypté
- Exclude checks
Use snake_case for variable names. Open
@cipherType = encryptionMethod
- Read upRead up
- Exclude checks
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
#Indique le nombre de fois que la méthode encrypt a été utilisée
- Read upRead up
- Exclude checks
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
Line is too long. [81/80] Open
# - +dataToEncrypt+ -> la donnée à encrypter, qui est ensuite traduite en YAML
- Exclude checks
Prefer using YAML.safe_load
over YAML.load
. Open
return YAML.load(plain)
- Read upRead up
- Exclude checks
This cop checks for the use of YAML class methods which have potential security issues leading to remote code execution when loading from an untrusted source.
Example:
# bad
YAML.load("--- foo")
# good
YAML.safe_load("--- foo")
YAML.dump("foo")
Tab detected. Open
#le IV du mot de passe précisé lors de la création d'instance.
- Exclude checks
Line is too long. [120/80] Open
#Incrémente la variable d'instance nbOfDecrypt, qui compte le nombre de décryptions effectuées par l'encodeur/décodeur.
- Exclude checks
Use snake_case for variable names. Open
def encrypt(dataToEncrypt)
- Read upRead up
- Exclude checks
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
yamlString=dataToEncrypt.to_yaml
- Read upRead up
- Exclude checks
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
#Le salt ajoute une composante aléatoire évitant de casser l'algo d'encryption par Rainbow Tables.
- Read upRead up
- Exclude checks
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
#Methode qui décrypte une donnée YAML encryptée en utilisant le type d'encryption précisé lors de la création d'instance,
- Read upRead up
- Exclude checks
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 snake_case for variable names. Open
def decrypt(dataToDecrypt)
- Read upRead up
- Exclude checks
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
# - +encryptionMethod+ -> La méthode d'encryption à utiliser, toutes ne sont pas supportées. ( cf https://docs.google.com/document/d/1Hdzg2B-U0fL_KFjIpdfWqLR6xUaBIzQuEXP7pZsM3V4/pub )
- Read upRead up
- Exclude checks
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
#Est uniquement appelée lors de l'initialisation d'une nouvelle instance.
- Read upRead up
- Exclude checks
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
#Incrémente la variable d'instance nbOfDecrypt, qui compte le nombre de décryptions effectuées par l'encodeur/décodeur.
- Read upRead up
- Exclude checks
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-assignment shorthand +=
. Open
@nbOfDecrypt=@nbOfDecrypt+1
- Read upRead up
- Exclude checks
This cop enforces the use the shorthand for self-assignment.
Example:
# bad
x = x + 1
# good
x += 1
Tab detected. Open
# - +chosenIv+ -> Le vecteur d'initialisation à utiliser.
- Exclude checks
Tab detected. Open
# - La clé de cryptage calculée selon le mot de passe
- Exclude checks
Tab detected. Open
#
- Exclude checks
Tab detected. Open
yamlString=dataToEncrypt.to_yaml
- Exclude checks
Tab detected. Open
cipher.key = @processedPsw
- Exclude checks
Tab detected. Open
# - myCryptInstance.decrypt(encryptedObject)
- Exclude checks
Use self-assignment shorthand +=
. Open
@nbOfEncrypt=@nbOfEncrypt+1
- Read upRead up
- Exclude checks
This cop enforces the use the shorthand for self-assignment.
Example:
# bad
x = x + 1
# good
x += 1
Use only ascii symbols in comments. Open
# - +chosenIv+ -> Le vecteur d'initialisation à utiliser.
- Read upRead up
- Exclude checks
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 value* :
- Exclude checks
Tab detected. Open
#le IV du mot de passe précisé lors de la création d'instance.
- Exclude checks
Tab detected. Open
# - +dataToEncrypt+ -> la donnée à encrypter, qui est ensuite traduite en YAML
- Exclude checks
Tab detected. Open
cipher = OpenSSL::Cipher.new(@cipherType)
- Exclude checks
Tab detected. Open
cipher.encrypt
- Exclude checks
Tab detected. Open
#Indique le nombre de fois que la méthode encrypt a été utilisée
- Exclude checks
Tab detected. Open
# * *Usage* :
- Exclude checks
Use only ascii symbols in comments. Open
# - +unPassword+ -> le mot de passe utilisé comme clé
- Read upRead up
- Exclude checks
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
# - +dataToEncrypt+ -> la donnée à encrypter, qui est ensuite traduite en YAML
- Read upRead up
- Exclude checks
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
Do not use parentheses for method calls with no arguments. Open
@processedPsw = hashLeMotDePasse()
- Read upRead up
- Exclude checks
This cop checks for unwanted parentheses in parameterless method calls.
Example:
# bad
object.some_method()
# good
object.some_method
Redundant return
detected. Open
return encrypted
- Read upRead up
- Exclude checks
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 snake_case for variable names. Open
def Crypt.creerAes256GCM(unPassword)
- Read upRead up
- Exclude checks
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
# - +unPassword+ -> le mot de passe utilisé comme clé
- Read upRead up
- Exclude checks
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
#Indique le nombre de fois que la méthode decrypt a été utilisée
- Read upRead up
- Exclude checks
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
Missing top-level class documentation comment. Open
class Crypt
- Read upRead up
- Exclude checks
This cop checks for missing top-level documentation of classes and modules. Classes with no body are exempt from the check and so are namespace modules - modules that have nothing in their bodies except classes, other modules, or constant definitions.
The documentation requirement is annulled if the class or module has a "#:nodoc:" comment next to it. Likewise, "#:nodoc: all" does the same for all its children.
Example:
# bad
class Person
# ...
end
# good
# Description/Explanation of Person class
class Person
# ...
end