Skip to content

Uko/QualityAssistant

Repository files navigation

Quality Assistant Build Status DOI

Hi, I'm your personal quality assistant. I run SmallLint rules on the code that you modify, and notify you about the critics right in the system browser. If you find any bugs in me please report them.

logo

Installation

❗ QualityAssistant comes pre-installed with Pharo5 (from 23.07.2015 v50185)

The easiest way to install is to use Configuration Browser. Otherwise you can execute the following script.

Metacello new
  smalltalkhubUser: 'Pharo'
  project: 'MetaRepoForPharo40';
  configuration: 'QualityAssistant';
  get;
  load

In Nautilus

Quality Assistant uses Nautilus plugin to notify users about the critics in their code. The plugin is automatically activated and will be available in all browsers opened after loading Quality Assistant. By default the plugin is positioned at the bottom of Nautilus browser, and will display a list of critics for a selected class or method.

nautilus demo

###Critics Details

If possible, the critic text will be prefixed with the name of the faulty part (variable, message, method, etc…). These prefixes as well as source code highlights are not implemented for many critics, although it is possible to do it. If you will find such a case, please report it here: https://github.com/Uko/Renraku/issues.

####Severity levels There are 3 severity levels of critics that are displayed at the left side of the list:

  • eclipse small info icon glamour small info icon    idea small info icon Information
  • eclipse small warning icon glamour small warning icon    idea small warning icon Warning
  • eclipse small error icon glamour small error icon    idea small error icon Error

####Actions eclipse small question icon glamour small question icon    idea small question icon Rationale. Clicking on the question mark will bring up the rationale on the critic.

eclipse small cancel icon glamour small cancel icon    idea small cancel icon Ban. Allows you to ban the validation of the current class or method by the rule of the critic. I.e. the critic will not be reported any more. When banning a critic for a method, you can decide to ban it on the class level, so the policy will apply to all the methods of a class. This functionality is implemented on top of Manifest false positives.

repair icon Autofix. Some critics provide a solution to the issue reported by them. By pressing "autofix" button you will open a diff preview of the changes that will happen if you apply the proposed issue resolution. However, previewing changes (i.e. before-after diff) is not as nice as it was. Sorry for inconveniences, I hope that we will have a solution for this in the future.

❗ Now the plugins in Inspector and Spotter can be toggled in settings (QualityAssistant group) and are disabled by default. inspector demo

In Inspector

If you inspect a method or a class which has critics, you will see a tab with a red circler and a number corresponding to critics amount. A critics presentation pane contains a list of critics prefixed with icons that represent severity and tagged with the group they belong to. A critic itself provides a source code presentetion and a description of itself.

inspector demo

In Spotter

While diving into a class of a method inside Spotter you can see the related critics in the QA Critics group.

spotter demo

Story Behind the Name

Definitely, the idea behind Quality Assistant is to have a bot that assists you with the quality of your code. But there is also the other side of the Moon.

In Ukraine we are used to call quality assurance engineers just QAs. And we are using it so much that we start to decline it in our own language. So you can think about QA as a word like "cuey" (Ukr: "кюей") instead of abbreviation. And so it's common to say: "the QA will check this" or "a QA has found a bug" or even "our QA has a birthday today".

In the first prototypes of Quality Assistant there was a global variable QA and so you could ask it:

QA revalidate: aMethod
QA criticsOf: aClass

This way you have an artificial quality assurance engineer, that you can talk to. And that guy (or girl) knows something about the quality of your code ;)