Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
blaster
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Aerospace and Mechanical Engineering
blaster
Commits
4914b197
Verified
Commit
4914b197
authored
2 months ago
by
Paul Dechamps
Browse files
Options
Downloads
Patches
Plain Diff
(format) Changed format to clang 14
parent
2b05549d
No related branches found
Branches containing commit
No related tags found
1 merge request
!1
BLASTER v1.0
Pipeline
#50743
failed
2 months ago
Stage: build
Stage: test
Stage: validation
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.clang-format
+29
-0
29 additions, 0 deletions
.clang-format
format/format.py
+0
-51
0 additions, 51 deletions
format/format.py
with
29 additions
and
51 deletions
.clang-format
0 → 100644
+
29
−
0
View file @
4914b197
---
# https://clang.llvm.org/docs/ClangFormatStyleOptions.html#
# the "Visual Studio" style is similar to:
BasedOnStyle: LLVM
UseTab: Never
IndentWidth: 4
BreakBeforeBraces: Custom
BraceWrapping:
AfterNamespace: true
AfterClass: true
AfterStruct: true
AfterFunction: true
BeforeLambdaBody: false
AfterControlStatement: Always
BeforeElse: true
AfterCaseLabel: true
BeforeWhile: false
BeforeCatch: true
AfterEnum: true
AfterUnion: true
AfterExternBlock: true
SplitEmptyNamespace: false
SplitEmptyFunction: false
SplitEmptyRecord: false
IndentBraces: false
AccessModifierOffset: -4
SortIncludes: false
ColumnLimit: 0
...
This diff is collapsed.
Click to expand it.
format/format.py
deleted
100755 → 0
+
0
−
51
View file @
2b05549d
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# This script runs "clang-format" recursively on all C/C++ files
# @authors A. Crovato, R. Boman
# Modified by P. Dechamps
import
os
import
fnmatch
import
subprocess
def
all_files
(
root
,
patterns
=
'
*
'
,
skips
=
'
*.git*;*build*;modules*
'
,
single_level
=
False
,
yield_folders
=
False
):
# self.checkPath(root)
patterns
=
patterns
.
split
(
'
;
'
)
skips
=
skips
.
split
(
'
;
'
)
for
path
,
subdirs
,
files
in
os
.
walk
(
root
):
if
yield_folders
:
files
.
extend
(
subdirs
)
files
.
sort
()
for
name
in
files
:
for
pattern
in
patterns
:
if
fnmatch
.
fnmatch
(
name
,
pattern
):
fullname
=
os
.
path
.
join
(
path
,
name
)
ok
=
True
for
skip
in
skips
:
if
fnmatch
.
fnmatch
(
os
.
path
.
relpath
(
fullname
,
start
=
root
),
skip
):
ok
=
False
if
ok
:
yield
fullname
break
if
single_level
:
break
def
main
():
encs
=
{}
for
f
in
all_files
(
os
.
getcwd
(),
patterns
=
'
*.cpp;*.c;*.h;*.hpp
'
):
print
(
'
Checking file
'
,
'
blaster
'
+
f
.
split
(
'
blaster
'
,
1
)[
-
1
],
end
=
'
...
'
)
cmd
=
[
'
clang-format-11
'
,
"
-style=file
"
,
"
-i
"
,
f
]
retcode
=
subprocess
.
call
(
cmd
)
if
retcode
!=
0
:
print
(
f
'
ERROR: retcode =
{
retcode
}
'
)
break
print
(
'
done.
'
)
if
__name__
==
"
__main__
"
:
main
()
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