Skip to content

Commit e172124

Browse files
authored
Merge pull request #19 from acm-uiuc/code-style
Code style
2 parents 8da1b97 + 5914e69 commit e172124

File tree

5 files changed

+67
-0
lines changed

5 files changed

+67
-0
lines changed

_til/codestyle/golang.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
title: Go
3+
category: codestyle
4+
---
5+
6+
__Go__ (just use a linter basically):
7+
```go
8+
//Function Signatures:
9+
func foo(arg1: int, arg2: bool) {
10+
11+
//if/else
12+
if x == y {
13+
return x
14+
}
15+
return y
16+
17+
//No non bracketed blocks
18+
//wrong:
19+
if x == 1
20+
return true
21+
//correct:
22+
if x == 1 {
23+
return true
24+
}
25+
```

_til/codestyle/js.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
title: JavaScript
3+
category: codestyle
4+
---
5+
6+
__JS__ (Use something like ESLint)
7+
```js
8+
//Function Signatures:
9+
function foo(arg1, arg2) {
10+
11+
//if/else
12+
if x == y {
13+
return x;
14+
}
15+
return y;
16+
17+
//No non bracketed blocks
18+
//wrong:
19+
if x == 1
20+
return true;
21+
//correct:
22+
if x == 1 {
23+
return true;
24+
}
25+
```

_til/codestyle/python.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
title: Python
3+
category: codestyle
4+
---
5+
6+
__Python__:
7+
Follow [pep8](https://www.python.org/dev/peps/pep-0008/)

_til/codestyle/ruby.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
title: Ruby
3+
category: codestyle
4+
---
5+
6+
__Ruby__:
7+
good indenting basically

dictionary.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,5 +451,8 @@ ignored [
451451
"MD'",
452452
"XML",
453453
"SUBMODULES",
454+
"CODESTYLE",
455+
"LINTER",
456+
"ESLINT"
454457

455458
]

0 commit comments

Comments
 (0)