-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support for excluding properties from validation
Signed-off-by: Fred Bricon <[email protected]>
- Loading branch information
Showing
6 changed files
with
125 additions
and
6 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
...llij/lsp4mp4ij/psi/core/inspections/AbstractDelegateInspectionWithExcludedProperties.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,22 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2023 Red Hat Inc. and others. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License v. 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0 | ||
* which is available at https://www.apache.org/licenses/LICENSE-2.0. | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 | ||
* | ||
* Contributors: | ||
* Red Hat Inc. - initial API and implementation | ||
*******************************************************************************/ | ||
package com.redhat.devtools.intellij.lsp4mp4ij.psi.core.inspections; | ||
|
||
import com.intellij.codeInspection.LocalInspectionTool; | ||
|
||
/** | ||
* No-op {@link LocalInspectionTool} used as a basis for mapping inspection severities to matching LSP severities. | ||
*/ | ||
public abstract class AbstractDelegateInspection extends LocalInspectionTool { | ||
} |
28 changes: 28 additions & 0 deletions
28
...s/intellij/lsp4mp4ij/psi/core/inspections/MicroProfilePropertiesUnassignedInspection.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,28 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2023 Red Hat Inc. and others. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License v. 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0 | ||
* which is available at https://www.apache.org/licenses/LICENSE-2.0. | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 | ||
* | ||
* Contributors: | ||
* Red Hat Inc. - initial API and implementation | ||
*******************************************************************************/ | ||
package com.redhat.devtools.intellij.lsp4mp4ij.psi.core.inspections; | ||
|
||
import com.intellij.codeInspection.ui.ListEditForm; | ||
import com.intellij.codeInspection.ui.MultipleCheckboxOptionsPanel; | ||
|
||
import javax.swing.*; | ||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
/** | ||
* Dummy inspection for unknown properties in Microprofile properties files | ||
*/ | ||
public class MicroProfilePropertiesUnknownInspection extends AbstractDelegateInspectionWithExcludedProperties { | ||
public static final String ID = getShortName(MicroProfilePropertiesUnknownInspection.class.getSimpleName()); | ||
} |
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
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
25 changes: 25 additions & 0 deletions
25
src/main/resources/inspectionDescriptions/MicroProfilePropertiesUnassigned.html
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,25 @@ | ||
<html> | ||
<body> | ||
Write your description here. | ||
Start the description with a verb in 3rd person singular, like reports, detects, highlights. | ||
In the first sentence, briefly explain what exactly the inspection helps you detect. | ||
Make sure the sentence is not very long and complicated. | ||
<p> | ||
The first sentence must be in a dedicated paragraph separated from the rest of the text. This will make the description easier to read. | ||
Make sure the description doesn’t just repeat the inspection title. | ||
</p> | ||
<p> | ||
See https://jetbrains.design/intellij/text/inspections/#descriptions for more information. | ||
</p> | ||
<p> | ||
Embed code snippets: | ||
</p> | ||
<pre><code> | ||
// automatically highlighted according to inspection registration 'language' attribute | ||
</code></pre> | ||
<!-- tooltip end --> | ||
<p>Text after this comment will only be shown in the settings of the inspection.</p> | ||
|
||
<p>To open related settings directly from the description, add a link with `settings://$` optionally followed by `?$` to pre-select a UI element.</p> | ||
</body> | ||
</html> |