Skip to content

Commit 618c6eb

Browse files
author
melpon
committed
コーディング規約を追加
1 parent 9340088 commit 618c6eb

File tree

4 files changed

+22
-4
lines changed

4 files changed

+22
-4
lines changed

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ $ git submodule update -i
1818
Python を使っているので、依存するライブラリを以下のようにインストールします。
1919

2020
```
21+
$ pip install --upgrade pip
2122
$ pip install -r requirements.txt
2223
```
2324

@@ -26,12 +27,13 @@ $ pip install -r requirements.txt
2627
```
2728
$ virtualenv venv
2829
$ source venv/bin/activate
30+
$ pip install --upgrade pip
2931
$ pip install -r requirements.txt
3032
```
3133

3234
### cpprefjp の場合
3335

34-
```python
36+
```
3537
$ git clone https://github.com/cpprefjp/site.git cpprefjp/site
3638
$ ./run.py settings.cpprefjp_local
3739
$ ./localhost.sh cpprefjp/cpprefjp.github.io
@@ -42,7 +44,7 @@ http://localhost:8000 を開けば `index.html` が表示されます。
4244

4345
### boostjp の場合
4446

45-
```python
47+
```
4648
$ git clone https://github.com/boostjp/site.git boostjp/site
4749
$ ./run.py settings.boostjp_local
4850
$ ./localhost.sh boostjp/boostjp.github.io
@@ -51,3 +53,8 @@ $ ./localhost.sh boostjp/boostjp.github.io
5153
これでローカルサーバが起動します。
5254
http://localhost:8000 を開けば `index.html` が表示されます。
5355

56+
## コーディング規約(開発者向け)
57+
58+
ルールは1つです。
59+
`./coding.sh` を実行してエラーが出ないようにして下さい。
60+
これはPEP8、Flake8、Hackingあたりの規約を少し緩めて混ぜた規約になっています。

coding.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/sh
2+
flake8 `find . -name '*.py'` | more

requirements.txt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
1+
flake8==2.2.4
2+
flake8-import-order==0.7
3+
hacking==0.10.2
4+
htmlmin==0.1.5
15
Jinja2==2.7.3
26
Markdown==2.3.1
37
MarkupSafe==0.23
4-
htmlmin==0.1.5
5-
wsgiref==0.1.2
8+
mccabe==0.2.1
9+
pbr==1.8.1
10+
pep8==1.5.7
11+
pyflakes==0.8.1
612
Pygments==1.6
13+
six==1.10.0

setup.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[flake8]
2+
ignore = E501,H304,I100

0 commit comments

Comments
 (0)