# Profiles
In jSparrow, profiles are used to group a set of rules. While there are pre-defined profiles (marked with [built-in]), custom profiles may be created as well.
jSparrow offers the following functions regarding profiles:
# Creating profiles
jSparrow allows for grouping sets of rules into profiles. Follow these steps to create a profile:
- Navigate to "Window" -> "Preferences" -> "jSparrow" and click on "New Profile..."
- Select the corresponding rules and a name for the new profile and click on "Finish"
# Editing profiles
The custom profiles can be modified as follows:
Navigate to "Window" -> "Preferences" -> "jSparrow"
Select the corresponding profile and click "Edit Profile..."
# Setting the default profile
The default profile determines which profile is first selected when opening the "Select Rules" dialog (see Usage of the Plugin).
Navigate to "Window" -> "Preferences" -> "jSparrow"
Just select the corresponding profile and click on "Use As Default Profile"
# Exporting profiles
jSparrow allows for exporting profiles into yml
files.
To export a profile:
Navigate to "Window" -> "Preferences" -> "jSparrow".
Select a profile to export and click "Export Profile(s)...".
Select the output directory and enter the file name.
Click "OK". A dialog shows the path to the generated file.
The generated yml
file contains the list of the rules in the selected profile and the default configuration values for the rules that require an initial configuration.
The exported profile can also be used by the jSparrow Maven Plugin.
# Importing profiles
jSparrow allows for importing profiles form yml
files.
To Import a profile:
Navigate to "Window" -> "Preferences" -> "jSparrow".
Click "Import Profile(s)...".
Find the location of the file to be imported and click "OK".
A dialog shows the name of the imported profile.
Click "Apply" to persist the imported profile in the Eclipse' preferences.
See also this page for the yml
syntax of jSparrow profiles.