Skip to content

Code style #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Sep 12, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions _til/codestyle/golang.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
title: Go
category: codestyle
---

__Go__ (just use a linter basically):
```go
//Function Signatures:
func foo(arg1: int, arg2: bool) {

//if/else
if x == y {
return x
}
return y

//No non bracketed blocks
//wrong:
if x == 1
return true
//correct:
if x == 1 {
return true
}
```
25 changes: 25 additions & 0 deletions _til/codestyle/js.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
title: JavaScript
category: codestyle
---

__JS__ (Use something like ESLint)
```js
//Function Signatures:
function foo(arg1, arg2) {

//if/else
if x == y {
return x;
}
return y;

//No non bracketed blocks
//wrong:
if x == 1
return true;
//correct:
if x == 1 {
return true;
}
```
7 changes: 7 additions & 0 deletions _til/codestyle/python.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: Python
category: codestyle
---

__Python__:
Follow [pep8](https://www.python.org/dev/peps/pep-0008/)
7 changes: 7 additions & 0 deletions _til/codestyle/ruby.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: Ruby
category: codestyle
---

__Ruby__:
good indenting basically
3 changes: 3 additions & 0 deletions dictionary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -451,5 +451,8 @@ ignored [
"MD'",
"XML",
"SUBMODULES",
"CODESTYLE",
"LINTER",
"ESLINT"

]