Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
d048c8fe
Commit
d048c8fe
authored
Nov 03, 2017
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use the --parallel Rubocop flag in the static-analysis and improve the job
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
97b80fef
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
7 deletions
+16
-7
scripts/static-analysis
scripts/static-analysis
+16
-7
No files found.
scripts/static-analysis
View file @
d048c8fe
...
@@ -11,31 +11,40 @@ tasks = [
...
@@ -11,31 +11,40 @@ tasks = [
%w[bundle exec rake brakeman]
,
%w[bundle exec rake brakeman]
,
%w[bundle exec license_finder]
,
%w[bundle exec license_finder]
,
%w[yarn run eslint]
,
%w[yarn run eslint]
,
%w[bundle exec rubocop --
require rubocop-rspec
]
,
%w[bundle exec rubocop --
parallel
]
,
%w[scripts/lint-conflicts.sh]
,
%w[scripts/lint-conflicts.sh]
,
%w[bundle exec rake gettext:lint]
,
%w[bundle exec rake gettext:lint]
,
%w[scripts/lint-changelog-yaml]
%w[scripts/lint-changelog-yaml]
]
]
failed_tasks
=
tasks
.
reduce
({})
do
|
failures
,
task
|
failed_tasks
=
tasks
.
reduce
({})
do
|
failures
,
task
|
output
,
status
=
Gitlab
::
Popen
.
popen
(
task
)
start
=
Time
.
now
puts
puts
"$
#{
task
.
join
(
' '
)
}
"
puts
"Running:
#{
task
.
join
(
' '
)
}
"
output
,
status
=
Gitlab
::
Popen
.
popen
(
task
)
puts
output
puts
"==> Finished in
#{
Time
.
now
-
start
}
seconds"
puts
failures
[
task
.
join
(
' '
)]
=
output
unless
status
.
zero?
failures
[
task
.
join
(
' '
)]
=
output
unless
status
.
zero?
failures
failures
end
end
puts
puts
'==================================================='
puts
puts
if
failed_tasks
.
empty?
if
failed_tasks
.
empty?
puts
'All static analyses passed successfully.'
puts
'All static analyses passed successfully.'
else
else
puts
"
\n
===================================================
\n\n
"
puts
'Some static analyses failed:'
puts
"Some static analyses failed:"
failed_tasks
.
each
do
|
failed_task
,
output
|
failed_tasks
.
each
do
|
failed_task
,
output
|
puts
"
\n
****
#{
failed_task
}
failed with the following error:
\n\n
"
puts
puts
"****
#{
failed_task
}
failed with the following error:"
puts
puts
output
puts
output
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment