|
| 1 | +/* |
| 2 | + * Copyright (C) 2020 The ORT Project Authors (see <https://github.com/oss-review-toolkit/ort/blob/main/NOTICE>) |
| 3 | + * |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | + * you may not use this file except in compliance with the License. |
| 6 | + * You may obtain a copy of the License at |
| 7 | + * |
| 8 | + * https://www.apache.org/licenses/LICENSE-2.0 |
| 9 | + * |
| 10 | + * Unless required by applicable law or agreed to in writing, software |
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | + * See the License for the specific language governing permissions and |
| 14 | + * limitations under the License. |
| 15 | + * |
| 16 | + * SPDX-License-Identifier: Apache-2.0 |
| 17 | + * License-Filename: LICENSE |
| 18 | + */ |
| 19 | + |
| 20 | +package org.ossreviewtoolkit.scanner |
| 21 | + |
| 22 | +import org.ossreviewtoolkit.model.ScannerDetails |
| 23 | + |
| 24 | +/** |
| 25 | + * A holder class for the [ScannerMatcher] criteria. Only non-null properties are taken into account for matching. |
| 26 | + */ |
| 27 | +interface ScannerMatcherCriteria { |
| 28 | + /** |
| 29 | + * Criterion to match the scanner name. This string is interpreted as a regular expression. In the most basic |
| 30 | + * form, it can be an exact scanner name, but by using features of regular expressions, a more advanced |
| 31 | + * matching can be achieved. So it is possible, for instance, to select multiple scanners using an alternative ('|') |
| 32 | + * expression or an arbitrary one using a wildcard ('.*'). |
| 33 | + */ |
| 34 | + val regScannerName: String? |
| 35 | + |
| 36 | + /** |
| 37 | + * Criterion to match the scanner version, including this minimum version. Results are accepted if they are produced |
| 38 | + * by scanners with a version greater than or equal to this version. |
| 39 | + */ |
| 40 | + val minVersion: String? |
| 41 | + |
| 42 | + /** |
| 43 | + * Criterion to match the scanner version, excluding this maximum version. Results are accepted if they are produced |
| 44 | + * by scanners with a version less than this version. |
| 45 | + */ |
| 46 | + val maxVersion: String? |
| 47 | + |
| 48 | + /** |
| 49 | + * Criterion to match the [configuration][ScannerDetails.configuration] of the scanner. |
| 50 | + */ |
| 51 | + val configuration: String? |
| 52 | +} |
0 commit comments