Creating MStyle profile
In this section, you will learn how to create your profile which
will contain a set of rules your Magik code will be checked against.
Adding rules to profile
MStyle > Profile
- Press Add... button.
- Add the following rules:
- Unused local
- Unused parameter
- Class responsibility
Note: You can add rules by double clicking them,
dragging and dropping from left to right or using Add
- Select Class responsibility rule in Selected
- Go to properties and change Max methods size
property to 10. This property defines the maximum allowed number of
non-private class members.
- Press OK to confirm configuration.
- Now your profile contains three active rules.
Changing rule severities
MStyle uses severities to distinguish serious and trivial
problems. By default all violations are reported as warnings.
- Find Class responsibility rule
- Change rule severity to Info.
- Press OK to save configuration.
Now you are ready to run your first