Showing 218 of 218 total issues
Similar blocks of code found in 2 locations. Consider refactoring. Open
describe "Standalone mode with complex/recursive resources and #{test_data['distribution']}:#{test_data['version']}" do
context 'Install Wildfly with xa datasource (recursive)' do
it 'applies the manifest without error' do
pp = <<-EOS
class { 'wildfly':
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 184.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
describe "Standalone mode with #{test_data['distribution']}:#{test_data['version']}" do
context 'Initial install Wildfly and verification' do
it 'applies the manifest without error' do
pp = <<-EOS
class { 'wildfly':
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 184.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Assignment Branch Condition size for extract_value is too high. [40.84/15] Open
def extract_value(element)
case element.elements[0].text_value
when '['
values = []
- Read upRead up
- Exclude checks
This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric
Example has too many lines [52/5]. Open
it 'applies the manifest without error' do
pp = <<-EOS
class { 'wildfly':
distribution => '#{test_data['distribution']}',
version => '#{test_data['version']}',
- Exclude checks
Example has too many lines [34/5]. Open
it 'applies the manifest without error' do
pp = <<-EOS
class { 'wildfly':
distribution => '#{test_data['distribution']}',
version => '#{test_data['version']}',
- Exclude checks
Method has too many lines. [23/20] Open
def self.title_patterns
[
[
/^(.*):(.*):(.*)$/,
[
- Read upRead up
- Exclude checks
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.
Example has too many lines [25/5]. Open
it 'applies the manifest without error' do
pp = <<-EOS
class { 'wildfly':
distribution => '#{test_data['distribution']}',
version => '#{test_data['version']}',
- Exclude checks
Assignment Branch Condition size for add is too high. [17.15/15] Open
def add(resource, state, recursive, headers)
if recursive
resources = split(resource, state)
operations = resources.map { |(atomic_resource, atomic_state)| operation.add(atomic_resource).with(atomic_state).build }
@api_client.submit(operation.composite(*operations).headers(headers).build)
- Read upRead up
- Exclude checks
This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric
Assignment Branch Condition size for submit is too high. [17.03/15] Open
def submit(body, ignore_failed_outcome = false)
http_request = Net::HTTP::Post.new @uri.request_uri
http_request.add_field 'Content-type', 'application/json'
authz = authz_header
if authz =~ /digest/i
- Read upRead up
- Exclude checks
This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric
Method has too many lines. [22/20] Open
def extract_value(element)
case element.elements[0].text_value
when '['
values = []
- Read upRead up
- Exclude checks
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.
Similar blocks of code found in 3 locations. Consider refactoring. Open
describe 'wildfly::resource' do
let(:facts) do
{ :operatingsystem => 'CentOS',
:kernel => 'Linux',
:osfamily => 'RedHat',
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 74.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 3 locations. Consider refactoring. Open
describe 'wildfly::reload' do
let(:facts) do
{ :operatingsystem => 'CentOS',
:kernel => 'Linux',
:osfamily => 'RedHat',
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 74.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 3 locations. Consider refactoring. Open
describe 'wildfly::cli' do
let(:facts) do
{ :operatingsystem => 'CentOS',
:kernel => 'Linux',
:osfamily => 'RedHat',
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 74.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Assignment Branch Condition size for params_to_key_value_list is too high. [16.31/15] Open
def params_to_key_value_list(node)
list = []
unless node.empty?
nodes = node.elements[1].elements
- Read upRead up
- Exclude checks
This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric
Assignment Branch Condition size for should_execute? is too high. [16.31/15] Open
def should_execute?
unless_eval = true
onlyif_eval = false
unless @resource[:unless].nil?
- Read upRead up
- Exclude checks
This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric
Example has too many lines [22/5]. Open
it 'applies the manifest without error' do
pp = <<-EOS
class { 'wildfly':
distribution => '#{test_data['distribution']}',
version => '#{test_data['version']}',
- Exclude checks
Assignment Branch Condition size for evaluate is too high. [15.13/15] Open
def evaluate(command)
condition, command = command.split(/\sof\s/)
variable, operator, value = condition.gsub(/[()]/, '').split("\s")
response = exec(command, :ignore_failed_outcome => true)
- Read upRead up
- Exclude checks
This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric
Assignment Branch Condition size for authz_header is too high. [15.94/15] Open
def authz_header
digest_auth = Net::HTTP::DigestAuth.new
authz_request = Net::HTTP::Get.new @uri.request_uri
retried = 0
- Read upRead up
- Exclude checks
This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric
Assignment Branch Condition size for update is too high. [15.17/15] Open
def update(resource, state, recursive, headers)
if recursive
resources = split(resource, state)
operations = resources.map { |(atomic_resource, atomic_state)| diff(atomic_state, atomic_resource) }.flatten
@api_client.submit(operation.composite(*operations).headers(headers).build)
- Read upRead up
- Exclude checks
This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric
Example has too many lines [18/5]. Open
it 'applies the manifest without error' do
pp = <<-EOS
class { 'wildfly':
distribution => '#{test_data['distribution']}',
version => '#{test_data['version']}',
- Exclude checks