Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix multi-values/property warning #1782

Merged
merged 1 commit into from
Jan 7, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions sonar-c-plugin/src/main/java/org/sonar/plugins/c/CPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,17 @@ public final class CPlugin implements Plugin {
private static List<PropertyDefinition> generalProperties() {
String subcateg = "(1) General";
return Collections.unmodifiableList(Arrays.asList(
PropertyDefinition.builder(SOURCE_FILE_SUFFIXES_KEY).multiValues(true)
PropertyDefinition.builder(SOURCE_FILE_SUFFIXES_KEY)
.multiValues(true)
.defaultValue(CLanguage.DEFAULT_SOURCE_SUFFIXES)
.name("Source files suffixes")
.description("Comma-separated list of suffixes for source files to analyze. Leave empty to use the default.")
.subCategory(subcateg)
.onQualifiers(Qualifiers.PROJECT, Qualifiers.MODULE)
.index(1)
.build(),
PropertyDefinition.builder(HEADER_FILE_SUFFIXES_KEY).multiValues(true)
PropertyDefinition.builder(HEADER_FILE_SUFFIXES_KEY)
.multiValues(true)
.defaultValue(CLanguage.DEFAULT_HEADER_SUFFIXES)
.name("Header files suffixes")
.description("Comma-separated list of suffixes for header files to analyze. Leave empty to use the default.")
Expand All @@ -112,6 +114,7 @@ private static List<PropertyDefinition> generalProperties() {
.index(2)
.build(),
PropertyDefinition.builder(INCLUDE_DIRECTORIES_KEY)
.multiValues(true)
.name("Include directories")
.description("Comma-separated list of directories to search the included files in. May be defined either"
+ " relative to projects root or absolute.")
Expand All @@ -120,6 +123,7 @@ private static List<PropertyDefinition> generalProperties() {
.index(3)
.build(),
PropertyDefinition.builder(FORCE_INCLUDE_FILES_KEY)
.multiValues(true)
.subCategory(subcateg)
.name("Force includes")
.description("Comma-separated list of files which should to be included implicitly "
Expand All @@ -139,6 +143,7 @@ private static List<PropertyDefinition> generalProperties() {
.build(),
PropertyDefinition.builder(C_FILES_PATTERNS_KEY)
.defaultValue(CLanguage.DEFAULT_C_FILES)
.multiValues(true)
.name("C source files patterns")
.description("Comma-separated list of wildcard patterns used to detect C files. When a file matches any of the "
+ "patterns, it is parsed in C-compatibility mode.")
Expand Down