Skip to content

Commit

Permalink
Add Linting CI
Browse files Browse the repository at this point in the history
Linter is a program that checks and solves for common code problems
like bad pratices, inconsistency, style issues, high complexity,
duplications, etc.

It's a good idea to have linters as a test case for the continuous
integration system.

In this commit, I've fixed the reported linting issues.

For HTMLLint, Optional Tag, Concerns Seperation, and Capitalization
are disabled due to concerns of unexpected behaviors.

While indentation check is disabled because the file uses 4 spaces
rather than 2 spaces and SpaceConsistencyBear does indentation
check out of the box.
  • Loading branch information
yukiisbored committed Dec 2, 2016
1 parent 6172e48 commit 0bfc21f
Show file tree
Hide file tree
Showing 12 changed files with 448 additions and 373 deletions.
29 changes: 29 additions & 0 deletions .coafile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[default]
bears = SpaceConsistencyBear, LineLengthBear
files = **.html, **.yml, **.css, **.js, **.md
ignore = **.min.css, **.min.js, _site/**
max_line_length = 100
use_spaces = True

[html]
bears = HTMLLintBear, BootLintBear
files = **.html
ignore = _site/**
htmllint_ignore = indentation, optional_tag, concerns_separation, capitalization

[yaml]
bears = YAMLLintBear
files = **.yml
yamllint_config = .yamllint

[css]
bears = PHPCodeSnifferBear
files = **.css
ignore = **.min.css, _site/**

[js]
bears = JSHintBear
files = **.js
ignore = **.min.js, _site/**
environment_jquery = True
javascript_strictness = implied
8 changes: 3 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
language: ruby
services: docker
rvm:
- 2.3.3
install:
install:
- bundle install
script:
- bundle exec jekyll build
branches:
only:
- gh-pages

- docker run --volume=$(pwd):/app --workdir=/app coala/base coala -C
2 changes: 2 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
rules:
line-length: disable
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
# gci16.fossasia.org
[![Build Status](https://travis-ci.org/fossasia/gci16.fossasia.org.svg)](https://travis-ci.org/fossasia/gci16.fossasia.org)
[![Build Status](https://travis-ci.org/fossasia/gci16.fossasia.org.svg)]
(https://travis-ci.org/fossasia/gci16.fossasia.org)

The student site for GCI 2016 Students.

# Blog Post

To add your blog post, you need to open the file `blogs.yml` in `_data` folder. Maintain the following
format to enter your blog in this website.
To add your blog post, you need to open the file `blogs.yml` in `_data` folder. Maintain the
following format to enter your blog in this website.

```
- name: Your name
blog: https://yourbloglink.com
blog_img: your_image
article: Article title
article_link: https://yourarticlelink.com
```
```

**Important: The image should be added in images folder, and `your_image` should be the file's name, for example 'mypost.png'**
**Important: The image should be added in images folder, and `your_image` should be the file's
name, for example 'mypost.png'**
Also adding article and article_link is optional, unless your task recommends it.
1 change: 0 additions & 1 deletion _data/blogs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

- name: Ridhwanul Haque
blog: https://rhemon.github.io/blog
blog_img: rhemon-blog.png
Expand Down
6 changes: 3 additions & 3 deletions _data/mentors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
github: hpdang
image: hpdang.jpg
blog: http://blog.fossasia.org/
twitter:
twitter:
facebook: hpdang
bio:
bio:

- name: Mario Behling
github: mariobehling
image: mariobehling.jpg
blog: http://mariobehling.de/
twitter: mariobehling
facebook: mariobehling
bio:
bio:
4 changes: 3 additions & 1 deletion _data/students.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#New members please add your credentials to the bottom of the file.
# New members please add your credentials to the bottom of the file.

- name: Oana Rosca
github: oanarosca
Expand Down Expand Up @@ -107,6 +107,8 @@
facebook: https://facebook.com/ridhwanul.haque
email: [email protected]
bio: 17 years old, Programmer, Web/Android Designer and Developer, Bangladeshi
blog: https://rhemon.github.io/blog
blog_img: rhemon-blog.png

- name: Victoria Juan
github: vickyjjj
Expand Down
266 changes: 158 additions & 108 deletions index.html

Large diffs are not rendered by default.

18 changes: 8 additions & 10 deletions javascripts/main.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
$(function(){

$.ajax({
url: "https://api.github.com/repos/fossasia/gci16.fossasia.org/contributors"
}).done(function(data){
data.forEach(function(contributors){
$("#contributors-list").append("<div><img src="+contributors.avatar_url+"><a href="+contributors.html_url+"><i class='fa fa-github fa-2x gh-icon' aria-hidden='true'></i></a><p>"+contributors.login+"</p></div>");

});
});

$.ajax({
url: "https://api.github.com/repos/fossasia/gci16.fossasia.org/contributors"
}).done(function(data){
data.forEach(function(contributors){
// Ignore LineLengthBear
$("#contributors-list").append("<div><img src="+contributors.avatar_url+"><a href="+contributors.html_url+"><i class='fa fa-github fa-2x gh-icon' aria-hidden='true'></i></a><p>"+contributors.login+"</p></div>");
});
});
});
36 changes: 18 additions & 18 deletions stylesheets/contributors.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,45 +2,45 @@
}

#contributors-section ul {
display: block;
display: block;
}

#contributors-section ul:after {
content: '';
display: block;
clear: both;
content: '';
display: block;
clear: both;
}

#contributors-section h1 {
text-align: center;
text-align: center;
}

#contributors-section ul > li {
display: block;
float: left;
width: 25%;
margin: 10px 0;
list-style-type: none;
display: block;
float: left;
width: 25%;
margin: 10px 0;
list-style-type: none;
}

#contributors-section ul > li a {
color: white;
color: white;
}

#contributors-section ul > li .profile {
width: 80px;
vertical-align: top;
width: 80px;
vertical-align: top;
}

#contributors-section ul > li .content {
display: inline-block;
width: 100px;
vertical-align: middle;
display: inline-block;
width: 100px;
vertical-align: middle;
}

#contributors-section ul > li .name {
font-size: 12pt;
font-weight: bold;
font-size: 12pt;
font-weight: bold;
}

#contributors-section ul > li .commit-count {
Expand Down
6 changes: 4 additions & 2 deletions stylesheets/github-light.css
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ SOFTWARE.
color: #969896;
}

.pl-c1 /* constant, variable.other.constant, support, meta.property-name, support.constant, support.variable, meta.module-reference, markup.raw, meta.diff.header */,
.pl-c1 /* constant, variable.other.constant, support, meta.property-name, support.constant,
support.variable, meta.module-reference, markup.raw, meta.diff.header */,
.pl-s .pl-v /* string variable */ {
color: #0086b3;
}
Expand All @@ -37,7 +38,8 @@ SOFTWARE.
color: #795da3;
}

.pl-smi /* variable.parameter.function, storage.modifier.package, storage.modifier.import, storage.type.java, variable.other */,
.pl-smi /* variable.parameter.function, storage.modifier.package, storage.modifier.import,
storage.type.java, variable.other */,
.pl-s .pl-s1 /* string source */ {
color: #333;
}
Expand Down
Loading

0 comments on commit 0bfc21f

Please sign in to comment.