-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1) Turn errors for empty task.input|output.path into a warning 2) Add task.optional property to the schema
- Loading branch information
Showing
7 changed files
with
81 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
...in/java/org/springframework/ide/vscode/commons/yaml/reconcile/YamlSchemaValueParsers.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2018 Pivotal, Inc. | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* which accompanies this distribution, and is available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
* | ||
* Contributors: | ||
* Pivotal, Inc. - initial API and implementation | ||
*******************************************************************************/ | ||
package org.springframework.ide.vscode.commons.yaml.reconcile; | ||
|
||
import org.springframework.ide.vscode.commons.languageserver.reconcile.ReconcileException; | ||
import org.springframework.ide.vscode.commons.util.StringUtil; | ||
import org.springframework.ide.vscode.commons.util.ValueParser; | ||
|
||
/** | ||
* Reusable value parsers and helpers that are somewhat specific | ||
* to yaml schema validation. | ||
*/ | ||
public class YamlSchemaValueParsers { | ||
|
||
public static final ValueParser OPT_STRING = (s) -> { | ||
if (StringUtil.hasText(s)) { | ||
return s; | ||
} else { | ||
throw new ReconcileException("Empty optional String attribute is useless and can be omitted.", YamlSchemaProblems.EMPTY_OPTIONAL_STRING); | ||
} | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -106,5 +106,4 @@ private static String createTimeRegexp() { | |
return time + pm + zone; | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
...ervices/concourse-language-server/src/main/resources/desc/TaskInput/optional.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
*Optional*. If `true`, then the input is not required by the task. The task may run even if this input is missing. | ||
|
||
An optional input that is missing will not appear in the current directory of the running task. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters