Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
ecc6a69f
Commit
ecc6a69f
authored
Mar 15, 2013
by
Miguel Angel Ajo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Also check coding style of new files, not only modified ones
parent
6c614e29
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
checkcoding.py
tools/checkcoding.py
+5
-3
No files found.
tools/checkcoding.py
View file @
ecc6a69f
#!/usr/bin/env python
import
subprocess
,
os
,
difflib
EXTENSIONS
=
[
"cpp"
,
"cxx"
,
"h"
,
"hpp"
]
EXTENSIONS
=
[
"cpp"
,
"cxx"
,
"h"
,
"hpp"
,
"c"
]
#
# Function to call uncrustify, it returns the re-formated code and
...
...
@@ -14,8 +14,6 @@ def uncrustify_file(filename):
popen
.
wait
()
return
[
popen
.
stdout
.
readlines
(),
popen
.
stderr
.
read
()]
#
# This function talks to bzr, and gets the list of modified files
#
...
...
@@ -34,6 +32,10 @@ def bzr_modified():
if
line
.
startswith
(
"modified:"
):
in_modifieds
=
True
continue
if
line
.
startswith
(
"added:"
):
in_modifieds
=
True
continue
if
in_modifieds
:
modifieds
.
append
(
line
.
lstrip
(
"
\t
"
)
.
rstrip
(
"
\t
"
)
)
...
...
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