Unused resource -> 'warning' not 'error'.
This commit is contained in:
@@ -89,7 +89,7 @@ public class ConcourseModel {
|
||||
.filter(refNode -> defName.equals(NodeUtil.asScalar(refNode)))
|
||||
.findAny();
|
||||
if (!reference.isPresent()) {
|
||||
problems.accept(YamlSchemaProblems.schemaProblem("Unused '"+entityTypeName+"'", node));
|
||||
problems.accept(YamlSchemaProblems.problem(PipelineYmlSchemaProblems.UNUSED_RESOURCE, "Unused '"+entityTypeName+"'", node));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2017 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.concourse;
|
||||
|
||||
import org.springframework.ide.vscode.commons.languageserver.reconcile.ProblemSeverity;
|
||||
import org.springframework.ide.vscode.commons.languageserver.reconcile.ProblemType;
|
||||
|
||||
import static org.springframework.ide.vscode.commons.yaml.reconcile.YamlSchemaProblems.*;
|
||||
|
||||
public class PipelineYmlSchemaProblems {
|
||||
protected static final ProblemType UNUSED_RESOURCE = problemType("PipelineYamlUnusedResource", ProblemSeverity.WARNING);
|
||||
}
|
||||
@@ -3582,7 +3582,8 @@ public class ConcourseEditorTest {
|
||||
" plan:\n" +
|
||||
" - get: version\n"
|
||||
);
|
||||
editor.assertProblems("source-repo|Unused 'Resource'");
|
||||
Diagnostic p = editor.assertProblems("source-repo|Unused 'Resource'").get(0);
|
||||
assertEquals(DiagnosticSeverity.Warning, p.getSeverity());
|
||||
|
||||
editor = harness.newEditor(
|
||||
"resources:\n" +
|
||||
|
||||
Reference in New Issue
Block a user