Lint : a code quality tool for your development environment

As to ensure the quality of the code that is added to the project, we ask all the developers to setup a code quality tool on their development environment to enhance the overall code.

Install pylint

Make sure you are in the development environment and run :

pip install pylint git-pylint-commit-hook

The command pylint and git-pylint-commit-hook will now be accessible in your system.

install jslint

For this, you’ll need to have NodeJS installed on you computer as well as NPM (Node Package Management tool).
First you’ll have to install the latest version of NodeJS on your computer :

sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install python-software-properties python g++ make nodejs

Then install jslint and jshint

npm config set registry http://registry.npmjs.org/
sudo npm install jslint -g
sudo npm install jshint -g

https://github.com/reid/node-jslint
After running those commands, the jshint binary should be available in the directory /usr/local/bin/jshint

Setup git hook

In your repository, you’ll need to edit the file (or create it) .git/hooks/pre-commit with the following :

#!/usr/bin/env bash
./tools/pre-commit

In the root folder of your repository, make sure that you have the following files :

.jshintrc

//http://www.jshint.com/docs/options/
//http://jslinterrors.com/
{
  "asi": false,
  "expr": true,
  "loopfunc": true,
  "curly": false,
  "evil": true,
  "white": true,
  "undef": true,
  "node": true,
  "camelcase": false,
  "eqeqeq": true,
  "indent": 4,
  "quotmark": "double",
  "unused": false,
  "trailing": true,
  "maxlen": 100,
  "white": true,
  "globals": {
    "$": false,
    "jQuery": false,
    "angular": false,
    "console": false,
    "require": false
  }
}

.jshintignore

node_modules
cpwp/cwp/public/lib

.pylintrc

Click to see the file : .pylintrc
And this is it. Now with this you should be ready to commit

Setup lint in Eclipse

For python you can enable pylint inside Eclipse to have code assist with usefull tips.
Go in Window > Preferences > PyDev > PyLint
Capture du 2014-04-14 15:13:02

Setup lint in Vim

Here are a few links to setup the Lint environment in Vim :
pylint.vim : compiler plugin for python style checking tool
Jshint2.vim : Lightweight, customizable and functional Vim plugin for JSHint integration.
Syntastic : Syntax checking hacks for vim

Make our cities walkable

This video almost make me reconsider my wish to have a house in the countryside. It is true that living in cities is the future and that one should think about it for many reasons : energy, economy, health, environment, …
But still, in Belgium the cities are not walkable cities at all. I don’t feel good in this cities. Even biking in Brussels is really dangerous because everything is adapted for cars only.
Our politics should really think about making our belgian cities more pedestrian-oriented. I’m sure this would help me (and a lot of other people) to feel better in our cities (country).

Where is our 10%

The husband of my cousin, Danny Lee with other African celebrities came together in a song to remind Heads of State of the commitments they made to farmers and pastoralists.
Called « Where is our 10% », to ask African governements to respect their engagements took 10 years earlier in Maputo (Mozambique) to dedicate 10% of their budget to argiculture. The sond features several celebrities as 2Face Idibia, Lami Phillips, Sound Sultan (Nigeria), Baba Maal , Daara J Family (Sénégal), Ceepee (Mauritanie), Danny Lee (Nigeria) and Smarty (Burkina Faso).

In July 2003, the governments of the 53 member countries of the African Union (AU) signed the Maputo Protocol, committing to allocate at least 10% of their national budgets to agriculture, later in 2008. « Ten years later, the situation is bitter! Only eight out of 53 African countries have reached their goal, » according to a statement received Ouestafnews.
« Six out of the eight countries are in West Africa, » the source said quoting the organizers of the « Growing » campaign, which calls for respect for this commitment. The eight countries are Burkina Faso, Guinea, Mali, Niger, Malawi, Ethiopia and Senegal, which reached the symbolic threshold of 10%.