Skip to content

Commit 82e918a

Browse files
Merge branch 'main' into main
Signed-off-by: Hasan Alp Zengin <[email protected]>
2 parents 74ed316 + e94c96b commit 82e918a

File tree

170 files changed

+1910
-5517
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

170 files changed

+1910
-5517
lines changed

CHANGELOG.md

+89
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,95 @@
22

33
All notable changes to this project will be documented in this file. See [conventional commits](https://www.conventionalcommits.org/) for commit guidelines.
44

5+
## [1.1.0](https://github.com/robotcodedev/robotcode/compare/v1.0.3..v1.1.0) - 2025-04-29
6+
7+
### Bug Fixes
8+
9+
- **analyze:** Allow `all` also in `robot.toml` configuration for `exit-code-mask` ([a496714](https://github.com/robotcodedev/robotcode/commit/a496714b88d397b46f4b4192c82336711fccac5a))
10+
- **langserver:** Corrected highlightning of embedded arguments if there is a namespace given before the keyword ([0ce5446](https://github.com/robotcodedev/robotcode/commit/0ce5446154b34655bd5db4c6cba91a9a82266440))
11+
12+
13+
### Documentation
14+
15+
- Draft article about variables ([161006e](https://github.com/robotcodedev/robotcode/commit/161006e6a730f52501bdff7dcd1cba9e85300fcd))
16+
- Added pycharm link on the robotcode.io homepage ([7686a21](https://github.com/robotcodedev/robotcode/commit/7686a21c76681d2a7321a67c1c872b6c77687000))
17+
18+
19+
### Features
20+
21+
- **analyze:** Exit code mask configuration for code analysis ([4b677ad](https://github.com/robotcodedev/robotcode/commit/4b677add254f88519d950e54ac5ef1f4e499d0e6))
22+
23+
Configure which message types should **not** influence the exit code of `robotcode analyze code`, allowing granular control over CI/CD pipeline behavior or pre-commit hooks.
24+
25+
**Configuration File (`robot.toml`)**
26+
27+
```toml
28+
[tool.robotcode-analyze.code]
29+
exit-code-mask = ["error", "warn"]
30+
```
31+
32+
**Command Line Options**
33+
34+
```
35+
robotcode analyze code --exit-code-mask error,warn # or -xm
36+
robotcode analyze code --extend-exit-code-mask info # or -xe
37+
```
38+
39+
- `-xm` (or `--exit-code-mask`) overwrites the configuration in `robot.toml`
40+
- `-xe` (or `--extend-exit-code-mask`) extends the configuration in `robot.toml`
41+
- Both options can be specified multiple times or with comma-separated values:
42+
43+
```
44+
robotcode analyze code -xm error -xm warn # multiple options
45+
robotcode analyze code -xm error,warn # comma-separated
46+
```
47+
48+
**Behavior**
49+
50+
- Message types in the mask are ignored when determining exit code
51+
- Available types: `error`, `warn`/`warning`, `info`/`information`, `hint`
52+
- Special value `all` ignores all message types (always exit code 0)
53+
- Without configuration, all message types affect the exit code
54+
55+
**Example**
56+
57+
```toml
58+
# In robot.toml - Ignore warnings but let errors affect exit code
59+
[tool.robotcode-analyze.code]
60+
exit-code-mask = ["warn"]
61+
```
62+
63+
```bash
64+
# Using short options
65+
robotcode analyze code -xm error,hint # Overwrites robot.toml config
66+
robotcode analyze code -xe info -xe hint # Extends robot.toml config with multiple types
67+
robotcode analyze code -xm all # Always exit with code 0
68+
```
69+
70+
- **vscode:** Add configuration for output file display options ([738d7a6](https://github.com/robotcodedev/robotcode/commit/738d7a6129f8e459c0af1961ebedfe320d2a4b9d))
71+
72+
Add "robotcode.run.openOutputTarget" setting to control how Robot Framework output files are displayed:
73+
- simpleBrowser: in VSCode's built-in browser
74+
- externalHttp: in default browser via HTTP protocol
75+
- externalFile: in default browser via file system
76+
77+
The externalFile options may not run in remote development environments.
78+
79+
- **vscode:** Use short CLI argument versions when calling robotcode ([0987f55](https://github.com/robotcodedev/robotcode/commit/0987f551803f23e2c8342638d2b3bb1e23cc99da))
80+
81+
82+
### Refactor
83+
84+
- **analyze:** Move code analysing to it's own module ([0123a50](https://github.com/robotcodedev/robotcode/commit/0123a507a3b23265676aa8d0c68af322e01f513c))
85+
86+
87+
### Testing
88+
89+
- Fix some unittest ([98e4d5c](https://github.com/robotcodedev/robotcode/commit/98e4d5c2e69e1d2a3a1518456f85ff04b15be920))
90+
- Disable some flaky tests ([f9a1a82](https://github.com/robotcodedev/robotcode/commit/f9a1a823c6cb9d885231c81830d6e438cf60b680))
91+
- Disable some flaky tests and correct regression test output file to be platform independent ([4387984](https://github.com/robotcodedev/robotcode/commit/43879844c9fdc845ae2b9fa373f076eb13a9feb9))
92+
93+
594
## [1.0.3](https://github.com/robotcodedev/robotcode/compare/v1.0.2..v1.0.3) - 2025-03-14
695

796
### Bug Fixes

docs/03_reference/config.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -2630,7 +2630,7 @@ exit_code_mask = "error|warn"
26302630

26312631
## tool.robotcode-analyze.code.exit-code-mask
26322632

2633-
Type: `list[Literal['error', 'warn', 'warning', 'info', 'information', 'hint']] | None`
2633+
Type: `list[Literal['error', 'warn', 'warning', 'info', 'information', 'hint', 'all']] | None`
26342634

26352635
Specifies the exit code mask for the code analysis.
26362636
This is useful if you want to ignore certain types of diagnostics in the result code.
@@ -2643,7 +2643,7 @@ exit_code_mask = ["error", "warn"]
26432643

26442644
## tool.robotcode-analyze.code.extend-exit-code-mask
26452645

2646-
Type: `list[Literal['error', 'warn', 'warning', 'info', 'information', 'hint']] | None`
2646+
Type: `list[Literal['error', 'warn', 'warning', 'info', 'information', 'hint', 'all']] | None`
26472647

26482648
Extend the exit code mask setting.
26492649

@@ -2741,7 +2741,7 @@ Extend the code analysis configuration.
27412741

27422742
## tool.robotcode-analyze.extend-code.exit-code-mask
27432743

2744-
Type: `list[Literal['error', 'warn', 'warning', 'info', 'information', 'hint']] | None`
2744+
Type: `list[Literal['error', 'warn', 'warning', 'info', 'information', 'hint', 'all']] | None`
27452745

27462746
Specifies the exit code mask for the code analysis.
27472747
This is useful if you want to ignore certain types of diagnostics in the result code.
@@ -2754,7 +2754,7 @@ exit_code_mask = ["error", "warn"]
27542754

27552755
## tool.robotcode-analyze.extend-code.extend-exit-code-mask
27562756

2757-
Type: `list[Literal['error', 'warn', 'warning', 'info', 'information', 'hint']] | None`
2757+
Type: `list[Literal['error', 'warn', 'warning', 'info', 'information', 'hint', 'all']] | None`
27582758

27592759
Extend the exit code mask setting.
27602760

docs/package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88
"preview": "vitepress preview"
99
},
1010
"devDependencies": {
11-
"esbuild": "^0.25.1",
11+
"esbuild": "^0.25.3",
1212
"markdown-it-abbr": "^2.0.0",
13-
"markdown-it-kbd": "^2.2.2",
13+
"markdown-it-kbd": "^3.0.0",
1414
"markdown-it-mathjax3": "^4.3.2",
1515
"markdown-it-task-lists": "^2.1.1",
16-
"typescript": "^5.8.2",
17-
"typescript-eslint": "^8.26.1",
16+
"typescript": "^5.8.3",
17+
"typescript-eslint": "^8.31.1",
1818
"vitepress": "^1.6.3",
19-
"vitepress-plugin-tabs": "^0.6.0",
19+
"vitepress-plugin-tabs": "^0.7.0",
2020
"vitepress-sidebar": "^1.31.1"
2121
},
2222
"dependencies": {

intellij-client/gradle.properties

+9-6
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,28 @@ pluginGroup = dev.robotcode
44
pluginName = RobotCode - Robot Framework Support
55
pluginRepositoryUrl = https://github.com/robotcodedev/robotcode4ij
66
# SemVer format -> https://semver.org
7-
pluginVersion = 1.0.3
7+
pluginVersion = 1.1.0
88

99
# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
10-
pluginSinceBuild = 243
11-
pluginUntilBuild = 251.*
10+
pluginSinceBuild = 251
11+
pluginUntilBuild = 261.*
1212

1313

1414
# IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension
1515
platformType = PC
16-
platformVersion = 2024.3.1
16+
platformVersion = 2025.1
1717

1818
# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
1919
# Example: platformPlugins = com.jetbrains.php:203.4449.22, org.intellij.scala:2023.3.27@EAP
20-
platformPlugins = com.redhat.devtools.lsp4ij:0.10.0
20+
#platformPlugins = com.redhat.devtools.lsp4ij:0.13.0-20250501-072621@nightly
21+
platformPlugins = com.redhat.devtools.lsp4ij:0.12.0
22+
23+
2124
# Example: platformBundledPlugins = com.intellij.java
2225
platformBundledPlugins = PythonCore, org.jetbrains.plugins.textmate
2326

2427
# Gradle Releases -> https://github.com/gradle/gradle/releases
25-
gradleVersion = 8.12
28+
gradleVersion = 8.14
2629

2730
# Opt-out flag for bundling Kotlin standard library -> https://jb.gg/intellij-platform-kotlin-stdlib
2831
kotlin.stdlib.default.dependency = false

intellij-client/gradle/libs.versions.toml

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
[versions]
22
# libraries
3-
annotations = "26.0.1"
4-
kotlinxSerialization = "1.7.3"
3+
annotations = "26.0.2"
4+
kotlinxSerialization = "1.8.1"
55
junit = "4.13.2"
66
lsp4j = "0.21.1"
77

88
# plugins
99
changelog = "2.2.1"
10-
intelliJPlatForm = "2.2.1"
10+
intelliJPlatForm = "2.5.0"
1111
kotlin = "2.1.0"
1212
kover = "0.9.1"
1313

@@ -55,5 +55,3 @@ version.ref = "kover"
5555
[plugins.kotlinSerialization]
5656
id = "org.jetbrains.kotlin.plugin.serialization"
5757
version.ref = "kotlin"
58-
59-

intellij-client/src/main/kotlin/dev/robotcode/robotcode4ij/RobotCodeHelpers.kt

+16-16
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class RobotCodeHelpers {
2222
val toolPath: Path = bundledPath.resolve("tool")
2323
val robotCodePath: Path = toolPath.resolve("robotcode")
2424
val checkRobotVersion: Path = toolPath.resolve("utils").resolve("check_robot_version.py")
25-
25+
2626
val PYTHON_AND_ROBOT_OK_KEY = Key.create<Boolean?>("ROBOTCODE_PYTHON_AND_ROBOT_OK")
2727
}
2828
}
@@ -38,28 +38,28 @@ fun Project.checkPythonAndRobotVersion(reset: Boolean = false): Boolean {
3838
if (!reset && this.getUserData(RobotCodeHelpers.PYTHON_AND_ROBOT_OK_KEY) == true) {
3939
return true
4040
}
41-
41+
4242
val result = ApplicationManager.getApplication().executeOnPooledThread<Boolean> {
43-
43+
4444
val pythonInterpreter = this.robotPythonSdk?.homePath
45-
45+
4646
if (pythonInterpreter == null) {
4747
thisLogger().info("No Python Interpreter defined for project '${this.name}'")
4848
return@executeOnPooledThread false
4949
}
50-
50+
5151
if (!Path(pythonInterpreter).exists()) {
5252
thisLogger().warn("Python Interpreter $pythonInterpreter not exists")
5353
return@executeOnPooledThread false
5454
}
55-
55+
5656
if (!Path(pythonInterpreter).isRegularFile()) {
5757
thisLogger().warn("Python Interpreter $pythonInterpreter is not a regular file")
5858
return@executeOnPooledThread false
5959
}
60-
60+
6161
thisLogger().info("Use Python Interpreter $pythonInterpreter for project '${this.name}'")
62-
62+
6363
val res = ExecUtil.execAndGetOutput(
6464
GeneralCommandLine(
6565
pythonInterpreter, "-u", "-c", "import sys; print(sys.version_info[:2]>=(3,8))"
@@ -69,7 +69,7 @@ fun Project.checkPythonAndRobotVersion(reset: Boolean = false): Boolean {
6969
thisLogger().warn("Invalid python version")
7070
return@executeOnPooledThread false
7171
}
72-
72+
7373
val res1 = ExecUtil.execAndGetOutput(
7474
GeneralCommandLine(pythonInterpreter, "-u", RobotCodeHelpers.checkRobotVersion.pathString),
7575
timeoutInMilliseconds = 5000
@@ -78,13 +78,13 @@ fun Project.checkPythonAndRobotVersion(reset: Boolean = false): Boolean {
7878
thisLogger().warn("Invalid Robot Framework version")
7979
return@executeOnPooledThread false
8080
}
81-
81+
8282
return@executeOnPooledThread true
83-
83+
8484
}.get()
85-
85+
8686
this.putUserData(RobotCodeHelpers.PYTHON_AND_ROBOT_OK_KEY, result)
87-
87+
8888
return result
8989
}
9090

@@ -100,7 +100,7 @@ fun Project.buildRobotCodeCommandLine(
100100
if (!this.checkPythonAndRobotVersion()) {
101101
throw IllegalArgumentException("PythonSDK is not defined or robot version is not valid for project ${this.name}")
102102
}
103-
103+
104104
val pythonInterpreter = this.robotPythonSdk?.homePath
105105
val commandLine = GeneralCommandLine(
106106
pythonInterpreter,
@@ -111,10 +111,10 @@ fun Project.buildRobotCodeCommandLine(
111111
*(if (format.isNotEmpty()) arrayOf("--format", format) else arrayOf()),
112112
*(if (noColor) arrayOf("--no-color") else arrayOf()),
113113
*(if (noPager) arrayOf("--no-pager") else arrayOf()),
114-
*profiles.flatMap { listOf("--profile", it) }.toTypedArray(),
114+
*profiles.flatMap { listOf("-p", it) }.toTypedArray(),
115115
*extraArgs,
116116
*args
117117
).withWorkDirectory(this.basePath).withCharset(Charsets.UTF_8)
118-
118+
119119
return commandLine
120120
}

intellij-client/src/main/kotlin/dev/robotcode/robotcode4ij/execution/RobotCodeRunProfileState.kt

+4-4
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class RobotCodeRunProfileState(private val config: RobotCodeRunConfiguration, en
8484
val testSuitePath = profile.testSuitePath
8585

8686
// TODO: Add support for configurable paths
87-
val defaultPaths = arrayOf("--default-path", ".")
87+
val defaultPaths = arrayOf("-dp", ".")
8888

8989
// Prepare variables as command line arguments
9090
val variables = profile.variables?.split(",")?.mapNotNull {
@@ -98,18 +98,18 @@ class RobotCodeRunProfileState(private val config: RobotCodeRunConfiguration, en
9898
val debug = environment.runner is RobotCodeDebugProgramRunner
9999

100100
val included = mutableListOf<String>()
101-
101+
102102
if (testSuitePath != null){
103103
val testitem = profile.project.testManger.findTestItem(Path(testSuitePath).toUri().toString())
104104
if (testitem != null) {
105-
included.add("--by-longname")
105+
included.add("-bl")
106106
included.add(testitem.longname)
107107
}
108108
}
109109
if (!profile.includedTestItems.isNullOrEmpty()) {
110110
val testItemLongNames = profile.includedTestItems!!.split(",").map { it.trim() }.filter { it.isNotEmpty() }
111111
for (testItemLongName in testItemLongNames){
112-
included.add("--by-longname")
112+
included.add("-bl")
113113
included.add(testItemLongName)
114114
}
115115
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package dev.robotcode.robotcode4ij.lsp
2+
3+
import com.intellij.psi.FileViewProviderFactory
4+
5+
class RobotCodeTokensFileViewProviderFactory : FileViewProviderFactory

0 commit comments

Comments
 (0)