IAP GITLAB
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
corsika
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pranav Sampathkumar
corsika
Commits
44d85880
Commit
44d85880
authored
4 years ago
by
ralfulrich
Browse files
Options
Downloads
Patches
Plain Diff
update clang/copyright scripts
parent
932ed4ca
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
do-clang-format.py
+23
-9
23 additions, 9 deletions
do-clang-format.py
do-copyright.py
+1
-1
1 addition, 1 deletion
do-copyright.py
with
24 additions
and
10 deletions
do-clang-format.py
+
23
−
9
View file @
44d85880
...
...
@@ -8,6 +8,7 @@ import argparse
import
subprocess
as
subp
import
os
import
sys
import
re
parser
=
argparse
.
ArgumentParser
(
description
=
__doc__
)
parser
.
add_argument
(
'
--apply
'
,
action
=
"
store_true
"
,
...
...
@@ -17,20 +18,20 @@ parser.add_argument("--all", action="store_true",
args
=
parser
.
parse_args
()
excludeDirs
=
[
"
./
modules
"
,
"
./
externals
"
,
"
build
"
,
"
install
"
,
"
git
"
]
excludeDirs
=
[
r
"
^(\./)?
modules
/
"
,
r
"
^(\./)?
externals
/
"
,
r
"
^(\./)?build
"
,
r
"
^(\./)?install
"
,
r
"
(\./)?\.
git
"
]
filelist
=
[]
if
args
.
all
:
for
dirpath
,
dirnames
,
filenames
in
os
.
walk
(
"
.
"
):
excl
=
False
for
excl_dir
in
excludeDirs
:
if
excl_dir
in
dirpath
:
if
re
.
findall
(
excl_dir
,
dirpath
)
:
excl
=
True
break
if
excl
:
continue
for
f
in
filenames
:
if
f
.
endswith
(
"
.hpp
"
)
or
f
.
endswith
(
"
.cpp
"
):
if
(
f
.
endswith
(
"
.hpp
"
)
or
f
.
endswith
(
"
.cpp
"
)
or
f
.
endswith
(
"
.inl
"
))
:
filename
=
os
.
path
.
join
(
dirpath
,
f
)
if
not
os
.
path
.
islink
(
filename
):
filelist
.
append
(
filename
)
...
...
@@ -47,18 +48,31 @@ else:
filelist
.
append
(
line
[
1
:].
lstrip
())
cmd
=
"
git ls-files --exclude-standard --others
"
filelist
+=
subp
.
check_output
(
cmd
,
shell
=
True
).
decode
(
"
utf8
"
).
strip
().
split
(
"
\n
"
)
filelist
=
[
x
for
x
in
filelist
if
"
./externals
"
not
in
x
and
"
./modules
"
not
in
x
and
(
x
.
endswith
(
"
.hpp
"
)
or
x
.
endswith
(
"
.cpp
"
))]
filelist2
=
subp
.
check_output
(
cmd
,
shell
=
True
).
decode
(
"
utf8
"
).
strip
().
split
(
"
\n
"
)
filelist
+=
filelist2
# some cleanup
filelist_clean
=
[]
for
f
in
filelist
:
if
not
(
f
.
endswith
(
"
.hpp
"
)
or
f
.
endswith
(
"
.cpp
"
)
or
f
.
endswith
(
"
.inl
"
)):
continue
if
os
.
path
.
islink
(
f
):
continue
excl
=
False
for
excl_dir
in
excludeDirs
:
if
re
.
findall
(
excl_dir
,
f
):
excl
=
True
break
if
excl
:
continue
filelist_clean
.
append
(
f
)
filelist
=
filelist_clean
cmd
=
"
clang-format
"
if
"
CLANG_FORMAT
"
in
os
.
environ
:
cmd
=
os
.
environ
[
"
CLANG_FORMAT
"
]
cmd
+=
"
-style=file
"
if
args
.
apply
:
for
filename
in
filelist
:
for
filename
in
filelist
:
subp
.
check_call
(
cmd
.
split
()
+
[
"
-i
"
,
filename
])
else
:
...
...
This diff is collapsed.
Click to expand it.
do-copyright.py
+
1
−
1
View file @
44d85880
...
...
@@ -24,7 +24,7 @@ Debug = 0
excludeDirs
=
[
"
./modules
"
,
"
./externals
"
,
"
build
"
,
"
install
"
,
"
git
"
]
excludeFiles
=
[
'
PhysicalConstants.h
'
,
'
CorsikaFenvOSX.cc
'
,
'
sgn.h
'
,
'
quartic.h
'
]
extensions
=
[
"
.cpp
"
,
"
.hpp
"
]
extensions
=
[
"
.cpp
"
,
"
.inl
"
,
"
.hpp
"
]
"""
justCheck: T: only checking, F: also changing files
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment