Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
Pyston
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
Pyston
Commits
b737c559
Commit
b737c559
authored
May 12, 2014
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add some notes about formatting
parent
daefbbb6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
5 deletions
+20
-5
CONTRIBUTING.md
CONTRIBUTING.md
+9
-1
src/Makefile
src/Makefile
+2
-1
tools/check_format.sh
tools/check_format.sh
+9
-3
No files found.
CONTRIBUTING.md
View file @
b737c559
...
...
@@ -4,7 +4,15 @@
Before a pull request can be merged, you need to to sign the
[
Dropbox Contributor License Agreement
](
https://opensource.dropbox.com/cla/
)
.
Please make sure to run the tests (
`make check`
) on your changes.
Please make sure to run the tests (
`make check`
and
`make check_format`
) on your changes.
##### Formatting
Please make sure
`make check_format`
passes on your commits. If it reports any issues, you can run
`make format`
to auto-apply
the project formatting rules. Note that this will format your files in-place with no built-in undo, so you may want to
create a temporary commit if you have any unstaged changes.
### Projects
If you don't know where to start:
-
Check out the list of
[
starter projects
](
https://github.com/dropbox/pyston/wiki/Starter-projects
)
...
...
src/Makefile
View file @
b737c559
...
...
@@ -309,7 +309,8 @@ endef
format
:
find
\(
-name
'*.cpp'
-o
-name
'*.h'
\)
-print0
| xargs
-0
$(LLVM_BIN)
/clang-format
-style
=
file
-i
check_format
:
$(TOOLS_DIR)
/check_format.sh
$(LLVM_BIN)
/clang-format
$(ECHO)
checking formatting...
$(VERB)
$(TOOLS_DIR)
/check_format.sh
$(LLVM_BIN)
/clang-format
.PHONY
:
test test_debug test_prof test_release
test_debug
:
pyston_dbg ext
...
...
tools/check_format.sh
View file @
b737c559
#!/bin/bash
set
-eu
failed
=
0
for
fn
in
$(
find
-name
'*.cpp'
-o
-name
'*.h'
)
;
do
$1
-style
=
file
-output-replacements-xml
$fn
|
grep
-q
"replacement offset"
&&
{
echo
$fn
"failed clang-format check"
;
exit
1
;
}
$1
-style
=
file
-output-replacements-xml
$fn
|
grep
-q
"replacement offset"
&&
{
echo
$fn
"failed clang-format check"
;
failed
=
1
;
}
done
echo
"Format checks passed"
exit
0
if
[
$failed
-eq
0
]
;
then
echo
"Format checks passed"
exit
0
else
exit
1
fi
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