https://github.com/i582/intellij-kphp-highlighting-test-adapter
Library for testing highlighting in plugins for IDEA in KPHP format.
https://github.com/i582/intellij-kphp-highlighting-test-adapter
intellij-plugin testing
Last synced: 10 months ago
JSON representation
Library for testing highlighting in plugins for IDEA in KPHP format.
- Host: GitHub
- URL: https://github.com/i582/intellij-kphp-highlighting-test-adapter
- Owner: i582
- License: mit
- Created: 2022-07-22T16:23:45.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2022-07-22T17:00:55.000Z (almost 4 years ago)
- Last Synced: 2025-05-14T07:51:27.360Z (about 1 year ago)
- Topics: intellij-plugin, testing
- Language: Kotlin
- Homepage:
- Size: 61.5 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# intellij-kphp-highlighting-test-adapter
Library for testing highlighting in plugins for IDEA in KPHP format.
## Installation
### Kotlin DSL
```kotlin
plugins {
id("com.vk.intellij-kphp-highlighting-test-adapter") version "0.1.0"
}
```
### Gradle DSL
```groovy
plugins {
id 'com.vk.intellij-kphp-highlighting-test-adapter' version "0.1.0"
}
```
## Test Format
```text
// ^^^^ <- range in line
// :
```
Example:
```php
$a = new Message();
// ^^^^^^^
// error: Undefined class 'Message'
```
Message can be multiline:
```php
echo($a);
// ^^
// error: Can't find variable: $a
// Maybe you meant $b?
```
## Motivation
The standard test format for IDEA requires describing the error directly in the code using XML.
Because of this, the standard highlighting in the IDE breaks and gives a lot of errors.
Therefore, we came up with this format for tests in IDEA.
It allows you to conveniently describe errors in the code in the form of comments,
while the highlighting doesn't break.
## License
This project is under the MIT License. See the
[LICENSE](./LICENSE)
file for the full license text.