Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AFLplusplus
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
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
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ulf Kargén
AFLplusplus
Commits
8817da8a
Commit
8817da8a
authored
2 years ago
by
Maciej Domanski
Browse files
Options
Downloads
Patches
Plain Diff
Removed a modified file from pr
parent
1149b131
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.custom-format.py
+17
-17
17 additions, 17 deletions
.custom-format.py
with
17 additions
and
17 deletions
.custom-format.py
+
17
−
17
View file @
8817da8a
...
@@ -58,16 +58,16 @@ def custom_format(filename):
...
@@ -58,16 +58,16 @@ def custom_format(filename):
in_define
=
True
in_define
=
True
if
(
if
(
"
/*
"
in
line
"
/*
"
in
line
and
not
line
.
strip
().
startswith
(
"
/*
"
)
and
not
line
.
strip
().
startswith
(
"
/*
"
)
and
line
.
endswith
(
"
*/
"
)
and
line
.
endswith
(
"
*/
"
)
and
len
(
line
)
<
(
COLUMN_LIMIT
-
2
)
and
len
(
line
)
<
(
COLUMN_LIMIT
-
2
)
):
):
cmt_start
=
line
.
rfind
(
"
/*
"
)
cmt_start
=
line
.
rfind
(
"
/*
"
)
line
=
(
line
=
(
line
[:
cmt_start
]
line
[:
cmt_start
]
+
"
"
*
(
COLUMN_LIMIT
-
2
-
len
(
line
))
+
"
"
*
(
COLUMN_LIMIT
-
2
-
len
(
line
))
+
line
[
cmt_start
:]
+
line
[
cmt_start
:]
)
)
define_padding
=
0
define_padding
=
0
...
@@ -76,21 +76,21 @@ def custom_format(filename):
...
@@ -76,21 +76,21 @@ def custom_format(filename):
define_padding
=
max
(
0
,
len
(
last_line
[
last_line
.
rfind
(
"
\n
"
)
+
1
:]))
define_padding
=
max
(
0
,
len
(
last_line
[
last_line
.
rfind
(
"
\n
"
)
+
1
:]))
if
(
if
(
last_line
is
not
None
last_line
is
not
None
and
last_line
.
strip
().
endswith
(
"
{
"
)
and
last_line
.
strip
().
endswith
(
"
{
"
)
and
line
.
strip
()
!=
""
and
line
.
strip
()
!=
""
):
):
line
=
(
"
"
*
define_padding
+
"
\\
"
if
in_define
else
""
)
+
"
\n
"
+
line
line
=
(
"
"
*
define_padding
+
"
\\
"
if
in_define
else
""
)
+
"
\n
"
+
line
elif
(
elif
(
last_line
is
not
None
last_line
is
not
None
and
last_line
.
strip
().
startswith
(
"
}
"
)
and
last_line
.
strip
().
startswith
(
"
}
"
)
and
line
.
strip
()
!=
""
and
line
.
strip
()
!=
""
):
):
line
=
(
"
"
*
define_padding
+
"
\\
"
if
in_define
else
""
)
+
"
\n
"
+
line
line
=
(
"
"
*
define_padding
+
"
\\
"
if
in_define
else
""
)
+
"
\n
"
+
line
elif
(
elif
(
line
.
strip
().
startswith
(
"
}
"
)
line
.
strip
().
startswith
(
"
}
"
)
and
last_line
is
not
None
and
last_line
is
not
None
and
last_line
.
strip
()
!=
""
and
last_line
.
strip
()
!=
""
):
):
line
=
(
"
"
*
define_padding
+
"
\\
"
if
in_define
else
""
)
+
"
\n
"
+
line
line
=
(
"
"
*
define_padding
+
"
\\
"
if
in_define
else
""
)
+
"
\n
"
+
line
...
@@ -123,4 +123,4 @@ for filename in args:
...
@@ -123,4 +123,4 @@ for filename in args:
with
open
(
filename
,
"
w
"
)
as
f
:
with
open
(
filename
,
"
w
"
)
as
f
:
f
.
write
(
code
)
f
.
write
(
code
)
else
:
else
:
print
(
code
)
print
(
code
)
\ No newline at end of file
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