Block has too many lines. [73/25] Open
RSpec.describe GithubProjectService, type: :service do
describe '#sync' do
subject(:service) { GithubProjectService.new(project) }
context 'without repository' do
- Read upRead up
- Exclude checks
This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.
Block has too many lines. [45/25] Open
describe '#sync' do
subject(:service) { GithubProjectService.new(project) }
context 'without repository' do
let(:project) { FactoryGirl.build(:project, repository: '', title: 'title', id: 0) }
- Read upRead up
- Exclude checks
This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.
Block has too many lines. [28/25] Open
context 'with repository' do
let(:project) { FactoryGirl.build(:project, repository: 'gitshowcase/gitshowcase') }
it 'fetches repository data' do
client = double
- Read upRead up
- Exclude checks
This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.
Bad indentation of the first parameter. Open
change(project, :forks).to(14)
- Read upRead up
- Exclude checks
This cop checks the indentation of the first parameter in a method call. Parameters after the first one are checked by Style/AlignParameters, not by this cop.
Example:
# bad
some_method(
first_param,
second_param)
# good
some_method(
first_param,
second_param)
Line is too long. [94/80] Open
expect(client).to receive(:repository).with('gitshowcase/gitshowcase').and_return(spy)
- Exclude checks
Line is too long. [90/80] Open
change(project, :description).to('Awesome Portfolio from your GitHub').and \
- Exclude checks
Bad indentation of the first parameter. Open
change(project, :stars).to(98).and \
change(project, :forks).to(14)
- Read upRead up
- Exclude checks
This cop checks the indentation of the first parameter in a method call. Parameters after the first one are checked by Style/AlignParameters, not by this cop.
Example:
# bad
some_method(
first_param,
second_param)
# good
some_method(
first_param,
second_param)
Line is too long. [106/80] Open
expect { service.sync }.to raise_exception 'Project #0 - title does not have a repository to sync'
- Exclude checks
Line is too long. [109/80] Open
let(:project) { FactoryGirl.build(:project, repository: 'https://github.com/gitshowcase/gitshowcase') }
- Exclude checks
Line is too long. [111/80] Open
allow(GithubProjectService).to receive(:client).with(user).and_return(double(repositories: repositories))
- Exclude checks
Bad indentation of the first parameter. Open
change(project, :description).to('Awesome Portfolio from your GitHub').and \
change(project, :language).to('Ruby').and \
change(project, :fork).to(false).and \
change(project, :stars).to(98).and \
change(project, :forks).to(14)
- Read upRead up
- Exclude checks
This cop checks the indentation of the first parameter in a method call. Parameters after the first one are checked by Style/AlignParameters, not by this cop.
Example:
# bad
some_method(
first_param,
second_param)
# good
some_method(
first_param,
second_param)
Line is too long. [84/80] Open
expect { service.sync }.to change(project, :title).to('Gitshowcase').and \
- Exclude checks
Line is too long. [90/80] Open
let(:project) { FactoryGirl.build(:project, repository: '', title: 'title', id: 0) }
- Exclude checks
Use 2 spaces for indentation in an array, relative to the start of the line where the left square bracket is. Open
double(full_name: 'author/repo0'),
- Read upRead up
- Exclude checks
This cop checks the indentation of the first element in an array literal where the opening bracket and the first element are on separate lines. The other elements' indentations are handled by the AlignArray cop.
By default, array literals that are arguments in a method call with parentheses, and where the opening square bracket of the array is on the same line as the opening parenthesis of the method call, shall have their first element indented one step (two spaces) more than the position inside the opening parenthesis.
Other array literals shall have their first element indented one step more than the start of the line where the opening square bracket is.
This default style is called 'specialinsideparentheses'. Alternative styles are 'consistent' and 'align_brackets'. Here are examples:
Example: EnforcedStyle: specialinsideparentheses (default)
# The `special_inside_parentheses` style enforces that the first
# element in an array literal where the opening bracket and first
# element are on seprate lines is indented one step (two spaces) more
# than the position inside the opening parenthesis.
#bad
array = [
:value
]
and_in_a_method_call([
:no_difference
])
#good
array = [
:value
]
but_in_a_method_call([
:its_like_this
])
Example: EnforcedStyle: consistent
# The `consistent` style enforces that the first element in an array
# literal where the opening bracket and the first element are on
# seprate lines is indented the same as an array literal which is not
# defined inside a method call.
#bad
# consistent
array = [
:value
]
but_in_a_method_call([
:its_like_this
])
#good
array = [
:value
]
and_in_a_method_call([
:no_difference
])
Example: EnforcedStyle: align_brackets
# The `align_brackets` style enforces that the opening and closing
# brackets are indented to the same position.
#bad
# align_brackets
and_now_for_something = [
:completely_different
]
#good
# align_brackets
and_now_for_something = [
:completely_different
]
Line is too long. [108/80] Open
expect(GithubProjectService).to receive(:new).twice.and_return(service_doubles[0], service_doubles[1])
- Exclude checks
Bad indentation of the first parameter. Open
change(project, :language).to('Ruby').and \
change(project, :fork).to(false).and \
change(project, :stars).to(98).and \
change(project, :forks).to(14)
- Read upRead up
- Exclude checks
This cop checks the indentation of the first parameter in a method call. Parameters after the first one are checked by Style/AlignParameters, not by this cop.
Example:
# bad
some_method(
first_param,
second_param)
# good
some_method(
first_param,
second_param)
Indent the first parameter one step more than the start of the previous line. Open
change(project, :homepage).to('https://www.gitshowcase.com').and \
change(project, :description).to('Awesome Portfolio from your GitHub').and \
change(project, :language).to('Ruby').and \
change(project, :fork).to(false).and \
change(project, :stars).to(98).and \
- Read upRead up
- Exclude checks
This cop checks the indentation of the first parameter in a method call. Parameters after the first one are checked by Style/AlignParameters, not by this cop.
Example:
# bad
some_method(
first_param,
second_param)
# good
some_method(
first_param,
second_param)
Bad indentation of the first parameter. Open
change(project, :fork).to(false).and \
change(project, :stars).to(98).and \
change(project, :forks).to(14)
- Read upRead up
- Exclude checks
This cop checks the indentation of the first parameter in a method call. Parameters after the first one are checked by Style/AlignParameters, not by this cop.
Example:
# bad
some_method(
first_param,
second_param)
# good
some_method(
first_param,
second_param)
Line is too long. [90/80] Open
let(:project) { FactoryGirl.build(:project, repository: 'gitshowcase/gitshowcase') }
- Exclude checks