ramverma | af74a62 | 2018-07-31 18:25:39 +0100 | [diff] [blame] | 1 | // |
| 2 | // ============LICENSE_START======================================================= |
| 3 | // Copyright (C) 2016-2018 Ericsson. All rights reserved. |
| 4 | // ================================================================================ |
| 5 | // This file is licensed under the CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE |
| 6 | // Full license text at https://creativecommons.org/licenses/by/4.0/legalcode |
| 7 | // |
| 8 | // SPDX-License-Identifier: CC-BY-4.0 |
| 9 | // ============LICENSE_END========================================================= |
| 10 | // |
| 11 | // @author Sven van der Meer (sven.van.der.meer@ericsson.com) |
| 12 | // |
| 13 | |
| 14 | == Configure Checkstyle Blueprint |
| 15 | |
| 16 | As well as being configured globally, Checkstyle must be configured and activated for each project in Eclipse. |
| 17 | In order to make this process less tedious, set up the first project you apply Checkstye to as a blueprint project and then use this blueprint for all other projects. |
| 18 | |
| 19 | . Select the project you want to use as a blueprint |
| 20 | * For example, `apex-model.basic-model` in `apex` and enter the project properties by right clicking and selecting menu:Properties[] |
| 21 | . Click __Checkstyle__ on the properties to get the Checkstyle project configuration window |
| 22 | . Click the box __Checkstyle active for this project__ and in the __Exclude from checking...__ list check the boxes: |
| 23 | * [*] __files outside source directories__ |
| 24 | * [*] __derived (generated) files__ |
| 25 | * [*] __files from packages:__ |
| 26 | . Now, in order to turn off checking on resource directories and on JUnit tests |
| 27 | * Select the line __files from packages:__ in the __Exclude from checking...__ list and click kbd:[Change...] |
| 28 | . On the __Filter packages__ dialogue |
| 29 | * Check all the boxes except the top box, which is the box for __src/main/java__ |
| 30 | * Ensure that the __recursively exclude sub-packages__ check box is ticked |
| 31 | ** [*] __recursively exclude sub-packages__ |
| 32 | * Press kbd:[OK] |
| 33 | . Press kbd:[Apply and Close] to apply the changes |
| 34 | |
| 35 | |