Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F90515713
command.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Nov 2, 09:32
Size
1 KB
Mime Type
text/x-python
Expires
Mon, Nov 4, 09:32 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22085181
Attached To
rAKA akantu
command.py
View Options
import
os
class
Command
:
"""Returns command line arguments by parsing codeclimate config file."""
def
__init__
(
self
,
config
,
file_list
):
self
.
config
=
config
self
.
file_list
=
file_list
def
build
(
self
):
command
=
[
'/usr/src/app/bin/run-clang-tidy'
,
'-clang-tidy-binary'
,
'/usr/bin/clang-tidy'
]
if
self
.
config
.
get
(
'check'
):
command
.
append
(
'-checks {}'
.
format
(
self
.
config
.
get
(
'check'
)))
if
self
.
config
.
get
(
'config'
):
command
.
append
(
'-config {}'
.
format
(
self
.
config
.
get
(
'project'
)))
if
self
.
config
.
get
(
'header-filter'
):
command
.
append
(
'-header-filter {}'
.
format
(
self
.
config
.
get
(
'language'
)))
if
self
.
config
.
get
(
'compilation_database_path'
):
command
.
append
(
'-p {}'
.
format
(
self
.
config
.
get
(
'compilation_database_path'
)))
include_paths
=
[]
for
file_
in
self
.
file_list
:
include_paths
.
append
(
os
.
path
.
dirname
(
file_
))
include_paths
=
[
f
'--extra-arg -I{path}'
for
path
in
set
(
include_paths
)]
command
.
extend
(
include_paths
)
# command.extend(self.file_list)
return
command
Event Timeline
Log In to Comment