Skip to content

How to install and use

Christoph Thiede edited this page Oct 8, 2025 · 10 revisions

How can I install SwaLint?

Latest release

There are two ways of installing the latest release. You can either use a SAR file or Metacello.

SAR file

Go to the latest release of SwaLint, download the .sar file, drag and drop it into your image and choose "install SAR".

Metacello

  1. Make sure you have metacello installed.
  2. Load the project with (it might ask you to click "Proceed" several times):
[Metacello new
  baseline: 'SwaLint';
  repository: 'github://hpi-swa-teaching/SwaLint:release/packages';
  get;
  load: #default]
    on: MetacelloSkipDirtyPackageLoad
    do: [:e | e resume: false]

Latest develop version

Metacello

  1. Make sure you have metacello installed.
  2. Load the project with (it might ask you to click "Proceed" several times):
[Metacello new
  baseline: 'SwaLint';
  repository: 'github://hpi-swa-teaching/SwaLint:develop/packages';
  get;
  load: #default]
    on: MetacelloSkipDirtyPackageLoad
    do: [:e | e resume: false]

How do I use SwaLint?

Click Apps > SwaLint Browser and select the system categories and classes to analyze. In the resulting browser, you can browse through the different tests in the left pane and through the different violating classes and methods in the right panes. You can also edit methods here or delete them from the browser via Cmd + d. Through the Run button at the top, you can rerun tests. The option button allows variables preferences for tweaking different rules and filtering methods for testing.

Legacy UI

Other than the SwaLint Browser, this tool requires you to select a set of rules upfront before browsing the results. In a later analysis we found out that this reduces the understanding of the tests' functioning as well overall interactivity during browsing.

Click Apps > SwaLint Code Critics (legacy) and the overview window will open.

On the left you will see all Categories you can choose from. If you select one, the corresponding classes will be added in the middle window. The Classes you select here are those, which will be linted. The Rules for the linting can be chosen on the right. In the top right corner you will see the Linter Rules Categories you can choose from, among them you will find the concrete Linter Rules. If you select one you will see its description in the right bottom corner.
You can also load and save your custom profile (set of linting rules) or load a preselected set of linter rules (defined by the SwaLint developers) when you right click in the Linter Rules window. But be aware: It will only select rules whose categories are already selected in the window above. The profile saving is global, so you can also load those rules when opening a new linter instance.
If you have made your selection you can choose whether you want to make a one time linting by clicking the Run Selected button or configure the linter to run on every code change by clicking Start AutoLinting that will show a defects-overview inspired by the Test Auto Runner.
Furthermore you will find plenty of configuration options when clicking the Options button. You can primarily set thresholds and enable/disable the appearance of extra rules.

Clone this wiki locally