Skip to content
David Leoni edited this page Feb 5, 2016 · 9 revisions

Code keywords

Localization

Quality management

Debugging and Patching


Code keywords

We used some keywords in comments to identify certain code sections. They all start with odr.

odr start/end

All modified Refine code is enclosed in these comments:


// odr start

// odr end

odr new

New classes added in Refine namespace are marked with


/** 
   odr new
*/

odr comment

Comments that were already in Refine and have been changed or added are marked with

/**  
   odr comment
*/

todo find & replace odr javadoc with odr comment

Nullable values

To mark nullable variables we used the @Nullable tag from from JSR-305. Latest IDEs can recognize the tag and warn about unchecked null usage. Wherever possible we also marked Refine nullable fields. We consider all the objects as non null unless marked otherwise. todo how to configure default value?

Example usage:

@Nullable String s;

odr dirty

Not-so-clean code is marked with


// odr dirty

odr todo

Quality management

For code quality management we are using SonarQube with Javascript plugin. Inside the code we adopted tags from JSR 305 in the implementation of findbugs. When deploying, we use Animal sniffer maven plugin to ensure only JDK api <= 1.7 are used in the project.

Localization

For displaying dates/numbers/currency we use Globalize.js. Don't use functions that change capitalization to display text. Let translators deal with it. When using capitalization to normalize text for searching, remember to include the locale, i.e. mystring.toLowerCase(Locale.ITALIAN)

Debugging and Patching

Each patch to refine lives in its own branch. OpenDataRise has a 'view' of Refine consisting of all patches to Refine in odr-buffer branch