< Projects
Revision as of 21:34, 18 March 2012 by Winterz (talk | contribs)

Projects/English Breakfast Network

Projects/English Breakfast Network

The English Breakfast Network (EBN) is a site dedicated to KDE Quality, including: KDE API Documentation Validation, User Documentation Validation and Source Code Checking.

Related Links


Code Checking (Krazy)

  • dpointers - Make sure that installed class headers have dpointers.


Doc Sanitizer


Things To-do

  • Web Pages and Server Stuff
  • Krazy
    • Web Stuff
      • Say when the next update will be run
      • Put the output 'krazy --list --explain --export=ebn' someplace?
    • Tutorials http://techbase.kde.org/Development/Tutorials/Code_Checking
      • Document .krazy files
      • How to get the names of the plugins (in order to use //krazy:exclude=<plugin_name>)
    • Krazy (the program)
    • Krazyall
    • Krazyebn
    • Plugins
      • General
      • Ideas
        • check for '^\*space:*constspace:' in headers to find stuff like "virtual FolderStorage* const rootFolder() const = 0;" where we'd rather have "virtual FolderStorage* rootFolder() const = 0;" but stuff like "const char * const p" is ok in structures.
      • copyright
        • look in kde-common/accounts to validate name and email address
        • look in an AUTHORS file??
      • spelling
        • provide a list of possible alternatives
        • rewrite the spellchecker to only look at strings and comments in C++ files
      • license
        • Adriaan's updated license checker
        • Look in a COPYRIGHT file?
      • classes
      • qdisablecopy
        • classes with non-pure virtual functions or derived from classes with non-pure virtual functions must have a Q_DISABLE_COPY(). in addition, all the other dpointer requirements are necessary to require Q_DISABLE_COPY().
      • foreach
        • a test that detects using foreach() with objects instead of pointers or const object references, i.e., something that detects "foreach (QModelIndex index, indexes)" (tsdgeos)
      • includes
        • the use of "foo.h" vs. <foo.h>
        • if there is an include <kfoo.h>, check for the presence of KFoo:: or KFoo\s+\w or if one class inherits from KFoo. if none found then no need to include that file. (Gof)
        • check if "include <kfoo.h>" would be better as "class KFoo" in a header.
        • consistent about mixing indirect includes <QtCore/QString> and direct includes <qstring.h>
        • <QtCore/QString> vs. <QString>
      • constmethods
        • check for methods that should be const, i.e methods that return a non-instrinic type and don't modify passed values. a partially working plugin exists in tplugins, but it needs some work
        • check for constness of overloaded operators like ==, !=, <, >, >=, <=, +,-,hat,&,| (christoph4)
      • cast syntax
        • detect the "old cast" syntax: use static_cast<int>(p) instead of (int)p
        • detect useless static_cast: void method(A* p) { x=static_cast<A*>(p);}
      • functions
        • check for reimplementing public-non-virtual-functions
        • check whether reimplemented virtual functions have the same argument list as the function of the base class. Different arguments are probably always error and lead to unwanted results (the wrong virtual functions are called). See commit 672971 as an example. This needs very good support from the C++ parser.
      • connect
        • check whether the signals and slots in a connect() actually exist and match. Although this is also checked at runtime by Qt, rare code paths may still contain errors, especially after all the porting. This needs very good C++ parser support.
      • Blacklist Methods
        • QImage::depth() (fredrikh)
        • calling QApplication::palette() in a class that inherits QWidget is just plain wrong. each widget has its own palette, and it should use that one.
        • don't use the new mixColors() with the background color in the palette
        • Blacklist certain KFoo classes (which ones?) in the public API
      • inline
        • complain for the classes that don't declare a ctor or dtor because that make them inline, implicitly. (Gof)

XML Migration plan

Currently bbroeksema is working on xml output for the krazy2 tool. The plan is to slim down krazy2 in such a way that it will only support text output and xml output. The xml output will be transformed, using XSLT style sheets to other outputs like the ebn website html code but also to SQL queries to keep track of historical data.

First work on style sheets can be found at:


Migration steps

  • Check the XML output of a complete module (e.g. KDEPIM)
  • Fix eventually issues in the xml output.
  • Check the output of the style sheets which generates the ebn sites.
  • Fix eventually issues in the style sheets.
  • Make sure that saxon8 is installed on EBN.
  • Adapt the script that generates the EBN sites to use XML output (krazy2ebn?)
 and to perform the transformations.
  • Switch EBN to XML output.
  • Remove the other output methods from the krazy2 script.

Next steps would involve storing all results in the db:

  • Create new database structure on ebn
  • Create xml -> sql stylesheet
  • Modify the krazy2xml script to store results in db.
  • At some point we might want to migrate the ebn website to a full php website which just queries that db.

Administration HowTo

Finding Component Ids in the DB

Look at The EBN Administration page in the Components table area.

Adding a Component to the DB

For example, to add component for KDE SC 4.8:

% psql -t -h localhost -U kde ebn
ebn=> insert into components values (27,'kde-4.8','KDE SC 4.8','');
ebn=> \quit

Now reload The EBN Administration page and you will see the new Id listed in the Components table.

Finding Tool Ids in the DB

Look at The EBN Administration page in the Tools table area.

Adding Tools to the DB

You need to add each supported tool to the components of interest. So, to add all our favorite tools to the new kde-4.8 component:

% psql -t -h localhost -U kde ebn
ebn=> insert into tools values (120,'krazy',27,'Code Checking','','/krazy/',0,'t');
ebn=> insert into tools values (121,'sanitizer',27,'Documentation Sanitizer','','/sanitizer/',0,'t');
ebn=> insert into tools values (122,'dox',27,'API Documentation','','/apidox/',0,'t');
ebn=> \quit

Now reload The EBN Administration page and you will see the new Tools listed in the Tools table.


The EBN is operated by Adriaan de Groot and Allen Winter.

Authors/Maintainers of the individual quality tools can be found on the About page.


This page was last edited on 1 September 2012, at 16:38. Content is available under Creative Commons License SA 4.0 unless otherwise noted.